docs(wave11): record PREFLIGHT-2 findings and contract amendment R2 (D-040)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 5.5 committed 2026-11-29 18:57:11 +03:00
1 parent a8a9249101
commit 99203ce1f3
5 files changed
+262 -3

No files matched your search

+1
View File
@@ -89,3 +89,4 @@ execution without pausing between waves). They are not new user approvals.
| D-038 | Wave 11 contracts adopted from `tasks/W11-PLAN-OUTPUT.md` as amended by `tasks/W11-PLAN-REV1-OUTPUT.md` after PREFLIGHT `tasks/W11-PREFLIGHT-OUTPUT.md` (CHANGES_REQUIRED: F1 P1, F2–F13 P2, P3 list). Accepted D-W11-01..04, 06..15; D-W11-05 modified per F9 (S-IO-03/opus owns the bounded shutdown core and poll-owner exclusion; S-IO-04/sonnet adds thin wrappers, `pump_until`, conformance). Root resolutions for F1 (file workers never call executors/user code except the injected syscall shim; `~Driver` is the only blocking teardown; destruction on a worker/inside a poll turn terminates with a diagnostic), F2 (epoll/eventfd close in backend destructor; `wake()` after shutdown is a no-op), F3–F6 (phase renumbering, per-call shutdown budgets, teardown in `~HostCore`, embedded borrowed resources never shut down), F7–F13 as in the addendum. Area plans `Functional.md`, `Runtime.md`, `IO.md` and `MIGRATION.md` updated per C-13. A1/B1 (Functional/Timer) may start before the PREFLIGHT re-review because the P1 is confined to IO/Runtime; re-review findings on F8/F12 are applied as corrections. | C-03–C-06, C-13; D-029 |
| N-001 | Note (not a decision of this session): the VoidForge session reports (2026-11-29, Forge D46) that the user granted permission to distribute VoidLibrary with VOID Forge, including Forge-motivated additions, with no relicensing. VoidLibrary still has no LICENSE file; any license file or wording remains a user decision to be confirmed directly in a VoidLibrary session. | Relayed by peer session; not user input in this session |
| D-039 | User reconfirmed in this session (2026-11-29, "i allow pushing to remote") that pushing to `origin` is allowed; consistent with D-032 (push verified `main` and active feature branches). `main` is pushed only after a wave is verified and merged, keeping it green for VoidForge, which tracks remote `main`. | CONFIRMED by user |
| D-040 | PREFLIGHT-2 (`tasks/W11-PREFLIGHT-2-OUTPUT.md`) returned CHANGES_REQUIRED with N1–N6 (P2) and P3 lines, no P0/P1. Root resolutions are the mandatory amendment `tasks/W11-CONTRACT-R2.md` (destruction blocks until complete; embedded ManualExecutor pumping; shutdown polling/loop rules; File fd state machine; channel timer callbacks use shared waiter state; EventBus destruction gating). A1/B1 continue with documentation-only corrections. The re-review of R2 happens on the B2/B3/B4/A2/A3 specs before each dispatch. | C-03–C-06; D-038 |
@@ -0,0 +1,95 @@
# Wave 11 contract amendment R2 (root resolutions of PREFLIGHT-2)
Source findings: [W11-PREFLIGHT-2-OUTPUT](W11-PREFLIGHT-2-OUTPUT.md). Base contracts:
[W11-PLAN-OUTPUT](W11-PLAN-OUTPUT.md) amended by [W11-PLAN-REV1-OUTPUT](W11-PLAN-REV1-OUTPUT.md).
These rules are MANDATORY text for the B2, B3, B4, A2, A3, A4 specs (decision D-040). Where this
file and earlier documents disagree, this file wins.
## N1 — Host destruction and shutdown budgets (B3/B4)
- `~HostCore` blocks until shutdown is complete: it loops an internal no-deadline shutdown
(equivalent to repeated `shutdown_blocking({})` ignoring the total-timeout cap) until
`complete == true`. Documented: "destruction blocks until complete".
- `poll_shutdown(Async::OperationOptions = {})` takes options; every shutdown entry point
(`shutdown_blocking`, `poll_shutdown`, `shutdown_pumping`) uses the same per-call budget
`min(options.deadline, deadline_after(clock, total_timeout))`.
- The budget test uses an already-expired caller deadline (or manual-clock deadline) with
`shutdown_blocking`/`poll_shutdown`, so expiry is observable.
- Waiting phases that return `complete=false` on call-deadline expiry: 2, 4, 5, 6, 8, 9 (P3-1).
## N2 — Embedded mode (B3/B4)
- `shutdown_blocking` returns `RuntimeErrorCode::invalid_argument` when the Host's executor has
no background workers (`!has_background_workers()`); `shutdown_pumping` in managed (owned
executor) mode returns `invalid_argument` (the reactor owns polling).
- `~HostCore` in embedded mode: if the borrowed executor is a `ManualExecutor`
(`dynamic_cast`), it loops `shutdown_pumping(manual)` until complete; otherwise, if shutdown is
not already complete, it prints a diagnostic and calls `std::terminate` (documented
programmer error: embedded Host destroyed before shutdown completed).
- The "destroyed on a Runtime worker" terminate check applies only to OWNED executors/reactor/
IO workers; never to a borrowed executor's `is_executor_thread()`.
## N3 — Who polls during shutdown (B2, A4, B3/B4)
- B2: every poll turn drains cancels, control messages and file completions BEFORE any
stop-flag early return. `begin_shutdown` sets the existing stopping flag (admission closed).
While stopping (but not yet shut down), a turn with no work waits in `epoll_wait` up to
`max_wait` (wake fd stays registered) instead of returning immediately; it must not spin.
- B2: after shutdown completes, `poll_once` returns 0 without touching any fd (F2), and
`shutdown_complete()` is true; library loops must exit on it (below).
- B2: `poll_once` checks the thread-local polling marker before `try_lock(poll_mu_)`; a
reentrant call from inside a turn returns `busy` (no recursive try_lock UB).
- B2: `advance_shutdown` releases `poll_mu_` between its ≤1 ms slices; other pollers may run
turns in between (they only drain/dispatch). If its stop token fires it returns the current
report with `complete=false` (not an error).
- B2: when `advance_shutdown`/teardown dispatches resume tickets, it does so after releasing
poll ownership (P3-9). Document: an owned executor must not be joined before the Driver is
torn down.
- A4: `Driver::run` and `pump_until` on `busy` wait up to `max_wait` (stop-aware, at most 1 ms
slices) and retry; they exit when `shutdown_complete()` is true.
- B3/B4: Runtime phase 8 first requests reactor stop and JOINS the reactor thread, then drives
`driver->shutdown(remaining)` from the shutdown thread. The reactor loop also exits on
`shutdown_complete()`; on `busy` it waits as A4's loops do.
## N4 — File descriptor state machine (B2)
- `detail::FileState` has `enum { open, closing, closed }` guarded by the pool mutex; the
handle-drop / in-flight count / `close_pending` transitions happen under that mutex, so
exactly one close is enqueued and whoever closes the fd sets `closed`.
- Driver teardown closes any still-open file fds after joining workers and marks them
`closed`. Afterwards File reads/writes/syncs return `IoErrorCode::closed` without a syscall,
`~File` does nothing, and `close_and_join` returns success immediately (idempotent).
- Files count against `IoLimits::max_descriptors`; that bounds the reserved close capacity.
The close request node is preallocated inside `FileState`, so `~File` (noexcept) never
allocates.
- `~File` wakes the poller only through a weak→strong backend lock or the worker condition
variable, never through the raw waker pointer.
## N5 — Channel timer callbacks (A2; B1 documents)
- B1 documents: `TimerHandle::cancel() == false` means the callback fired or is firing, not
that it finished.
- A2: an AsyncChannel timer callback captures shared waiter state (`shared_ptr` control block
for the waiter) or a `weak_ptr` to the channel plus a waiter id looked up under the channel
lock. It never holds a raw pointer into a coroutine frame.
## N6 — EventBus destruction (A3)
- `~EventBus` gates every admitted-but-not-started delivery on every thread before returning
(shared core `closed` flag checked under the core lock before each delivery starts).
- It waits for callbacks running on OTHER threads to finish, excluding the current thread's own
in-progress callback (thread-local dispatch depth). Residual documented: destroying a bus from
inside a callback that another thread's callback waits on can deadlock (caller error).
- A throwing `error_sink` is caught and counted (D-W11-06 condition, P3-8).
## P3 lines
- P3-2 (B3/B4): owned `BudgetResource`, executor and driver objects live until `~HostCore`;
NEW `[[nodiscard]] std::size_t Host::cpu_admitted() const noexcept` (0 when not started or
embedded) for the budget test; a `BufferLease` must not outlive its resource.
- P3-3 (B3/B4): the borrowed `SignalGate` must outlive the Host; Host tracks `gate_installed_`
so `uninstall` runs at most once (failed-start cleanup and teardown cannot double-uninstall);
the off-owner signal test restores the owner mask and drains SIGUSR2 before finishing.
- P3-4 (root): MIGRATION records "concurrent `poll_once` returns `busy`" and "`~Driver` on a
file worker or inside a poll turn terminates"; `Runtime.md` shows the `TimerQueue*` parameter
on `shutdown_pumping`.
- P3-5 (B2): the D1 seam clock is armed only after submission (`submit_io` reads the clock at
`EpollDriver.cpp:503`).
- P3-6 (A1): `seeded_engine` constructs with parentheses `G(std::random_device{}())` (sent).
- P3-7 (B3): moved-from Host reference accessors (`options`, `lifecycle_plan`,
`embedded_resources`) have precondition `valid()` (documented, asserted in debug); `HostCore`
holds no pointers into `Host` members.
- P3-8 (B3): stop-and-report if an IO edit is needed (IO files are owned elsewhere).
@@ -0,0 +1,162 @@
# W11-PREFLIGHT-2 output (opus-reviewer, 2026-11-29)
Verbatim agent return. Advisory input; root dispositions are recorded in `DECISIONS.md`.
**Task W11-PREFLIGHT-2. Verdict: CHANGES_REQUIRED.** The addendum and the root edits fix the first review's P1 (F1) and most of F2–F13. Six P2 gaps remain. One is a contradiction inside the addendum itself (N1). Four are gaps that the addendum's own resolutions create (N3–N6), and one is a state the addendum never covers (N2). All six can be fixed by adding sentences to the contract text. No re-plan, gate change or ownership change is needed.
- **Blocked until the text is amended:** B2 (N3, N4), B3/B4 (N1, N2, N3), A2's channel deadlines (N5; the rest of A2 can proceed), A3's EventBus work (N6). A4 picks up N3's loop rules when its spec is written.
- **Not blocked:** A1 (M-FUNCTIONAL-03) can continue. B1 (M-TIME-03) can continue but needs one documentation-only note (N5). Neither needs an interface change.
Paths are relative to `/home/faumaray/Projects/VoidLibrary`. "Addendum" means `docs/agent-workflow/tasks/W11-PLAN-REV1-OUTPUT.md`; "plan" means `W11-PLAN-OUTPUT.md`.
## Item status
| Item | Status | Evidence / residual |
|---|---|---|
| F1 | RESOLVED | Workers only run a syscall and queue the result, so no completion runs on a worker. They hold a separate worker-pool object, never the backend. Backend destructors never block, and only `~Driver` does a blocking teardown, behind two terminate markers. Residual: P3-9. |
| F2 | RESOLVED for sockets | The epoll and wake fds still close in the backend destructor (`EpollDriver.cpp:953-963`). Every socket-path `wake()` caller holds a strong reference (`:589-596`, `Backend.hpp:89-96`, `Stream.hpp:105-120`). The file path depends on N4. |
| F3 | RESOLVED | Phase 7 drops the components before IO stops (phase 8) and before the executor is joined (phase 9). |
| F4 | PARTIAL | The per-call budget fixes the zero-budget repeat call, but it contradicts the destructor rule (N1). Phase 2 is missing from the waiting-phase list (P3-1). |
| F5 | PARTIAL | Moved-from rules are fine; gaps in N1, N2, P3-3 and P3-7. |
| F6 | PARTIAL | Borrowed resources are skipped, but the embedded `ManualExecutor` path hangs (N2). |
| F7 | PARTIAL | The single-lock claim/hand-off rule is sound. The timer callback can still reach a destroyed waiter (N5). |
| F8 | RESOLVED | `seeded_engine` is in `M-FUNCTIONAL-03.md:114-142`. Nit: P3-6. |
| F9 | PARTIAL | The routing fix is done. Choosing `busy` without loop rules creates N3. |
| F10 | RESOLVED | The `7f95f89` doc edits match the addendum. Small gaps: P3-4. |
| F11 | RESOLVED | The IO and executor start hooks plus `cleanup_timeout` cover failures inside a step (a later destructor finishes the cleanup, see N1). |
| F12 | PARTIAL | `TimerHandle` shared state and the `parallel_for` shared state are fine. Gaps: N5 (timer) and N6 (EventBus). |
| F13 | PARTIAL | The `FileState` deferred close is right in direction. The fd state machine is incomplete (N4). |
**First-review P3 items**
| Item | Status |
|---|---|
| `retry_blocking` template defaults | RESOLVED (`M-FUNCTIONAL-03.md:135-142`) |
| Observable/Signal move-only and "state restored" | RESOLVED |
| Downstream build list | RESOLVED |
| Error-kind alignment | RESOLVED; observed in `Runtime/Options.hpp`, `shutdown_incomplete` maps to `conflict` |
| D1 regression seam | RESOLVED (seam at `:1083`/`:1098`); see P3-5 |
| Mock reactor spin | PARTIAL: the mock case is covered, the epoll cases are open (N3) |
| Business scope `stop_on_first_error` | RESOLVED |
| MIGRATION: `shutdown_and_join` blocks / `max_file_queue==0` / Sync snapshot / `parallel_for` | RESOLVED, all four observed in `MIGRATION.md:61` |
| Unspecified: concurrent `poll_once` | PARTIAL (N3) |
| Unspecified: IO file ownership after G5 | RESOLVED (G6) |
| Unspecified: stop-and-report if an IO edit is needed | PARTIAL: stated for B4 and A4, not for B3 |
| Unspecified: worker detection | RESOLVED (`is_io_worker_thread`) |
| `ThreadExecutor` endless drain, destructor without join | RESOLVED |
| Acceptance gaps (layering `rg`, within-step faults, ordering, budget test, receiver stop, legacy-mode captures) | RESOLVED; budget test lifetime in P3-2 |
**Named checks (§3)**
| Check | Answer |
|---|---|
| `busy` breaking existing callers | It does not. The only library loop that polls is `~Session` (`src/IPC/Session.cpp:1118-1129`): bounded to 1,000 iterations, result ignored. Every test drives a driver from one thread, and the one cross-thread test polls from only one thread (`IoDriver.cpp:458-508`). The hazard is in the new loops (N3). |
| `wake_closed_` atomic argument | Sound. The last `shared_ptr` release orders the destructor after every `wake()`. The flag is effectively optional because the fd closes only in the destructor. The file wake path is not enumerated (N4). |
| `FileState` reserved close capacity | Bounded only if files take descriptor slots. The addendum doesn't say so (N4). |
| `ThreadExecutor::idle()` in phase 9 | Usable, but it is a snapshot, so "join never unbounded" is overstated (posts after the snapshot still extend the join). Safe in Runtime because phase 8 has already stopped IO dispatch. |
**Named hazards (§6.2)**
| Hazard | Answer |
|---|---|
| Raw waker pointer lifetime | Sound for workers: every backend destruction path goes through `~Driver`, which joins the workers first. `~File` must not use that waker (N4). |
| `busy` and loop callers | See N3. |
| Reserved close capacity unbounded | See N4. |
| Phase-9 idle wait vs inline resume after join | Unreachable from IO, because phase 8 runs first. External posts (stop callbacks, user threads) resume inline; this is documented. |
| `~HostCore` unbounded shutdown on destruction | Contradicted by the per-call budget (N1). Hangs in embedded mode (N2). |
**Planner adjustments**
| Adjustment | Verdict |
|---|---|
| Signal adapter closes its fd off the owner thread | Agree. It matches `src/System/SignalWatcher.cpp:27-37`, and `Runtime.md` is updated. Test hygiene: P3-3. |
| Injected syscall shim as the one exception | Agree. `IO.md:94-96` is updated. |
| Observable FIFO ordering change | Agree. It is recorded in `MIGRATION.md`. |
## New findings
**N1 (P2, observed contradiction): the destructor's shutdown is called "unbounded" but the budget rule caps it at 30 s.**
- **Where:** addendum `:85` says "(unbounded)". Addendum `:75-79` caps every call at `min(deadline, now + total_timeout)` and returns `complete=false` on expiry. `validate_options` rejects `total_timeout <= 0`, so the cap can't be switched off. The failed-start continuation (`:230`) relies on the same path.
- **What happens:** a stall longer than 30 s makes `~HostCore` return from the shutdown call incomplete. A joinable reactor `std::thread` then calls `std::terminate`. If it didn't, members would tear down while components still exist.
- **Related:** `poll_shutdown()` takes no options, so its budget restarts on every call. The plan test `runtime_shutdown_budget_min_caller_policy_manual_clock (poll_shutdown)` (plan `:745`) can therefore never see an expiry.
- **Fix:** `~HostCore` loops `shutdown_blocking({})` until `complete` (or calls an internal no-deadline variant). State "destruction blocks until complete". Move that test to `shutdown_blocking` with an expired or manual-clock deadline. Define how `poll_shutdown` relates to the budget.
**N2 (P2, inferred hang): embedded mode with a borrowed `ManualExecutor`.**
- **Where:** `~HostCore` calls `shutdown_blocking`. Phase 4 then reaches `TaskScope::join_blocking`, which waits on a condition variable that nothing will ever pump (`include/Void/Async/TaskScope.hpp:289-303`). Component `stop()` tasks also need pumping.
- **What happens:** destroying an unstopped embedded Host that has a business task or any component hangs forever.
- **Second problem:** the terminate check uses `executor->is_executor_thread()`, which is true inside an ordinary `manual.drain()` of the borrowed executor.
- **Fix:**
- `shutdown_blocking` returns `invalid_argument` when the executor has no background workers, as `flush_blocking` already does.
- `~HostCore` with a `ManualExecutor` pumps, following the `~TaskScope` pattern (`TaskScope.hpp:562-575`).
- The terminate check applies only to owned executors.
- `shutdown_pumping` in managed mode returns `invalid_argument`, because the reactor owns polling and `pump_until` would just get `busy`.
**N3 (P2, inferred spin plus one hang path): who polls during shutdown is never specified.**
- **Spins:**
- `busy` returns immediately, so the B3 reactor loop (`poll_once(5ms)`), A4's `Driver::run` and `pump_until` spin hot while `advance_shutdown` holds poll ownership.
- The 1.x early return once stopping is set (`EpollDriver.cpp:1057-1059`) skips `epoll_wait`, so loops spin throughout the shutdown window.
- After `shut_down_`, `poll_once` returns 0 immediately, so the reactor spins until phase 9 joins it.
- **Hang:** the addendum doesn't say where file completions are drained relative to that early return. If the drain sits after `epoll_wait` (the natural place, next to `drain_wake_fd`), in-flight file requests are never retired. `quiescent()` then never becomes true, `advance_shutdown` never completes, and `teardown_blocking` in `~Driver` hangs.
- **Undefined behaviour:** `try_lock` on `poll_mu_` by the thread that already owns it, reachable through an inline resume inside a turn.
- **Fix, one sentence each:**
- Cancels, controls and file completions drain before any stop-flag return.
- Say whether `begin_shutdown` sets `stopping_`.
- Library loops wait up to `max_wait` (stop-aware) on `busy` and exit on `shutdown_complete()`.
- Choose one: phase 8 stops and joins the reactor before `advance_shutdown`, or the reactor exits on completion.
- `advance_shutdown` either releases `poll_mu_` between its 1 ms slices or makes the other pollers park.
- `poll_once` checks the thread-local polling marker before `try_lock`.
- Define what `advance_shutdown` returns when its stop token fires.
**N4 (P2, inferred double close / use-after-free): the File fd state machine is incomplete (F13).**
- **Missing invariants:**
- The transitions between handle drop, in-flight count and `close_pending` happen under one mutex, so exactly one close is enqueued.
- A File that outlives shutdown completion or `~Driver` holds an fd that teardown closed. A later `~File` or `close_and_join` must not close that number again, because it may now belong to someone else. Reads and writes must return `closed` without a syscall.
- `close_and_join` after the workers are joined has nothing to run the close on ("close always executes on a worker or `run_file_work`").
- `~File` must wake through a weak→strong backend lock or the worker condition variable, never the raw waker.
- Reserved close capacity is not stated as bounded.
- **Fix:**
- Give `FileState` an `open → closing → closed` state under the pool mutex; whoever closes sets `closed`.
- After completion, `close_and_join` returns at once and `~File` does nothing.
- Files count against `max_descriptors`, which bounds the reserved close capacity.
- Preallocate the close node inside `FileState`, so the `noexcept` `~File` path never allocates.
**N5 (P2, inferred use-after-free; affects B1, which is running): channel timer callbacks vs waiter nodes.**
- **Where:** `M-TIME-03.md:63-65,89,113` says callbacks fire outside the lock after pending→fired, and that `cancel()` returning true means "never runs". It does not cover a callback that has fired and is still running. Addendum F7 puts waiter nodes in coroutine frames and has the timer callback "do nothing if claimed".
- **What happens:** a sender claims the waiter, the receiver resumes and its `cancel()` returns false, its frame is destroyed, and the in-progress callback then reads the dead node.
- **Fix:**
- B1, documentation only: `cancel()==false` does not mean the callback has finished. B1 may continue.
- A2: the timer callback captures shared waiter state, or the channel plus a waiter id that it looks up under the channel lock. It must never hold a raw pointer into a frame.
**N6 (P2, inferred use-after-free): `~EventBus` on an executor thread doesn't wait (F12).**
- **Where:** `Subscription` holds a raw `EventBus*` (`include/Void/Async/EventBus.hpp:137-146`), and handlers commonly capture `EventBus&` to publish follow-up events.
- **What happens:** frames already queued keep delivering after the destructor returns, and any handler that touches the bus hits a dead object.
- **Fix:** `~EventBus` gates every admitted-but-not-started delivery on every thread before it returns. Either wait for callbacks running on other threads (excluding the current one, via a thread-local depth) or document that residual.
**P3 (each changes one spec line)**
1. Add phase 2 to the list of phases that return incomplete when the call deadline expires. Today a caller deadline shorter than the drain grace is ambiguous.
2. The owned BudgetResource, executor and driver objects must live until `~HostCore`.
- The budget test reads `memory_budget()` and `admitted()` after `complete`, and `admitted()` needs `ThreadExecutor`, not `Executor*`.
- A `BufferLease` that outlives its resource is a use-after-free.
3. Signal gate:
- The borrowed `signal_gate` must outlive the Host.
- `uninstall` must be idempotent or tracked, because failed-start cleanup already uninstalls.
- The off-owner signal test must restore the owner's mask and drain SIGUSR2 at the end.
4. MIGRATION and Runtime.md:
- Add "concurrent `poll_once` returns `busy`" and "`~Driver` on a file worker or inside a poll turn terminates" to MIGRATION.
- `Runtime.md` is missing the `TimerQueue*` parameter on `shutdown_pumping`.
5. The D1 seam clock must be armed after submission. `submit_io` reads the clock at `:503`, and a stop there takes the pre-queue path, so D1 never reproduces.
6. Use `G(std::random_device{}())` (parentheses). Braces are a narrowing error for engines whose seed type is narrower than `unsigned`. Documentation-only for A1.
7. Moved-from Host and HostCore:
- The moved-from rules omit the reference accessors (`options`, `lifecycle_plan`, `embedded_resources`).
- HostCore must not hold pointers into Host members, because Host is movable.
8. Carry D-W11-06's condition into A3: a throwing `error_sink` is caught and counted. Add a B3 stop-and-report rule for IO edits.
9. Teardown with an already-joined `ThreadExecutor` resumes continuations inline inside the shutdown's own poll turn. Either dispatch after releasing ownership, or document that the executor must not be joined before the Driver is torn down (the Runtime order already satisfies this).
## Re-review scope
Only the amended text for N1–N6 and the P3 lines above. This can be checked on the B2, B3, B4, A2 and A3 task specs; no new planner round is needed.
## Checks not run
- No builds, tests or compile probes. Everything above comes from direct `sed`/`rg` reads. No Serena or codebase-memory coverage checks.
- Not read: `EpollDriver.cpp:1475-1640` (the rest of `drive_read` and `drive_write`), `ThreadPool.hpp`, `ResourceGraph.hpp`, the `RuntimeHost.cpp` tests, and TASKS/STATE.
- `M-TIME-03.md` and `M-FUNCTIONAL-03.md` were only partly read.
- A new commit, `a8a9249` (D-039), landed during the review. I checked it: it does not touch the W11 contracts.
+1 -1
View File
@@ -58,7 +58,7 @@ the explicit path when a backward-compatible downgrade is impossible.
| Core/Functional | Error categories, formatting adapters, foundation dependency cleanup | Existing representations and error chains; minimal consumer with optional packages absent |
| Containers/Memory | Allocator-aware variants and changed invalidation/ownership | Move-only values, allocator lifetime, stable-handle/invalidation examples, old default behavior |
| Data/Binary/Text | Exact integers, checked conversions, Unicode/limit policies | Large identifiers round-trip; overflow errors; old strict signed documents remain accepted/rejected identically |
| Async/IO | Borrowed queued handles and detached work toward structured ownership | Cancellation/parked destruction and explicit join; blocking bridge cannot deadlock its own executor. Recorded W11 changes: `Driver::shutdown_and_join` blocks for in-flight syscalls and joins file workers; `validate_limits` rejects `max_file_queue == 0`; Sync EventBus and Observable/Signal dispatch over snapshots (subscription changes take effect next pass); nested Observable/Signal updates for copyable types are queued FIFO; legacy `parallel_for` waits for all tasks before rethrowing; Async-mode EventBus handler exceptions are counted instead of terminating; legacy `retry` zero-attempt result kept until Wave C |
| Async/IO | Borrowed queued handles and detached work toward structured ownership | Cancellation/parked destruction and explicit join; blocking bridge cannot deadlock its own executor. Recorded W11 changes: `Driver::shutdown_and_join` blocks for in-flight syscalls and joins file workers; `validate_limits` rejects `max_file_queue == 0`; Sync EventBus and Observable/Signal dispatch over snapshots (subscription changes take effect next pass); nested Observable/Signal updates for copyable types are queued FIFO; legacy `parallel_for` waits for all tasks before rethrowing; Async-mode EventBus handler exceptions are counted instead of terminating; legacy `retry` zero-attempt result kept until Wave C; a concurrent `poll_once` caller gets `busy`; `~Driver` on a file worker or inside a poll turn terminates with a diagnostic |
| Net | Secure TLS defaults, total deadlines, redirect and streaming/session APIs | Private-CA correct-host tests; wrong-host failure; explicit legacy override if offered; no fallback to insecure mode |
| Service/Plugin | Reference convenience versus owning handles; new C ABI | Acquired old generation survives replacement; C/C++ paths have separate ABI tests and destruction ownership |
| Fsm/Scheduler | Terminal-state consistency and supervised children | Faulted termination, race loser cleanup, state checkpoint restore; no coroutine-frame serialization |
+3 -2
View File
@@ -49,8 +49,9 @@ public:
Async::Executor* executor();
IO::Driver* io();
Result<ShutdownReport> shutdown_blocking(Async::OperationOptions);
Result<ShutdownReport> poll_shutdown(); // non-blocking step
Result<ShutdownReport> shutdown_pumping(Async::ManualExecutor&, Async::OperationOptions);
Result<ShutdownReport> poll_shutdown(Async::OperationOptions); // non-blocking step
Result<ShutdownReport> shutdown_pumping(Async::ManualExecutor&, Async::OperationOptions,
Async::TimerQueue* timers = nullptr);
// No awaited shutdown Task on the host's own executor: it would self-join (D-038).
};
// NEW EmbeddedResources borrows executor, IO driver, Time clock and Memory budget.