Skip to content

Own concurrent child Runs through collective teardown - #476

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-475
Oct 7, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-475

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keep concurrent Ticket Runs owned through delivery and teardown, with child salvage finished before Spec worktree cleanup.

Spec run → child_run::Runs
  start       refuse outstanding duplicates → launch and retain
  next ending sweep every child → reap/join → oldest numbered ending
  drop        TERM every child → drain all → Worktree cleanup

Ticket scheduling, Spec PR accounting, progress, and standalone Base fix waiting keep their existing owners.

Closes #475

Evidence

  • Before: dropping_a_collection_stops_all_siblings_before_waiting_and_saves_their_work failed with sequential shutdown: sibling salvage never completed within the finite fixture's lifetime.
    After: Ordinary drop and caught unwinding save both siblings' work, deliver one TERM per live child, reap every owned child, and preserve the Command interruption flag.
  • Before: duplicate_start_is_refused_before_launch_and_keeps_the_original_child_owned failed because the original handle was replaced.
    After: Active and queued duplicates are refused before launch; delivered identities can be reused.
  • 20 child execution tests, 49 Spec module tests, and all 60 end-to-end Spec tests pass, including parent-only sibling interruption/salvage and final drained-Ticket accounting.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, and full cargo test pass (one existing ignored test). The full suite was rerun after a transient ETXTBSY fixture launch failure; the affected test also passed in isolation.

Test seams

  • child_run::Runs: construction, owned launch registration, next numbered ending, and collective cleanup on drop or unwinding, with finite local executables at the existing private launch seam.
  • Existing standalone child Run execution and Spec run lifecycle interfaces, including parent-only sibling interruption/salvage and final drained-Ticket accounting.

Merge Danger

Door: two-way

No persistent data or command-policy changes; reverting restores the previous supervision implementation.

Blast Radius: Spec

Concurrent Ticket Run supervision and Spec owner teardown. Standalone Base fix execution continues its existing blocking wait.

Unaddressed findings

Standards

None. The repeated cleanup assertions were consolidated into a fixture helper.

Spec

None. Completed-child setup now waits for process and reader completion at the private launch seam, removing the queue tests' scheduling assumption.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit e3c24b2 into main Oct 7, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-475 branch October 7, 2026 02:34
This was referenced Oct 7, 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.

Deepen concurrent child Run ownership through teardown

1 participant