Skip to content

Spec: Deepen Command execution for Git and GitHub - #470

Merged
JacobStephens2 merged 10 commits into
mainfrom
issue-465
Oct 7, 2026
Merged

JacobStephens2 merged 10 commits into
mainfrom
issue-465

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Parent-only interruption now stops ordinary Git and GitHub CLI work through the same Command execution owner used by Harness sessions. Explicit completion views let existing finishing operations complete while the recorded interrupt still prevents new work.

Harness adapter ── preparation and existing stop action ─┐
Git view ───────── ordinary / completion ────────────────┤
GitHub view ────── ordinary / completion ────────────────┤
                                                        ▼
                                             Command execution owner
                                             ├── capture stdout + stderr
                                             ├── stream retained consumer state
                                             └── stop tree, reap child, join workers

The three Tickets deliver the complete Spec:

  • Shared execution owns the child immediately after spawn, drains output concurrently, closes optional stdin, wakes on worker completion, and cleans up setup failures, worker failures, panics, and interruption. Harness stop behavior and streamed-state recovery remain intact.
  • Immutable Git and GitHub completion views carry permission through Failed run salvage and draft conversion, confirmed Self-merge cleanup, Claim ending, both worktree cleanup paths, and Spec Ticket accounting. Ordinary execution checks interruption before spawn, during supervision, and before return.
  • An interrupted merge is reconciled through completion reads and accepted only when GitHub reports MERGED at the requested head. Interrupted Spec runs drain active Tickets and publish their final checklist without starting another Ticket or Spec review.
  • Git retains its lock retries and diagnostics; GitHub retains text, JSON, and pagination parsing. Boolean and optional state probes propagate cancellation as an error. The glossary records the completion guarantees, and signal-test isolation is shared across the execution, Git, and GitHub tests after the Standards review.

Closes #465

Evidence

  • Before: Spec Spec: Deepen Command execution for Git and GitHub #465's probe on main at 1fbb06b recorded parent-only SIGTERM, but GitHub capture remained blocked after 500 ms on a fixture waiting 20 seconds.
    After: a_parent_only_signal_stops_active_git_and_propagates_through_probes and parent_only_interruption_stops_active_github verify interrupted errors and owned-child cleanup for SIGINT, SIGTERM, and SIGHUP.
  • Before: each Ticket's tests carried separate signal-isolation runners.
    After: one shared runner executes the same behavior tests in isolated subprocesses; all 33 execution tests passed before the extraction.
  • Validation: cargo fmt --check and cargo clippy --all-targets -- -D warnings passed. The full cargo test suite passed 1,282 tests across 39 binaries; its one ignored local probe also passed when run separately with cargo test --bin thirdshift process::tests::representative_short_captures -- --exact --ignored --nocapture. Mean short-capture times were 1.1 ms for true and 3.2 ms for bash, with no timing assertion added to CI.
  • Test seams: shared captured/streaming execution; bound Git and GitHub operations; Harness/session interpretation; Command workflows exercised through the CLI with real temporary Git repositories and fixture executables. Coverage includes ownership faults, independent completion permission, failed-push retention, exact-head merge reconciliation, Claims, worktree cleanup, and persisted Spec accounting after interruption.

Merge Danger

Door: two-way

Reversible execution refactor; no persistent-state migration.

Blast Radius: execution

All Harness, Git, and GitHub CLI lifetimes and their finishing workflows. Native lock waits, HTTP notification transport, timeouts, process-tree discovery guarantees, and the child Run protocol keep their existing behavior.

Unaddressed findings

Standards

None. The one finding, duplicated signal-test isolation, is addressed by shared test support.

Spec

None. The whole-Spec review found no missing, incorrect, or extra behavior.

Tickets

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 7, 2026 01:24
@JacobStephens2
JacobStephens2 merged commit b2c0028 into main Oct 7, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-465 branch October 7, 2026 01:31
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.

Spec: Deepen Command execution for Git and GitHub

1 participant