Why
The Verified Completions rule pack (docs/internals/verified-completions/rules/consistency-core.iql) and its test fixture were written in a design session that had no Rust toolchain. They are syntax-checked and linted, but have never run on the real engine. The expected query results in the fixture were derived by hand. Before we build any gateway code on top of this, we need to prove the rules actually work.
What to do
Done when
The fixture runs green against the real engine and a .iql.out snapshot is checked in. The retraction check at the end of the fixture must also pass: after deleting the m4 fact, the three "cycle" findings disappear and every other finding survives.
Notes for whoever picks this up
Two engine facts were already verified by reading the source, do not rediscover them the hard way:
Var != Var works on any type, including strings
Var < Var only works on ints and floats. On strings it silently evaluates to false, no error. That is why every ordered comparison in the pack runs on integer mirror columns (claim_num, constraint_num), with dates encoded as YYYYMMDD integers
Full context: docs/internals/verified-completions/HANDOFF.md and docs/internals/verified-completions/docs/REVIEW-GUIDE.md.
Why
The Verified Completions rule pack (
docs/internals/verified-completions/rules/consistency-core.iql) and its test fixture were written in a design session that had no Rust toolchain. They are syntax-checked and linted, but have never run on the real engine. The expected query results in the fixture were derived by hand. Before we build any gateway code on top of this, we need to prove the rules actually work.What to do
cargo build --release), start the server, open the CLIdocs/internals/verified-completions/quickstart/hello-consistency.iql. Expected: one conflict reported in both orders (a,b) and (b,a), plus a.whyproof tree.load docs/internals/verified-completions/rules/consistency-core.iql, then rundocs/internals/verified-completions/tests/consistency-core-fixture.iqlareach(recursion where the attribute is a variable). If the engine rejects it, generate one specialized rule per attribute at load time insteadmember_tally(an aggregation result used by another rule). Same fallback: restructure if the engine objects.iql.outsnapshot using the existing harness (tests/example_verification.rsconventions)docs/internals/verified-completions/tools/lint_iql.pyafter every edit to the packDone when
The fixture runs green against the real engine and a
.iql.outsnapshot is checked in. The retraction check at the end of the fixture must also pass: after deleting the m4 fact, the three "cycle" findings disappear and every other finding survives.Notes for whoever picks this up
Two engine facts were already verified by reading the source, do not rediscover them the hard way:
Var != Varworks on any type, including stringsVar < Varonly works on ints and floats. On strings it silently evaluates to false, no error. That is why every ordered comparison in the pack runs on integer mirror columns (claim_num,constraint_num), with dates encoded as YYYYMMDD integersFull context:
docs/internals/verified-completions/HANDOFF.mdanddocs/internals/verified-completions/docs/REVIEW-GUIDE.md.