Skip to content

fix(check): stop multi check from hanging on exit after a run completes#151

Merged
RobbieMcKinstry merged 1 commit into
trunkfrom
fix-multi-check-hang-on-exit
Jul 2, 2026
Merged

fix(check): stop multi check from hanging on exit after a run completes#151
RobbieMcKinstry merged 1 commit into
trunkfrom
fix-multi-check-hang-on-exit

Conversation

@RobbieMcKinstry

Copy link
Copy Markdown
Contributor

Check::dispatch() only called std::process::exit on the failure path;
a successful run fell through to an implicit Runtime drop, which blocks
until every task the runtime ever spawned — ours or a dependency's — has
fully unwound. Any straggling task (e.g. deep inside cersei-agent/-provider)
could silently hold the process open after the presenter had already torn
down and printed the record, requiring Ctrl-C to exit.

Also stop discovery, execution, and reporting explicitly (mirroring
the presenter's existing stop_gracefully/wait_for_shutdown pattern) instead
of just dropping their ActorRefs — ExecutionActor's per-check background
tasks hold their own clones of those refs, so implicit ref-counted mailbox
closure was a race against those tasks finishing rather than a deterministic
signal.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

…etes

`Check::dispatch()` only called `std::process::exit` on the failure path;
a successful run fell through to an implicit `Runtime` drop, which blocks
until every task the runtime ever spawned — ours or a dependency's — has
fully unwound. Any straggling task (e.g. deep inside cersei-agent/-provider)
could silently hold the process open after the presenter had already torn
down and printed the record, requiring Ctrl-C to exit.

Also stop `discovery`, `execution`, and `reporting` explicitly (mirroring
the presenter's existing stop_gracefully/wait_for_shutdown pattern) instead
of just dropping their ActorRefs — ExecutionActor's per-check background
tasks hold their own clones of those refs, so implicit ref-counted mailbox
closure was a race against those tasks finishing rather than a deterministic
signal.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@RobbieMcKinstry
RobbieMcKinstry force-pushed the fix-multi-check-hang-on-exit branch from 6ff9bf6 to e68f099 Compare July 2, 2026 19:21
@RobbieMcKinstry
RobbieMcKinstry enabled auto-merge July 2, 2026 19:21
@RobbieMcKinstry
RobbieMcKinstry added this pull request to the merge queue Jul 2, 2026
Merged via the queue into trunk with commit e6e86c7 Jul 2, 2026
10 checks passed
@RobbieMcKinstry
RobbieMcKinstry deleted the fix-multi-check-hang-on-exit branch July 2, 2026 19:32
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