Draft specification, RFCs, reference registries and examples, plus the reference-implementation skeleton: build.zig, diagnostic envelope with error-code registry synced to docs, aji CLI, conformance runner with seed tests, CI and contributor docs.
1.7 KiB
1.7 KiB
Conformance suite
Run with zig build conformance (add -- --json for JSON Lines, -- --filter <substring> to narrow).
Layout
tests/conformance/
phase<N>/accept/*.air modules a conforming verifier MUST accept
phase<N>/reject/*.air modules a conforming verifier MUST reject
phase<N> is the roadmap phase (docs/roadmap/implementation-plan.md) that first requires the test to pass.
Test header
Every test starts with a block of ; lines. Keys:
| Key | Required | Value |
|---|---|---|
expect |
yes | accept, or reject followed by one or more codes from docs/reference/error-codes.md |
phase |
yes | roadmap phase number |
spec |
yes | spec section that justifies the expectation |
Header lines without a key: are free-form description. The runner blanks the header before handing the module to the pipeline, so line numbers in diagnostics are unchanged and the AIR grammar does not need to know about test metadata.
reject compares the exact multiset of error codes. Listing a code twice means two diagnostics with that code are expected.
Outcomes
| Outcome | Meaning |
|---|---|
PASS |
result matches expect |
FAIL |
result differs, or the header is malformed; the run exits 1 |
PENDING |
the pipeline stage needed for this input is not implemented yet |
Rules
- Every verifier rule gets at least one
acceptand onerejecttest (AGENTS.md, testing policy). - One defect per
rejecttest. A test that triggers several unrelated errors is hard to repair against. - Keep tests minimal: the smallest module that exhibits the rule.
- Text AIR syntax in the seed tests is provisional until the text AIR grammar is specified (Phase 0, task P0-1). Update the tests when the grammar lands.