Repository navigation
Spec: see, follow and Stop a machine's Commands from the CLI - #778
Merged
Merged
Conversation
Record live Runs and add machine-wide status
Record Passes and show idle Passes in status
Preserve Command history alongside Pass stages, nested dispatches and idle reasons. Record completion times for both Passes and dispatched work, and retain binary coverage for their history.
Combine Pass stages, dispatch records and idle status with independently written child Run records. Keep same-process dispatches in dispatched and child processes in children, preserving each child's dispatch context.
Show recent and historical Commands in status
Preserve child Run and Spec Ticket trees in recent and complete Command history. Retain completion times and history provenance, and cover completed child trees alongside historical filtering. Validation: cargo check --all-targets; cargo fmt --check; cargo clippy --all-targets -- -D warnings; cargo test (1,902 passed, two ignored).
Record child Runs and Spec runs in Command status
Add show and logs for named Commands
Add thirdshift stop for live Runs
The Spec Stop test added on issue-774 intermittently lost its interruption markers because the fake CLI died before its script handled TERM, letting process cleanup kill the script. Reuse the stop-signal handler already used by the other session fakes so Claude waits for its script. Delay the test handler beyond a cleanup poll to make premature fake exit reproducible while retaining every assertion. Verified the delayed handler fails before the fix, then passes ten stress iterations; the full hash:4/4 shard (498 tests), all eight Stop tests, formatting and diff checks pass locally on Linux.
Stop for Spec runs, Pickup runs and Passes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the CLI for seeing, following and stopping this machine's Commands across every repository in
logs.dir.Records retain process start identity, Harness, Model, Effort, stage history, Ticket blockers and outcomes. History falls back to Activity logs and then current-layout Session logs. README documents the version 1 status/show JSON. Stop refuses ended Commands and individual Ticket Runs, records who requested it, and waits for cleanup.
Closes #711
Evidence
mainhas no machine status, show, logs or Stop commands; operators find processes and logs manually.After: binary integration tests exercise live Runs, nested Pickup/Spec/Ticket trees, idle Passes, historical recovery, naming, Session selection, log following, and Stop labels and cleanup.
stop widgets#20preserved unfinished Ticket work onorigin/issue-21but printed onlyIssue branch left: issue-20. The reviewer’sstop_reports_retained_ticket_branchesreproduction failed (exit 101).After: the identical reproduction passed (exit 0). Stop reuses status's tree reader to report retained branches and pull requests recursively, including Ticket Runs and Base fixes. The regression remains in
tests/stop.rs.cargo test;cargo fmt --check;cargo clippy --all-targets -- -D warnings;cargo test --test stop --test status --test show_logs(39 tests);cargo test --bin thirdshift logs::(24 tests). The full run began during review; the focused checks ran after the corrections inb958ff6.Test seams: the
thirdshiftbinary against real Git and fake GitHub/Harnesses; the existing recorder effects seam for write failure, concurrency and process identity; the existing in-memory Claim seam for Stop endings. The Stop regression observes CLI output and retained work on fake origin.Unaddressed findings
f3133466986c6dd465939ddf190a643b212f06c6...HEADand supporting code covered Stop process identity and signaling, record and Stop-request files, log paths, interruption and Claim cleanup, and Session-tail parsing. All 39 CLI tests instop,statusandshow_logs, plus 24logs::unit tests, passed across isolated offline Linux runs; one CLI fixture needed the installed Node binary added to the sandbox before its successful rerun. macOS received source review only, including comparison with Apple’s process identity declarations and signal wrapper.Review coverage: both independent reviewers read all 36 changed files, including supporting standards and ADRs, and reread all five files changed by the corrections. Unread changed files: none. Intentionally unread generated output: none. Both reports include their final files-read lists.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
The binary can be rolled back; retained Command records and logs stay on disk. A Stop already requested has lasting effects on the running Command and its issue labels.
Blast Radius: machine
Status spans configured repositories. Stop targets one verified Command process and its existing interruption tree; changes also touch shared recording, Claim ending and Run/Spec Delivery transitions.
Built with codex · gpt-6.1-sol · high
Tickets