walker: schema-existence ERROR diagnostics (ADR-0027 step B)

`MatchedKind::Ident` now carries its `IdentSource`. A
post-walk pass over a structurally-valid parse flags a
matched `Tables` ident that is absent from the schema, or a
`Columns` ident absent from the table in scope, as an ERROR
diagnostic — the command parses but would fail at execution
(ADR-0027 §2). New behaviour: an unknown table / column used
to parse cleanly and fail only when run.

Column scope is resolved by one left-to-right pass over the
matched path (every command places its table ident before
the columns that belong to it); an unknown table clears the
scope, so its columns are not cascaded into a second
diagnostic. New catalog keys `diagnostic.unknown_table` /
`diagnostic.unknown_column`.
This commit is contained in:
claude@clouddev1
2026-05-19 07:15:58 +00:00
parent e22f933e02
commit 827b47f88f
9 changed files with 169 additions and 15 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ fn build_import(path: &MatchedPath) -> Result<Command, ValidationError> {
.map(|i| i.text.clone())
.unwrap_or_default();
let target = path
.find(|i| matches!(&i.kind, MatchedKind::Ident { role } if *role == "target"))
.find(|i| matches!(&i.kind, MatchedKind::Ident { role, .. } if *role == "target"))
.map(|i| i.text.clone());
Ok(Command::App(AppCommand::Import {
path: bare_path,