Facts as a test suite: how every engine change is checked
128 expected facts, a ledger of known gaps that fails when a gap starts to hold, and a diff of every fact before and after each change. Why an analyzer needs more than unit tests.
Unit tests check that code does what its author meant. An analyzer has a harder problem: a change that is correct for the case its author had in mind can silently drop or invent facts somewhere else, in code nobody looked at. We treat the facts themselves as the thing under test.
The fact diff
Every pull request analyses 4 corpora twice, once with the base engine and once with the change: governance fixture, engine source, Express, Fastify. Every call, reference, control-flow edge, definition, use and taint flow is compared, category by category, counting duplicates. A fact the change loses fails the build. The only way past is an owner sign-off, given after the pull request explains every single lost fact.
Expected facts, written down
The conformance corpus holds 27 small programs, each a language feature or a known trap, with 128 expectations about the facts the engine must produce or must not produce. Taint cases marked for it are first executed in a sandbox, which proves the expected flow really happens before the engine is judged against it.
A ledger that cannot go stale
Some expectations describe things the engine cannot do yet. They live in a known-gaps ledger, each owned by an audit finding. The test fails when an expectation outside the ledger breaks, and it also fails when one inside the ledger starts to hold. So the ledger can never claim a gap that was quietly fixed, or hide a regression behind an old entry: it always describes the engine exactly.
| Check | State |
|---|---|
| Conformance expectations | 128 |
| Known gaps in the ledger | 0 |
| Audit findings fixed | 42 of 44 |
| Deferred design items | 2 |
| Tests passing | 2,355 |