fix(runtime): whole-train hardening for the builder and launch stack#196
Open
mfw78 wants to merge 4 commits into
Open
fix(runtime): whole-train hardening for the builder and launch stack#196mfw78 wants to merge 4 commits into
mfw78 wants to merge 4 commits into
Conversation
A failed shutdown-signal registration previously resolved the shutdown future at once, stopping a healthy event loop the moment it started. Park the signal leg on failure so the programmatic trigger stays the only stop.
The openers and launcher already take an injectable TaskExecutor, but both builder launch stages hard-wired TokioExecutor, so an embedder supplying its own executor had to bypass the builder and assemble the runtime by hand. Add with_executor to the typed and preset chains, defaulting to the ambient tokio runtime, and lock the seam with a builder-path e2e launch of the example module.
bae8eab to
077f605
Compare
f7c3d5b to
bc49020
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR carries the whole-train red-team fixes for the epic #79 M0 train (feat/m0-runtime-builder, feat/m0-component-builders, feat/m0-runtime-preset, feat/m0-addons, feat/m0-task-executor), stacked at the end so it lands after the full train merges.
The composed train meets the epic design target: the type-state chain (RuntimeBuilder -> TypedBuilder -> ComponentsStage -> ReadyBuilder, plus the Runtime preset shortcut) cleanly separates declaration from the imperative LaunchRuntime::launch sequence, which returns a RuntimeHandle owning the event-loop task, a programmatic shutdown trigger, and the add-on handles. Component builders are pluggable with correct dependency direction (ReferenceExtBuilder lives in shepherd-cow-host, the core knows nothing of cow). Add-ons install before engine boot (locked by test). TaskSet::shutdown preserves old JoinSet::shutdown semantics exactly (abort then join, verified against the base ref). No double construction, no boot-order regression of consequence, and the binary is a thin one-liner consumer. bootstrap::run survives as a compat wrapper with no in-repo callers.
Changes
just cigate:cargo doc -D warningsbroke on a broken intra-doc link to RuntimeHandle plus a redundant explicit link in crates/nexum-runtime/src/bootstrap.rs.logs()accessor); the embed example is updated accordingly.&dyn TaskExecutor, but both launch stages hard-wired TokioExecutor, forcing custom-executor embedders to hand-assemble AssembledRuntime.with_executoris now available on TypedBuilder and PresetBuilder (the default remains ambient tokio), locked by a new builder-path e2e test that launches the real example module through a counting executor and exercises the shutdown-to-wait handshake.Test plan
just cigreen on this branch, zero e2e skips.wait(),logs.list_runs("example")returns the module init run with 1 record, confirming the log pipeline accessor works end to end.with_executoron both the typed and preset paths.Notes
Follow-ups identified but not implemented in this PR:
Deferred documentation
AI Assistance: Claude Code (Fable 5 red-team and fixes, Sonnet 5 PR authoring) used for the full change.