docs: document global-first layered config, config view, and use

Add a Layered config section to cli-reference.md (precedence chain, OMNIGRAPH_HOME/
CONFIG/XDG resolution, ~/.omnigraph layout, merge semantics) and the config view /
use command rows; note global-first in cli.md; record the layered-config test surface
in testing.md; update the RFC-002 implementation-status banner (V1-remainder landed).
This commit is contained in:
Ragnor Comerford 2026-06-05 11:54:23 +02:00
parent d52cd1d0a3
commit 1a6371d015
No known key found for this signature in database
4 changed files with 58 additions and 4 deletions

View file

@ -14,9 +14,17 @@ alias proposed below; and `uri:` is honored-but-deprecation-warned (not auto-rew
`storage.uri`). **Crate-location corrections** (the "Reconciliation"/"Implementation"
sections below predate V0): the config schema now lives in the extracted `omnigraph-config`
crate, and `QueryRegistry` was extracted to `omnigraph-queries` (not "kept in
`omnigraph-server`"). Deferred: layered global-first config + merge/provenance + `config
view`, the `cli:`→`defaults:` / `server:`→`serve:` renames (V1-remainder), route unification
+ remote client (V2), and the auth model (V3).
`omnigraph-server`").
**Implementation status — V1-remainder landed.** Also shipped: the schema reshape
(`cli:``defaults:`, `server:``serve:` with a `graphs:` list, removed `project:` and
top-level `policy:`/`queries:` — legacy spellings honored-but-warned, rejected under
`version: 1`); and the **global-first layered config** — global `~/.omnigraph/config.yaml`
merged under the project file with per-field provenance, eager per-layer path resolution,
`omnigraph config view [--resolved] [--show-origin]`, and `omnigraph use` (active-context
State layer). The server stays single-layer (deployment manifest). **Divergence:**
`serve.graphs` ships in its final list shape but rejects >1 entry until route unification.
Still deferred: route unification + remote client (V2) and the auth model (V3).
## Summary

View file

@ -47,7 +47,14 @@ tests are inline in `omnigraph-config` (`src/lib.rs` test module); the
`GraphLocator` discriminant +
graph-identity tests are inline in `omnigraph-cli` (`src/main.rs`) plus
`tests/cli.rs` / `tests/system_local.rs`; the server embedded-only rejection tests
are in `omnigraph-server/tests/server.rs` (`multi_graph_startup`).
are in `omnigraph-server/tests/server.rs` (`multi_graph_startup`). The **global-first
layered config** (RFC-002 §4) — global-dir precedence, eager per-layer path
resolution, the merge engine + provenance (`src/merge.rs`), `load_layered_config_in`,
state-layer precedence, and error/warning layer-attribution — is inline in
`omnigraph-config`; `config view` / `omnigraph use` end-to-end tests are in
`omnigraph-cli/tests/cli.rs`. CLI tests pin `OMNIGRAPH_HOME` to an empty temp dir
(`tests/support/mod.rs`) so spawned binaries never read the developer's real global
config.
## Fixtures