Phase 3 done: exit review, implemented_phase = 3

P3-10 and P3-11 moved to P7-10 and P7-11 (executor model for async and
blocking host operations); semantic development paused until the E-S
smoke test is analysed
This commit is contained in:
dev committed 2026-10-04 17:06:45 +03:00
1 parent 6466b24285
commit d2932bd75a
4 files changed
+10 -8

No files matched your search

+2 -2
View File
@@ -120,5 +120,5 @@ Until Phase 6 delivers the source language, Aji runs use the condition `Aji/AIR`
| P0 | done; AIR format 0 frozen as the semantic baseline (spec 07 §8.7) |
| P1 | done (exit review in the phase file) |
| P2 | done (exit review in the phase file) |
| P3 | next |
| P4–P8 | not started |
| P3 | done (exit review in the phase file); P3-10, P3-11 moved to P7 |
| P4–P8 | not started; semantic development paused until the E-S smoke test is analysed (owner decision) |
+6 -5
View File
@@ -4,7 +4,7 @@ Non-normative. Part of the [implementation plan](README.md).
**Goal:** tasks that cannot outlive their scopes, ownership transfer through bounded channels, synchronized shared state, cooperative cancellation, and a deterministic scheduler.
**Out of scope (owner decision):** async I/O and its buffer claims (`E4303` stays reserved; P7-10); `RwLock`, several receivers and atomics (later RFCs). No further features are added to Phase 3.
**Out of scope (owner decision):** async I/O and its buffer claims (`E4303` stays reserved; P7-10), `thread.block` and a blocking pool (P7-11); `RwLock`, several receivers and atomics (later RFCs). No further features are added to Phase 3.
**Exit criterion:** `parallel_map` and `channel_transfer` examples run under deterministic and randomized schedules.
@@ -34,16 +34,16 @@ Non-normative. Part of the [implementation plan](README.md).
| P3-8 | done | Bounded and rendezvous channels with ownership transfer | P3-7 | interpreter + verifier | sender cannot use moved message (E2001); capacity 0 rendezvous test |
| P3-9 | done | Mutex with linear guards and the critical-section rule (E4304); RwLock deferred | P3-7 | interpreter + verifier | guard not `Send`; unlock consumes guard; E3002 on leaked guard |
| P3-10 | moved | Async I/O buffer claims: moved to P7-10 (owner decision; needs task-aware I/O) | P3-7 | verifier + runtime | E4303 accept/reject |
| P3-11 | todo | Blocking effect and blocking pool policy | P3-7 | spec 04 §18, runtime | `thread.block` from ordinary task handled per spec |
| P3-11 | moved | Blocking effect and blocking pool policy: moved to P7-11 (owner decision; one problem with task-aware I/O: not blocking the executor on blocking host APIs) |
| P3-12 | done | Runner: `seed:`/`schedules:`/`quantum:` headers (schedule budget kept separate from fuel); `--stress N`: seeds 0…N-1 × quanta 1 (forced yield), 2, 7 and the test's own, replay command on failure; slow consumers and cancellation during waits are covered by the run corpus; worker-count modes belong to native runtimes (P7) | P3-3 | `tools/conformance.zig` | stress mode selectable; failing seed printed for replay |
| P3-13 | done | Reference programs: parallel-map, channel transfer, tcp-echo with tasks | P3-8, P3-9 | `tests/conformance/phase3/run/program_*.air` | pass under `--stress` |
| P3-14 | todo | Phase exit review | all | plan status | exit criterion passes |
| P3-14 | done | Phase exit review | all | plan status | exit criterion passes |
## Conformance tests to add
Negative corpus entries owned by this phase: non-Send transfer, non-Share concurrent read, task escape. Plus E4101, E4302. Scheduler tests for every synchronization primitive (testing policy in AGENTS.md).
## Exit review (draft — closes when P3-11 is decided)
## Exit review
- Exit criterion met: `program_parallel_map` and `program_channel_transfer` (plus `program_tcp_echo_tasks`) run in the deterministic profile under randomized schedules: `schedules: 30` in the suite and `--stress 1000` (seeds 0…999 × quanta 1, 2, 7 and the test's own) without a failure.
- Decision records accepted and integrated: RFC 0011 (structured tasks, deterministic scheduler), RFC 0012 (waits and cancellation, channels, select, mutex); owner errata after implementation: `mutex<T>` always linear, `mutex.take` rules, E2002 after `send`.
@@ -54,4 +54,5 @@ Negative corpus entries owned by this phase: non-Send transfer, non-Share concur
- Agent Reference Bundle: 27 347 → 35 324 tokens (cl100k) over Phase 3 (+29.2 %), recorded per RFC in `docs/agent/history.json`.
- Moved out: P3-10 (async buffer claims, `E4303`) to P7-10. Deferred: `RwLock`, several receivers, atomics (Phase 5).
- Known limitations: the hosted profile runs tasks cooperatively on one thread and a blocking host I/O call blocks every task (spec 04 §36.1), so `program_tcp_echo_tasks` runs only in the deterministic profile; no systematic exploration yet (DPOR, Phase 5).
- Open: P3-11 (`thread.block` and a blocking pool) — proposed to move to P7 with task-aware I/O.
- Moved out with it: P3-11 (`thread.block`, blocking pool) to P7-11. Phase 3 delivers safe concurrency inside the Aji runtime, independent of an asynchronous host I/O model.
- Bundle growth of +29.2 % is the first substantial growth of semantic complexity; nothing is cut before the E-S smoke test measures whether mid and small models use the 35k-token bundle effectively.
+1
View File
@@ -23,4 +23,5 @@ Non-normative. Part of the [implementation plan](README.md).
| P7-7 | todo | Targets: Linux aarch64, macOS aarch64 | P7-5 | CI matrix | corpus passes on all three targets |
| P7-8 | todo | Parity runner: interpreter vs native on the full corpus | P7-5 | `zig build parity` | identical stdout and trap records |
| P7-10 | todo | Task-aware I/O (`io.read_start`, `io.write_start`, `io.wait`) and async buffer claims: buffer state `available → IN_FLIGHT → available`; access while `IN_FLIGHT` is `E4303` (moved from P3-10; needs an RFC) | P7-5 | RFC, verifier + runtime | E4303 accept/reject; deterministic completion order |
| P7-11 | todo | `thread.block` and a blocking pool: blocking host APIs run off the executor and complete by waking their task (moved from P3-11; with P7-10 forms the executor model task → async/blocking operation → native async I/O or blocking pool → completion → wake) | P7-10 | RFC, runtime | a blocking host call never stalls other tasks; deterministic completion order in the interpreter |
| P7-9 | todo | Phase exit review | all | plan status | exit criterion passes |
+1 -1
View File
@@ -8,7 +8,7 @@ pub const version = "0.0.0-dev";
/// Highest plan phase (docs/plan/README.md) whose features are implemented.
/// Conformance tests for later phases are reported as PENDING.
pub const implemented_phase: u8 = 2;
pub const implemented_phase: u8 = 3;
pub const diag = @import("diag.zig");
pub const air = @import("air.zig");