docs: refine P6-7 scope and same-code breakdown
ci / build (ubuntu-latest) (push) Failing after 37m5s
ci / build (macos-latest) (push) Canceled after 0s
ci / extended (push) Failing after 42m4s

This commit is contained in:
dev committed 2026-10-13 12:38:03 +03:00
1 parent 18d2976f24
commit 4bf92b23d6
2 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -386,7 +386,7 @@ P6-7 rejection-twin work reproduced accepted source that returns the cancelled h
## Q-053 — P6-7's literal same-code exit criterion and the source boundary ## Q-053 — P6-7's literal same-code exit criterion and the source boundary
P6-7 requires every conformance rejection to have a source twin with the same code. Spec 15 §10 instead requires fully source-decided type errors to use E7xxx, and malformed generated AIR/SSA/CFG to report E7900 as compiler defects. Spec 15 §1/§9 also makes SSA, CFG, local placement, lexical borrow ends and feature headers generated mechanics. Examples: AIR lossy widening is E1002 but source is E7005; missing borrow-return `from` is E2102 in AIR but E7006 in source (§19); explicit branch arity, unsupported AIR versions and duplicate feature headers have no source operation. Uninitialized locals and deliberately invalid proven-index fact forms likewise have no implemented source spelling. P6-7 originally required every conformance rejection to have a source twin with the same code; that criterion is now tracked in P6-14 (2026-10-13 decision below). Spec 15 §10 instead requires fully source-decided type errors to use E7xxx, and malformed generated AIR/SSA/CFG to report E7900 as compiler defects. Spec 15 §1/§9 also makes SSA, CFG, local placement, lexical borrow ends and feature headers generated mechanics. Examples: AIR lossy widening is E1002 but source is E7005; missing borrow-return `from` is E2102 in AIR but E7006 in source (§19); explicit branch arity, unsupported AIR versions and duplicate feature headers have no source operation. Uninitialized locals and deliberately invalid proven-index fact forms likewise have no implemented source spelling.
The exhaustive inventory in `tools/source_reject_twins.py` keeps these rows visible: same-code pairs, audited source-error analogues, AIR-only cases and pending audits. Only verified same-code pairs satisfy the current criterion; the other categories are not exclusions or completion evidence. The owner needs to decide how the final phase review should account for mandatory E7xxx translation and generated-only AIR defects, without weakening existing AIR tests, exposing raw mechanics in source, or changing diagnostics solely to satisfy coverage. Until then the original criterion and P6-7's doing status remain unchanged; unreviewed and authorable twins can still be completed. The exhaustive inventory in `tools/source_reject_twins.py` keeps these rows visible: same-code pairs, audited source-error analogues, AIR-only cases and pending audits. Only verified same-code pairs satisfy the current criterion; the other categories are not exclusions or completion evidence. The owner needs to decide how the final phase review should account for mandatory E7xxx translation and generated-only AIR defects, without weakening existing AIR tests, exposing raw mechanics in source, or changing diagnostics solely to satisfy coverage. Until then the original criterion and P6-7's doing status remain unchanged; unreviewed and authorable twins can still be completed.
@@ -396,6 +396,8 @@ Proposed criterion, for owner decision: retain every AIR rejection test; for eac
2026-10-09: after the Q-058 size correction, all 205 public AIR rejection files are classified: 96 verified same-code pairs, 45 E7xxx analogues, 63 AIR-only cases and one `source_early` analogue. The last category retains an authorable cyclic-array declaration whose AIR budget rejects E5101 while source finite-layout validation rejects E1003 before lowering. Both codes, facts, declaration positions and reviewed artifact fingerprints are checked; it contributes no same-code coverage. The final criterion must also account explicitly for such earlier verifier-code rejections, rather than label their authorable shape AIR-only or change diagnostics for coverage. No policy is adopted; `--require-complete` still exits 1. 2026-10-09: after the Q-058 size correction, all 205 public AIR rejection files are classified: 96 verified same-code pairs, 45 E7xxx analogues, 63 AIR-only cases and one `source_early` analogue. The last category retains an authorable cyclic-array declaration whose AIR budget rejects E5101 while source finite-layout validation rejects E1003 before lowering. Both codes, facts, declaration positions and reviewed artifact fingerprints are checked; it contributes no same-code coverage. The final criterion must also account explicitly for such earlier verifier-code rejections, rather than label their authorable shape AIR-only or change diagnostics for coverage. No policy is adopted; `--require-complete` still exits 1.
2026-10-13: the owner confirmed moving the literal same-code criterion out of Phase 6 into P6-14; P6-7 is done for diagnostic source mapping. This supersedes the earlier statements that P6-7 remains doing. The alternative criterion above is still not adopted, and Q-053 remains open for that decision. The current inventory has 206 classified rows: 97 verified same-code pairs, 45 E7xxx analogues, one source-early analogue and 63 AIR-only cases. Deferral does not count the latter 109 rows as same-code completion.
## Q-054 — Executable contract obligations and invariant boundaries ## Q-054 — Executable contract obligations and invariant boundaries
P6-6 requires contracts and their four audit statuses, but spec 13 §1/spec 08 §8 do not define predicate purity, snapshot/result lifetime, boundary coverage or a proof calculus. AIR has no contract table. Current probes at `94414da` show identical audit reports for mandatory/bypassable assertions, effects-empty mutation and ambient task.cancelled observation, and E3001 after consuming an observed owner. New contract headers also need an AIR0 rejected-code audit: an unfeatured header currently reports E0001, outside §8.7's E0004/E0006 exceptions; Q-055 records the conflict with §8.1. P6-6 requires contracts and their four audit statuses, but spec 13 §1/spec 08 §8 do not define predicate purity, snapshot/result lifetime, boundary coverage or a proof calculus. AIR has no contract table. Current probes at `94414da` show identical audit reports for mandatory/bypassable assertions, effects-empty mutation and ambient task.cancelled observation, and E3001 after consuming an observed owner. New contract headers also need an AIR0 rejected-code audit: an unfeatured header currently reports E0001, outside §8.7's E0004/E0006 exceptions; Q-055 records the conflict with §8.1.
+2 -2
View File
@@ -135,7 +135,7 @@ Lowering layers (P6A-3/4), each with accepted (golden AIR), rejected (`E7xxx`) a
| P6-4 | done (RFC 0022 Implemented) | Type checking and monomorphized generics with structural constraints (`Copy`, `Send`, `Share`, `Freeze`, `Local`) | P6-3 | `src/frontend/generics.zig`, spec 15 §15 | generic code instantiates deterministically; constraint violations diagnosed | | P6-4 | done (RFC 0022 Implemented) | Type checking and monomorphized generics with structural constraints (`Copy`, `Send`, `Share`, `Freeze`, `Local`) | P6-3 | `src/frontend/generics.zig`, spec 15 §15 | generic code instantiates deterministically; constraint violations diagnosed |
| P6-5 | doing | Lowering to AIR: control flow, `?`, `defer` cleanup edges, borrow blocks, task scopes | P6-4 | `src/frontend/lower.zig` | lowered AIR verifies; lowering is a pure function (same input ⇒ same AIR bytes) | | P6-5 | doing | Lowering to AIR: control flow, `?`, `defer` cleanup edges, borrow blocks, task scopes | P6-4 | `src/frontend/lower.zig` | lowered AIR verifies; lowering is a pure function (same input ⇒ same AIR bytes) |
| P6-6 | moved to P6-13 (owner confirmed 2026-10-13; spec gate: Q-054, RFC 0039 Draft) | Contracts: `requires`/`ensures`/invariants → contract table; status classification | P6-5 | frontend + verifier | each contract reported as PROVEN_STATICALLY / CHECKED_AT_RUNTIME / ASSUMED_UNSAFE / UNPROVEN | | P6-6 | moved to P6-13 (owner confirmed 2026-10-13; spec gate: Q-054, RFC 0039 Draft) | Contracts: `requires`/`ensures`/invariants → contract table; status classification | P6-5 | frontend + verifier | each contract reported as PROVEN_STATICALLY / CHECKED_AT_RUNTIME / ASSUMED_UNSAFE / UNPROVEN |
| P6-7 | done for the source-error scope; literal same-code criterion moved to P6-14 (owner confirmed 2026-10-13, Q-053) | Source spans in diagnostics for verifier errors on lowered AIR | P6-5 | `src/diag.zig`, lowering | every conformance reject test has a source-level twin with the same code | | P6-7 | done for diagnostic source mapping; literal same-code criterion moved to P6-14 (owner confirmed 2026-10-13, Q-053) | Source spans in diagnostics for verifier errors on lowered AIR | P6-5 | `src/diag.zig`, lowering | verifier diagnostics on lowered `.aji` carry mapped source positions; the original exhaustive same-code twin criterion is tracked in P6-14 |
| P6-8 | done | Formatter for implemented source syntax | P6-2 | `aji fmt`, spec 15 §11 | token/comment/declaration preservation; idempotence, identical AIR and CLI write/check tests | | P6-8 | done | Formatter for implemented source syntax | P6-2 | `aji fmt`, spec 15 §11 | token/comment/declaration preservation; idempotence, identical AIR and CLI write/check tests |
| P6-9 | done | Port reference programs and examples to `.aji` | P6-5 | `tests/conformance/source/programs/`, `examples/` | all five source/AIR reference pairs and every example source/package pass | | P6-9 | done | Port reference programs and examples to `.aji` | P6-5 | `tests/conformance/source/programs/`, `examples/` | all five source/AIR reference pairs and every example source/package pass |
| P6-11 | done (implementation; RFC 0036 Proposed) | Source functions/calls returning borrows with explicit `from` origin; Q-034 | P6-3/4 | spec 15, binding/call/return lowering, Quick Reference and source/AIR conformance | origin/lifetime and temporary-end rules specified; valid/rejected returned views use existing verifier/interpreter semantics | | P6-11 | done (implementation; RFC 0036 Proposed) | Source functions/calls returning borrows with explicit `from` origin; Q-034 | P6-3/4 | spec 15, binding/call/return lowering, Quick Reference and source/AIR conformance | origin/lifetime and temporary-end rules specified; valid/rejected returned views use existing verifier/interpreter semantics |
@@ -883,4 +883,4 @@ Q-060 full per-step GC and Phase 6 exit review remain open.
Exit criterion (all reference programs and `examples/` authored as `.aji` and passing the corpus through the frontend): met. All five source/AIR reference pairs and every example pass; 1,793/1,793 conformance cases, unit tests and `zig fmt --check` pass at `f419063`; source construct coverage is 121/121 (519 run/accept, 904 reject tests). Codex's iterative lowering of block/if/match/select control is committed (`f419063`); its state-equivalence test tolerates the frozen reference's leaked arm scope on error exits, which is unobservable because `function()` resets scopes. Exit criterion (all reference programs and `examples/` authored as `.aji` and passing the corpus through the frontend): met. All five source/AIR reference pairs and every example pass; 1,793/1,793 conformance cases, unit tests and `zig fmt --check` pass at `f419063`; source construct coverage is 121/121 (519 run/accept, 904 reject tests). Codex's iterative lowering of block/if/match/select control is committed (`f419063`); its state-equivalence test tolerates the frozen reference's leaked arm scope on error exits, which is unobservable because `function()` resets scopes.
Not met and deferred, not claimed: P6-6 (contracts, RFC 0039 Draft) becomes P6-13 and P6-7's literal same-code criterion (97/206 verified, 108 classified as E7xxx analogues or AIR-only, Q-053) becomes P6-14. Q-060 (full per-step GC validation) and Q-061 (remaining lowering-depth callbacks) stay open as hardening, outside the exit criterion. The rescoping was proposed by the agent and confirmed by the owner on 2026-10-13. Not met and deferred, not claimed: P6-6 (contracts, RFC 0039 Draft) becomes P6-13 and P6-7's literal same-code criterion (97/206 verified; 45 E7xxx analogues, one source-early analogue and 63 AIR-only cases do not meet it, Q-053) becomes P6-14. Q-060 (full per-step GC validation) and Q-061 (remaining lowering-depth callbacks) stay open as hardening, outside the exit criterion. The rescoping was proposed by the agent and confirmed by the owner on 2026-10-13.