Skip to content

fix(runtime): epic train follow-ups (round 2)#277

Closed
mfw78 wants to merge 2 commits into
fix/task-shutdown-tally-nitsfrom
fix/m0-followups-round-2
Closed

fix(runtime): epic train follow-ups (round 2)#277
mfw78 wants to merge 2 commits into
fix/task-shutdown-tally-nitsfrom
fix/m0-followups-round-2

Conversation

@mfw78

@mfw78 mfw78 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

Two deferred M0 follow-ups from the epic train, one commit each.

  1. Typed BuildError for the component build path. ComponentsBuilder::build now returns Result<Components<T>, BuildError>, where BuildError names the failing slot (Chain, Store, or Ext) instead of an opaque anyhow::Error. The leaf ComponentBuilder::build stays on anyhow because the backends fail for heterogeneous reasons (I/O for the store, network for the chain), so a single typed cause there would be dishonest. Callers that propagate into anyhow keep working through the std::error::Error conversion thiserror derives.
  2. Explicit executor seam at the CLI launch root. run_from_config now passes .with_executor(&TokioExecutor) in the builder chain rather than relying on the builder's implicit tokio default. This names the launch root as the point where an embedder or a non-tokio target substitutes its own executor. Behaviour-preserving: the binary still spawns on tokio.

Why

Both were recognized during the epic train review as realizable clean-ups that were deferred to keep that PR focused. The typed error makes a build failure self-describing at the boundary; the explicit executor call turns an implicit default into a decision made where the launch is composed. Neither changes runtime behaviour.

Testing

  • cargo clippy -p nexum-runtime -p nexum-cli --all-targets clean, zero warnings (pinned nix toolchain, rustc 1.94.0).
  • cargo test -p nexum-runtime host::component: 6 passed.
  • cargo test -p nexum-runtime runtime::task: 4 passed.
  • rustfmt --check clean on all touched files.

AI Assistance

AI Assistance: Claude Code (Opus 4.8) used for implementing both commits, verification, and drafting this PR body.

mfw78 added 2 commits July 8, 2026 06:26
Return a BuildError naming the failing component slot (chain, store, or
extension) from ComponentsBuilder::build, instead of an opaque
anyhow::Result. The leaf ComponentBuilder::build stays anyhow because the
backends fail for heterogeneous reasons (I/O for the store, network for
the chain). Callers that propagate into anyhow keep working through the
std::error::Error conversion.
Pass the executor explicitly with .with_executor(&TokioExecutor) in the
CLI builder chain, rather than relying on the builder's implicit tokio
default. This names the launch root as the point where an embedder or a
non-tokio target substitutes its own executor. Behaviour-preserving: the
binary still spawns on tokio.
@mfw78

mfw78 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated follow-up PR #278, which carries this change as a preserved commit. Closing to reduce the outstanding-PR count; the commit history is unchanged.

@mfw78 mfw78 closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant