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:
1 parent
38436b18c8
commit
7f95f89d52
16 files changed
+1856
-40
No files matched your search
@@ -45,10 +45,13 @@ struct Options {
|
||||
class Host { // owns managed resources
|
||||
public:
|
||||
static Result<Host> create(Options); // validates, starts no workers
|
||||
Result<void> start(); // explicit startup transaction
|
||||
Async::Executor& executor();
|
||||
IO::Driver& io();
|
||||
Coro::Task<Result<ShutdownReport>> shutdown(Async::OperationOptions);
|
||||
Result<void> start(StartOptions); // explicit startup transaction
|
||||
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);
|
||||
// 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.
|
||||
}
|
||||
@@ -70,11 +73,13 @@ constructors remain inert; start is explicit and errors return before publicatio
|
||||
|
||||
Use a lifecycle graph of explicit resources, with required/optional dependencies and
|
||||
deterministic topological ordering. Default core order: validate limits/capabilities →
|
||||
establish signal handling on the designated owner thread → allocate budgets and queues →
|
||||
install the injected `SignalGate` on the designated owner thread (Runtime has no System
|
||||
dependency; a System-backed adapter is optional) → allocate budgets and queues →
|
||||
start CPU executor → start IO driver/file workers → start optional service/admission
|
||||
adapters → report ready. SignalWatcher is created before worker threads as required by
|
||||
[its contract](../../../include/Void/System/SignalWatcher.hpp), and is destroyed on
|
||||
the same creating thread after workers join.
|
||||
the same creating thread after workers join; off-owner teardown calls `uninstall(false)`,
|
||||
which closes the gate's descriptor but cannot restore the owner's mask.
|
||||
|
||||
Each start step returns a retained cleanup action. A failed step aborts its partial
|
||||
resources and unwinds previously successful starts in reverse dependency order.
|
||||
@@ -111,19 +116,23 @@ idempotent; callers join one retained result rather than issue competing stop pa
|
||||
data and requests cooperative cancellation, but all admitted backend activity must
|
||||
still quiesce. Expiry of the total shutdown budget returns shutdown_incomplete with
|
||||
exporter owners and their execution resources retained; a later join continues them.
|
||||
6. Only after cleanup/export callbacks and backend references retire, stop reactor and
|
||||
CPU/file workers and release budgets/descriptors/signal masks in reverse creation
|
||||
order. Observation failure cannot suppress cleanup or convert a failed operation
|
||||
6. After cleanup/export callbacks and backend references retire, drop component/exporter
|
||||
references, then stop owned IO, the reactor and CPU/file workers, and release budgets,
|
||||
descriptors and the signal gate in reverse creation order. Borrowed executor, driver,
|
||||
clock and memory are never shut down or joined by the Host. Observation failure cannot suppress cleanup or convert a failed operation
|
||||
into success. A timed-out flush is not evidence that its resources are releasable.
|
||||
|
||||
Default total shutdown observation budget is 30 seconds, shortened by caller options.
|
||||
Each shutdown call observes min(caller deadline, now + total_timeout) for remaining work;
|
||||
drain-grace and flush deadlines are fixed at first entry to their phase. An incomplete
|
||||
phase stops the sequence and the next call resumes there.
|
||||
Expiry produces `shutdown_incomplete` containing pending owner IDs/counts and phase;
|
||||
the Host remains in joining with resources retained. It can be waited again or the
|
||||
application can choose explicit process termination. There is no forced thread kill,
|
||||
buffer release or dlclose. Borrowed resources must outlive final cleanup, not merely
|
||||
the first timed-out shutdown call. Destruction blocks to join only on an allowed
|
||||
off-worker owner thread; on a runtime worker, callers must await shutdown before
|
||||
destroying Host. Self-join misuse is detected as a programmer error. Process-level
|
||||
the first timed-out shutdown call. Destruction blocks to join only off Runtime threads;
|
||||
destruction on a Runtime worker, reactor or IO file-worker thread is a programmer error
|
||||
that terminates after a diagnostic. Process-level
|
||||
hard-stop policy belongs to the application, not a hidden destructor timeout.
|
||||
|
||||
Uncaught task exceptions reach explicit scope/error sinks. Default failure policy
|
||||
@@ -156,8 +165,8 @@ Every row is PLANNED.
|
||||
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
|
||||
| --- | --- | --- | --- |
|
||||
| S-RUNTIME-01 | P1 / Async ownership, IO driver, Time/Memory ports | Inert Host options, borrowed/owned resource graph, dependency validation | No constructor starts workers; invalid bounds/cycles fail before external admission / sol_implementer |
|
||||
| S-RUNTIME-02 | P2 / S-RUNTIME-01; System signal gate | Explicit start, readiness and reverse failed-start cleanup | Failure at every creation/start step leaves no worker/descriptors; signal-mask ownership retained / astra_implementer |
|
||||
| S-RUNTIME-03 | P2 / S-RUNTIME-02 | Structured shutdown, repeated join, exporter-before-executor ordering and budget accounting | Full queues deliver completion; in-flight export retains IO/workers through flush expiry; stalled work reports incomplete without freeing resources / astra_implementer |
|
||||
| S-RUNTIME-02 | P2 / S-RUNTIME-01, M-ASYNC-04, S-IO-03; signal gate (injected port) | Explicit start, readiness and reverse failed-start cleanup | Failure at every creation/start step leaves no worker/descriptors; signal-mask ownership retained / astra_implementer |
|
||||
| S-RUNTIME-03 | P2 / S-RUNTIME-02, S-IO-04 | Structured shutdown, repeated join, exporter-before-executor ordering and budget accounting | Full queues deliver completion; in-flight export retains IO/workers through flush expiry; stalled work reports incomplete without freeing resources / astra_implementer |
|
||||
| S-RUNTIME-04 | P3 / S-RUNTIME-03; Service/Configuration transaction gates | Optional managed adapters, transactional resize/reload and embedded examples | Same workload runs embedded/managed; failed resource prepare keeps active generation / sol_implementer |
|
||||
| S-RUNTIME-05 | P3 / S-RUNTIME-04; profile harness | Latency/throughput/footprint presets, inspection and tuning gates | Limits remain invariant per preset; measured p99/RSS/build cost reported with environment / astra_implementer |
|
||||
|
||||
|
||||
Reference in new issue
Block a user