Skip to content

Add thirdshift stop for live Runs - #783

Merged
JacobStephens2 merged 2 commits into
issue-711from
issue-773
Oct 18, 2026
Merged

JacobStephens2 merged 2 commits into
issue-711from
issue-773

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #773.

stop <command> [--requeue]
  resolve live Command and verify process identity
  persist Unix requester and requeue choice beside its record
  send SIGTERM → existing preservation and cleanup
    default: needs-triage; keep Claim only for this Run's remaining origin work
    --requeue: release Claim and restore ready-for-agent, including after a push
  wait → outcome and remaining Issue branch / pull request

The Command records who stopped it in its Activity log before its ending. Stop refuses ended or died Commands, never prompts or forcibly kills, and reports “still ending” each minute during cleanup.

Evidence

  • Before: cargo test --test stop failed because stop was parsed as an Issue URL.
    After: Stop integration tests pass for unpushed work, pushed branch/PR retention, requeue with and without a push, and refusal without signaling a live process behind an ended or stale record.
  • Before: the Spec reviewer's exact cargo test --test review_stop_spec stopping_a_fresh_numbered_branch_does_not_keep_a_claim_for_a_finished_pr -- --exact --nocapture failed: an old merged PR left in-progress on an unpushed numbered branch.
    After: the same command passes for both merged and closed historical PRs; the regression is retained.
  • Before: a_stop_request_in_the_file_adapter_is_logged_before_the_ending failed because recording bypassed its file adapter.
    After: the retained test passes; request reads now use the existing adapter.
  • Final validation: cargo test, cargo check --all-targets, cargo fmt --check, and cargo clippy --all-targets -- -D warnings all pass.

Test seams: Claim endings through the existing in-memory adapter; compiled CLI against real Git and the existing GitHub/Harness fakes; Stop's clock and output while waiting; recorder lifecycle through its existing file adapter.

Review coverage

Independent thirdshift-code-review Standards and Spec reviews used issue-711 at 276f02d84efbed062a711bbf0d202e99e3f86420, the fetched origin base (the stale local ref is checked out in another worktree). Both reviewers read all 16 changed files, including their follow-up coverage, with no generated-output exclusions. Changed files left unread: none.

Unaddressed findings

  • Standards: none. The one effects-seam finding was addressed.
  • Spec: none. The one historical-PR Claim finding was reproduced, fixed, and retained as a regression test.

Merge Danger

Door: two-way

Additive CLI command and Stop-request files. Ordinary interruption keeps its existing Claim behavior. macOS identity-aware signaling requires runtime support; unsupported versions refuse without sending a signal. Linux validation ran locally; macOS execution awaits CI.

Blast Radius: Commands

Stop changes Claim labels and interrupts the selected Command through normal cleanup, preserving pushed work. Stopping a child Run resolves to its owning Command.

Built with codex · gpt-6.1-sol · high

@JacobStephens2
JacobStephens2 merged commit 4279ccf into issue-711 Oct 18, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-773 branch October 18, 2026 20:42
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