Description
In src/runner.rs:957, a tokio::spawn task is created for the TUI early status forwarder, but the returned JoinHandle is immediately dropped via let _early_status_forwarder = .... While the comment documents intent ("dropping intentional — no cleanup needed on bootstrap error path"), this diverges from the project rule in rust-code.md that fire-and-forget tasks MUST be tracked.
The current comment explains the semantics correctly but does not satisfy the rule, which requires either storing the handle in a tracked Vec<JoinHandle> or documenting an explicit exemption.
Reproduction Steps
- Open
src/runner.rs at line ~957
- Observe:
let _early_status_forwarder = tokio::spawn(crate::tui_bridge::forward_status_to_tui(...))
- Handle is bound with
_ prefix and immediately dropped — not stored in any supervision list
Expected Behavior
Fire-and-forget spawned tasks should either:
- Be stored in a tracked
Vec<JoinHandle> (or equivalent supervisor), or
- Have an explicit
// EXEMPT: <reason> annotation approved as an architectural exception
Actual Behavior
Handle is silently dropped. Although the task is semantically self-terminating (channel close kills it), this pattern is inconsistent with the project's JoinHandle tracking rule and sets a precedent for untracked spawns.
Environment
- Location:
src/runner.rs:957
- Feature gate:
#[cfg(feature = "tui")]
- Blast radius: bootstrap-only; short-lived; no shutdown semantic impact
Logs / Evidence
let _early_status_forwarder = tokio::spawn(crate::tui_bridge::forward_status_to_tui(
status_rx,
early.agent_tx.clone(),
));
Description
In
src/runner.rs:957, atokio::spawntask is created for the TUI early status forwarder, but the returnedJoinHandleis immediately dropped vialet _early_status_forwarder = .... While the comment documents intent ("dropping intentional — no cleanup needed on bootstrap error path"), this diverges from the project rule inrust-code.mdthat fire-and-forget tasks MUST be tracked.The current comment explains the semantics correctly but does not satisfy the rule, which requires either storing the handle in a tracked
Vec<JoinHandle>or documenting an explicit exemption.Reproduction Steps
src/runner.rsat line ~957let _early_status_forwarder = tokio::spawn(crate::tui_bridge::forward_status_to_tui(...))_prefix and immediately dropped — not stored in any supervision listExpected Behavior
Fire-and-forget spawned tasks should either:
Vec<JoinHandle>(or equivalent supervisor), or// EXEMPT: <reason>annotation approved as an architectural exceptionActual Behavior
Handle is silently dropped. Although the task is semantically self-terminating (channel close kills it), this pattern is inconsistent with the project's JoinHandle tracking rule and sets a precedent for untracked spawns.
Environment
src/runner.rs:957#[cfg(feature = "tui")]Logs / Evidence