From b472d33273c82036e9904d1a3067b7c3f865338f Mon Sep 17 00:00:00 2001 From: "A.Shakhmatov" Date: Tue, 13 Oct 2026 00:16:26 +0300 Subject: [PATCH] docs: provisional Phase 6 exit review, defer contracts and literal twins --- docs/plan/README.md | 1 + docs/plan/phase-6-source-language.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/plan/README.md b/docs/plan/README.md index 0590832..d00e8cb 100644 --- a/docs/plan/README.md +++ b/docs/plan/README.md @@ -159,6 +159,7 @@ At the owner’s request (2026-10-06), reusable std APIs were implemented in a s | P2 | done (exit review in the phase file) | | P3 | done (exit review in the phase file); P3-10, P3-11 moved to P7 | | P6A | done (exit review in `phase-6-source-language.md`; P6A-9 [results](../evaluation/results/2026-10-05-p6a-9.md)): the agent-facing source language over AIR is the architecture | +| P6 | done, provisional (exit review in `phase-6-source-language.md`); contracts (P6-13) and literal same-code twins (P6-14) deferred pending owner decisions (RFC 0039, Q-053) | | P4 | done (exit review in the phase file) | | P5 | done (exit review in the phase file): atomics through every layer; litmus 20/20 exact against the independent oracle; race detector on every run test | | B1 | the first held-out benchmark after Phase 5 (owner decision, 2026-10-06): pre-registration [`b1-heldout-plan.md`](../evaluation/b1-heldout-plan.md) Accepted; private side: independent author → references → symmetric calibration → freeze → 162 runs | diff --git a/docs/plan/phase-6-source-language.md b/docs/plan/phase-6-source-language.md index 1523ac3..7b4fa09 100644 --- a/docs/plan/phase-6-source-language.md +++ b/docs/plan/phase-6-source-language.md @@ -140,7 +140,9 @@ Lowering layers (P6A-3/4), each with accepted (golden AIR), rejected (`E7xxx`) a | 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-12 | doing (advice/collection delivered; dev measurement pending) | Structured source repair advice and independent diagnostic collection; owner proposal 2026-10-09 | P6-2/4/7 | [repair plan](../design/source-diagnostic-repair.md), spec 15 §10, parser/lowering and CLI | advice applicability and additive fields specified/tested; independent item/body errors collected without partial AIR or cascades; bundle growth and public dev effect measured | -| P6-10 | todo | Phase exit review | all | plan status | exit criterion passes | +| P6-10 | done (provisional, owner confirmation pending) | Phase exit review | all | plan status | exit criterion passes (exit review below) | +| P6-13 | todo (deferred out of Phase 6) | Contracts, split from P6-6: blocked on RFC 0039 (Draft), Q-054, Q-055 owner decisions | owner | frontend + verifier | as P6-6 | +| P6-14 | todo (deferred out of Phase 6) | Literal same-code source twins, split from P6-7: blocked on the Q-053 criterion decision | owner | `tools/source_reject_twins.py` | `--require-complete` passes or Q-053 amends the criterion | The [standard-library track](standard-library.md) implements nineteen compiler-pinned modules and qualified standard enum names. STD-3/RFC 0021 completes P6-3 with explicit manifest source mapping, acyclic linking, direct qualified names, imported struct literals and task workers. Dependency fetching/resolution is separate package work; STD-4/RFC 0022 completes explicit generics and structural constraints. STD-5/RFC 0023 adds whole-value linear structs/enums/fixed arrays, complete unpack/match, explicit exchange and ownership-preserving allocation failure through all layers (spec 15 §16). STD-6a/b/RFC 0024 resolves Q-036 with initialized buffer and safe std.vec, explicit growth, returned failure ownership and draining (spec 15 §17). STD-6c/RFC 0025 adds safe owning Deque with existing source primitives. STD-6d.1/RFC 0026 adds pure std.hash; STD-6d.2/RFC 0028 adds safe owning U64Map after the explicit error_values prerequisite (RFC 0027). STD-6d.3/RFC 0029 adds explicit static function parameters for general hash/equality/order operations with existing AIR calls/workers. STD-6d.4/RFC 0030 implements the general owning-key std.hashmap contract; its full GC/stress validation passes and Q-037 is resolved. STD-6d.5/RFC 0031 implements general owning std.hashset with duplicate input return; its conformance, GC/schedule, CLI and documentation checks pass. STD-6d.6/RFC 0032 implements safe owning std.heap with explicit order; conformance, GC/schedule, CLI and documentation checks pass. STD-7a/RFC 0033 implements bounded std.io composition with explicit progress, resource loans and exact effects; conformance, GC/schedule, CLI and documentation checks pass. STD-7b/RFC 0034 implements safe owning buffered file adapters with explicit finish/discard and first-error/no-retry behavior; conformance, GC/schedule, CLI and documentation checks pass. STD-7c/RFC 0035 adds pure caller-buffer lexical paths and Copy component ranges; conformance, GC/schedule, CLI and documentation checks pass. The owner adopts STD-0..7 as an intermediate foundation and resumes language work (2026-10-07); remaining std system/service milestones stay in the backlog. P6-11 implements explicit borrowed returns over the existing AIR; RFC 0036 remains Proposed pending owner adoption (Q-034). These increments do not complete Phase 6. @@ -875,3 +877,10 @@ tests. Deep direct-query tests are distinguished from full control lowering; repeated nested-loop scans retain a quadratic worst case. Nested-block checks still fail in `blockBodyWant`/`expr`: shared control lowering, other callbacks, Q-060 full per-step GC and Phase 6 exit review remain open. + + +## Phase 6 exit review (2026-10-13, provisional) + +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. This rescoping is an agent proposal and needs owner confirmation; reverting means restoring P6-6/P6-7 as blocking.