Compiler correctness is verified by deterministic fixture tests. Given a known GOV input, the compiler MUST produce the expected JSON output.
Each fixture directory MUST contain:
Optional: any additional .md files referenced by the scope.
| File | Purpose |
|---|---|
| CANON.md | Scope governance with axiom and inherits |
| VOCAB.md | Term definitions |
| README.md | Scope description |
Discover: Walk ~/.canonic/tests/fixtures/, each dir with CANON.md is a fixture Compile: Call build-surfaces on fixture dir into tempdir Strip: Remove volatile fields (_generated timestamp, _tier) Diff: Compare JSON output against ~/.canonic/tests/expected/{fixture}/CANON.json Report: Pass/fail per fixture, exit 1 on any failure
These fields change between runs and MUST be stripped before comparison:
| *TESTS | SPEC | TOOLCHAIN* |