omnigraph/crates/omnigraph-server
Ragnor Comerford f3331edd51
fix(server): reject remote graph entries at config load
omnigraph-server serves embedded graphs only (RFC-002 §3). Classify each served
graph with the typed `config.resolve_graph(...).is_remote()` — the same locator
classifier the CLI dispatches on — and `bail!` early with a clear "embedded
graphs only" error if a graph sets `server:` or a remote `http(s)://` `uri:`,
instead of accepting it and failing confusingly later at `Omnigraph::open`.

Both modes covered: Single (hoist `selected` above the URI resolution and check
before `cli_uri` is moved) and Multi (per entry, after the `GraphId` check). A new
`ensure_embedded` helper keeps the message in one place. No config-crate change
(reuses existing public `resolve_graph`/`is_remote`); embedded `storage:`/`uri:`
entries pass through unchanged (positive guard test added).

Updates the `server_settings_can_resolve_named_target` lib test, which asserted
the old behavior (server resolves a remote named target); it now uses an embedded
target — the remote case is rejected and covered by
`single_mode_rejects_named_remote_graph`. Turns the previous commit's four red
tests green.
2026-06-03 17:41:38 +02:00
..
examples feat: inline query strings in CLI and HTTP server (#110) 2026-05-29 13:41:54 +02:00
src fix(server): reject remote graph entries at config load 2026-06-03 17:41:38 +02:00
tests fix(server): reject remote graph entries at config load 2026-06-03 17:41:38 +02:00
Cargo.toml refactor: extract omnigraph-api-types crate from omnigraph-server 2026-06-03 11:14:19 +02:00