Skip to content

feat(cli): operator config surface — identity + output defaults (RFC-007 PR 1) - #196

Merged
aaltshuler merged 5 commits into
mainfrom
feat/operator-config-identity
Jun 11, 2026
Merged

aaltshuler merged 5 commits into
mainfrom
feat/operator-config-identity

Conversation

@aaltshuler

Copy link
Copy Markdown
Contributor

First implementation slice of RFC-007 (#195 carries the RFC pair; this branch includes those docs commits and will rebase to a pure code diff once #195 merges).

What lands

  • ~/.omnigraph/config.yaml — the operator surface, loader in a new CLI-only module (the server never reads it; invariant 11 by construction). $OMNIGRAPH_HOME overrides the dir (tilde-expanded — Omnigraph Config v2 #139 finding 9). Absent file = empty layer; unknown keys warn and load (a file written for the PR-2/3 keys works on this CLI); malformed YAML errors loudly.
  • THE actor chain, unified: --as > legacy cli.actor (RFC-008 window) > operator.actor > none — one implementation (resolve_actor) behind both resolve_cli_actor (direct-engine writes) and resolve_cluster_actor, replacing two divergent copies (Omnigraph Config v2 #139 finding 11's class).
  • Format cascade: --json > --format > alias > legacy config > defaults.output > table.
  • $OMNIGRAPH_CONFIG stands in for --config in load_config (flag > env > ./omnigraph.yaml) — one name, one meaning, both binaries (the container entrypoint already used it for the server).

Hermeticity

The spawned-binary test harness now pins OMNIGRAPH_HOME to a nonexistent path by default — no test can ever read the developer's real ~/.omnigraph/, and operator-layer tests override it explicitly.

Tests

Loader unit tests (parse/defaults/unknown-warn/absent/malformed/tilde), the load_config_in env-precedence matrix, and spawned-binary e2es: the three-hop actor chain through cluster apply audit output, and the format cascade through read. Full cargo test --workspace --locked green (57 suites). Zero behavior change for any existing omnigraph.yaml.

🤖 Generated with Claude Code

aaltshuler and others added 5 commits June 11, 2026 18:29
Terraform-style operator/project split: ~/.omnigraph/config.yaml for
identity (operator.actor in the --as cascade), credentials keyed by
server name (env -> 0600 credentials file; no inline secrets), and
operator-owned named servers that project configs reference but cannot
redefine. Explicitly a staged subset of RFC-002: adopts its settled
decisions (one dir, keyed credentials, env precedence), defers
GraphLocator/use/state-layer, and encodes the ten confirmed PR #139
findings as design rules (compat shims, key-level merges, atomic writes,
the project-layer trust boundary).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… surface

The file is three unrelated concerns wearing one filename — server
deployment config, project/CLI conveniences, operator identity — and the
mixture is the root cause of a recurring problem class (per-operator
copies of project files, checkout-supplied credential redirection, init
scaffold pollution). End state: two single-owner surfaces — cluster
config (team, repo) and operator config (person, $HOME) — plus the
zero-config flags/env tier.

Complete key-by-key migration map over the verified OmnigraphConfig
surface; staged retirement per the repo's Hyrum rules (warn with per-key
guidance -> `config migrate` tool -> stop scaffolding -> opt-in strict ->
removal at the next major). RFC-007's project-layer framing is amended to
transitional accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RFC-007 now speaks the end-state language throughout: the operator surface
is one half of the two-surface split (cluster config / operator config),
not a layer over a living omnigraph.yaml. The precedence cascade drops the
project layer (cluster config carries no operator-resolvable keys — a
checkout can never supply identity); legacy omnigraph.yaml appears only as
the RFC-008 deprecation-window slot. The trust boundary is restated as
closed-by-construction in the end state, with the rules governing the
window. PR 3 becomes operator targeting (--server + operator aliases — the
replacement RFC-008 needs before legacy aliases migrate), and the schema
example gains the aliases block.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… (RFC-007 PR 1)

~/.omnigraph/config.yaml joins the resolution chains as the operator
surface: operator.actor becomes the last hop of THE actor chain (--as >
legacy cli.actor during the RFC-008 window > operator.actor > none, one
implementation for direct-engine and cluster commands alike) and
defaults.output joins the read-format cascade below every more-specific
source. Discovery honors $OMNIGRAPH_HOME (tilde-expanded, #139 finding 9);
an absent file is an empty layer; unknown keys WARN and load (a file
written for later slices must not break this CLI); malformed YAML is a
loud error. The module is CLI-only — the server never reads operator
config (invariant 11 by construction).

$OMNIGRAPH_CONFIG becomes a first-class stand-in for --config in
load_config (flag > env > ./omnigraph.yaml), one meaning in both binaries.

The test harness pins hermeticity: spawned binaries get a nonexistent
OMNIGRAPH_HOME by default so no test ever reads the developer's real
operator config. New coverage: loader unit tests, the env-precedence
matrix on load_config_in, and spawned-binary e2es for the actor chain
(operator wins with no flag/legacy key; legacy outranks it; --as wins) and
the format cascade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cli-reference.md gains the config-surfaces table (cluster / operator /
flags-env, with omnigraph.yaml marked as the legacy combined file per
RFC-008) and the operator config.yaml reference; audit.md documents the
unified actor chain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaltshuler has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@aaltshuler
aaltshuler merged commit 5db42fb into main Jun 11, 2026
8 checks passed
@aaltshuler
aaltshuler deleted the feat/operator-config-identity branch June 11, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant