omnigraph/crates
Ragnor Comerford 9aa96cbb4b
Load and type-check stored queries at server boot, refusing breakage
At startup the server now loads each graph's stored-query registry,
type-checks every query against that graph's live schema, and refuses to
boot if any query references a type/property the schema doesn't have
(same posture as bad policy YAML) — so schema drift surfaces at the
deploy boundary, not silently at invocation. Non-blocking warnings are
logged. The validated registry is attached to the GraphHandle (the two
production sites previously held `queries: None`).

Loading (parse + key==symbol identity) happens at settings-build time
where the config is in scope; the schema type-check happens after each
engine opens (single mode in `open_single_with_queries`, multi mode in
`open_single_graph`). `open_with_bearer_tokens_and_policy` delegates
with an empty registry so its 18 test callers are unchanged; the public
`new_*` constructors are unchanged (only the private build path threads
the registry).

- ServerConfigMode::Single / GraphStartupConfig carry the loaded registry
- boot tests: valid registry boots; type-broken query refuses boot + names it

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:45:35 +02:00
..
omnigraph (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
omnigraph-cli feat: inline query strings in CLI and HTTP server (#110) 2026-05-29 13:41:54 +02:00
omnigraph-compiler (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
omnigraph-policy Add InvokeQuery Cedar action (coarse, graph-scoped) 2026-05-30 20:20:03 +02:00
omnigraph-server Load and type-check stored queries at server boot, refusing breakage 2026-05-30 20:45:35 +02:00