omnigraph/crates
Ragnor Comerford 03ff9db1b3
fix(config): gate unknown-field strictness on version via serde_ignored
`#[serde(deny_unknown_fields)]` was applied unconditionally as a struct
attribute, so the `version` discriminator did not actually gate strictness: a
legacy (no-`version:`) config was wrongly rejected for any unrecognized key,
contradicting the documented contract (RFC-002 §3: no version = legacy-lenient,
`version: 1` = strict) and the code's own comments.

Make strictness a function of `version`, decided at one point in
`load_config_in`: parse once via `serde_ignored` (collecting ignored fields at
all depths), then reject unknowns only under `version: 1`; legacy tolerates them
(restoring the pre-existing behavior). Drop `deny_unknown_fields` from the two
legacy-spanning structs (`OmnigraphConfig`, `TargetConfig`) and keep it on the
v1-only typed blocks (`StorageBlock`, `ServerEntry`), which have no legacy form.
This removes the double-parse (`check_config_version` is gone — the version is
read from the parsed struct) and makes v1 strictness comprehensive: a misspelled
nested key (e.g. under `cli:`) now errors instead of being silently dropped.

Turns the previous commit's regression test green and pins v1 comprehensive
strictness.
2026-06-03 16:26:49 +02:00
..
omnigraph style: apply rustfmt across the workspace 2026-06-03 15:48:47 +02:00
omnigraph-api-types style: apply rustfmt across the workspace 2026-06-03 15:48:47 +02:00
omnigraph-cli style: apply rustfmt across the workspace 2026-06-03 15:48:47 +02:00
omnigraph-compiler fix(optimize): skip blob-bearing tables to avoid Lance compaction crash (#138) 2026-06-02 17:12:00 +02:00
omnigraph-config fix(config): gate unknown-field strictness on version via serde_ignored 2026-06-03 16:26:49 +02:00
omnigraph-policy fix(optimize): skip blob-bearing tables to avoid Lance compaction crash (#138) 2026-06-02 17:12:00 +02:00
omnigraph-queries style: apply rustfmt across the workspace 2026-06-03 15:48:47 +02:00
omnigraph-server style: apply rustfmt across the workspace 2026-06-03 15:48:47 +02:00