chore(wave11): plan execution-path backfill, reserve error codes, update area plans

- Audit roadmap vs TASKS (D-033); scope Wave 11 to M-FUNCTIONAL-03, M-TIME-03,
  M-ASYNC-04/05, S-IO-03/04, S-RUNTIME-02/03 (D-034..D-036)
- Schedule VoidForge upstream requests after Wave 11 (D-037)
- Persist planner output, PREFLIGHT findings and contract addendum (D-038)
- Add AsyncErrorCode::closed, IoErrorCode::sync_failed,
  RuntimeErrorCode::{self_join, shutdown_incomplete}
- Update Functional/IO/Runtime area plans and MIGRATION per C-13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 5.5 committed 2026-11-29 18:31:14 +03:00
1 parent 38436b18c8
commit 7f95f89d52
16 files changed
+1856 -40

No files matched your search

+16 -7
View File
@@ -74,9 +74,11 @@ semantics avoid requiring every dispatch to drain a descriptor completely; the f
budget can yield while data remains ready. This follows the
[Linux epoll interface](https://man7.org/linux/man-pages/man7/epoll.7.html).
One driver thread owns interest updates and descriptor generations. Producers submit
bounded control messages and wake it through eventfd; an embedder may drive bounded
`poll_once` turns instead. Dispatch up to 64 ready descriptors and 64 KiB/direction per
The Driver owns no thread. One thread at a time runs a `poll_once` turn (the poll owner)
and owns interest updates and generations; a concurrent caller gets `busy` without
touching descriptors. Producers submit bounded control messages and wake the owner
through eventfd. Runtime or the embedder supplies the thread (`Driver::run`,
`pump_until`). Dispatch up to 64 ready descriptors and 64 KiB/direction per
descriptor per turn before yielding. Enable writable interest only with pending writes
to avoid idle busy loops. HUP/ERR still trigger final read/error inspection. Async
completion tickets transfer continuations to the supplied executor outside driver locks.
@@ -89,7 +91,10 @@ integer directly. Socket connect completion checks the socket error state; accep
obey the same fairness/admission budget. Platform-specific endpoint conversion remains
an IO/Net adapter detail until the Net endpoint contract is integrated.
Files initially use a bounded native blocking worker pool. Positional pread/pwrite
Files initially use a bounded native blocking worker pool, started explicitly by
`start_file_workers()` or stepped by `run_file_work()`. Workers run only the syscall (or
an injected syscall shim, the single documented exception) and queue its result;
completions are delivered only by a poll turn. Positional pread/pwrite
avoids shared offset races; default writes/syncs for one file are serialized in admission
order, and reads expose explicit offsets. Worker ownership retains descriptor and buffer
until the syscall returns. Cancelled queued work is removed before execution; an active
@@ -116,8 +121,12 @@ Only terminal delivery is arbitrated once; no callback is delivered merely becau
arrived while backend access or outcome classification was still pending.
Driver shutdown closes admission, cancels queued requests, asks active requests to
stop, drains readiness/control/completion lanes, joins file workers, then releases
descriptors/wake resources. It must keep the executor alive until all completion tickets
stop, waits for the poll owner and in-flight syscalls, drains readiness/control/completion
lanes, joins file workers, then closes operation descriptors. Epoll and wake descriptors
close in the backend destructor. Blocking teardown runs in `Driver::~Driver`; destruction
on a file worker or inside a poll turn is a programmer error. `File::close_and_join`
returns `incomplete_shutdown` on expiry and retains the fd and buffers; a dropped File
closes its fd after its last in-flight request drains. It must keep the executor alive until all completion tickets
drain. `close_and_join` cannot free buffers when its own deadline expires; return an
incomplete-shutdown report through the owning driver and retain work. Blocking joins
are off-driver/off-worker operations; embedded drivers pump until their scopes join.
@@ -151,7 +160,7 @@ are not owned by this document.
| S-IO-01 | P1 / Async operation ownership and Time clock gates | Portable transfer/error/driver API, buffer leases, descriptor and quota ownership | Mock backend completes/stops in every ordering with exactly one result and no borrowed-buffer escape / astra_implementer |
| S-IO-02 | P1 / S-IO-01 | Level-triggered epoll driver, wake/control path, generation-safe close and stream operations | Fragmentation/EAGAIN/EINTR/HUP/fd reuse and full queues do not lose completion or busy-spin / astra_implementer |
| S-IO-03 | P2 / S-IO-01 | Bounded positional file workers, serialization, sync and active-cancel handling | Short writes preserve progress; active timeout retains buffers; sync success/failure after stop remains authoritative in the sole result / astra_implementer |
| S-IO-04 | P2 / S-IO-02, S-IO-03 | Embedded pumping, joined shutdown, optional System/Net adapters | Shutdown during pending socket/file work retains resources; no IO→Runtime/Net dependency / sol_implementer |
| S-IO-04 | P2 / S-IO-02, S-IO-03 | Embedded pumping, joined shutdown, SystemAsync conformance (Net adapter deferred: Net has no IO use) | Shutdown during pending socket/file work retains resources; no IO→Runtime/Net dependency / sol_implementer |
| S-IO-05 | P3 / S-IO-04; performance harness | Optional io_uring capability/backend gate and portability conformance specification | Same tests pass; denied/unsupported capability falls back only before submission; profile evidence justifies enablement / astra_implementer |
## Validation, measurements and migration