Skip to content

Ticket: Make GitHub execution interruptible and preserve finishing workflows #468

Closed

Description

@JacobStephens2

Parent

#465

What to build

Make ordinary GitHub CLI work stop on Command interruption, and complete the explicit finishing paths across Git and GitHub. An interrupted Failed run must save its work, a confirmed Self-merge must finish cleanup, Claim ending must finish its tracker edits, and a Spec run must publish its final Ticket accounting without starting more work.

GitHub becomes an ordinary-by-default value whose operations are methods. An immutable completion view carries permission through nested reads and writes, including branch and label helpers. Migrate every caller and remove the old free-function implementations. Reuse the shared execution owner and the Git completion views from the preceding Tickets; the Spec already settles the full completion inventory and exclusions.

Acceptance criteria

  • Every production GitHub CLI capture uses the shared execution owner. All migrated operations use the same bound GitHub value in nested helpers, and the old free-function implementations are removed. Existing trimmed text, JSON, paginated-item parsing and diagnostic wording remain intact.
  • Ordinary GitHub work refuses to spawn after interruption and stops active owned execution when only the Command receives a recorded signal. Completion views finish with an already-recorded or newly arriving interrupt without clearing the flag or modifying ordinary views.
  • Audit optional/fallback GitHub probes that select work, classify a merge or authorize operations: cancellation must propagate before work proceeds. Existing best-effort notification metadata and Setup suggestions may keep fallback behavior where enclosing interrupt checks still prevent work and writes.
  • Failed run PR lookup and draft conversion use completion views throughout their prerequisite reads. Together with the preceding Git Ticket, interrupted salvage still aborts an unfinished merge and saves its work, no-change salvage avoids an empty push, Policy refusal keeps its existing status, and failed salvage push keeps the worktree.
  • The merge request stays ordinary, but an errored or cancelled request reconciles through completion GitHub reads. Only MERGED at the requested head establishes a successful Self-merge; a different head or unconfirmed state remains a failure.
  • After a confirmed Self-merge, Issue branch deletion and origin reconciliation, issue-state reads and issue closure finish through completion Git/GitHub views. Preserve current retry and warning behavior, including interruption after the remote merge succeeded.
  • Claim ending uses completion views through the complete branch-discovery and tracker-edit path: origin refs, PR discovery, label/state reads, label listing/creation and final edits. Release/removal behavior remains intact; protecting only the last write is insufficient.
  • Both worktree Drop paths remain complete after interruption, including common-directory probes before native locking, kept-worktree head reporting, removal and local Issue branch deletion. Preserve both independent cleanup attempts and the ordinary policy of stale removal during creation.
  • Initial Spec selection, branch setup and Spec PR resume stay ordinary. Accounting after child endings uses completion views for Ticket graph rereads, Spec PR opening/checklist updates and restoration after failed Spec review. Scheduling still reads the recorded interrupt before every new Ticket or Spec review.
  • Add an integration case where a Spec PR already exists when interruption drains active Tickets. Its persisted checklist must show the final child outcomes, its Run result must agree, and no new Ticket or Spec review may start.
  • Isolated executable fixtures verify parent-only GitHub interruption, refusal before spawn, completion-view independence, exact-head merge reconciliation and cancellation of optional state probes. Preserve GitHub text/JSON/pagination tests; clean up fixtures by recorded process IDs.
  • Existing Failed run, Merge run, Claim, worktree, Spec run, Harness recovery and process-tree checks pass. The complete workflow proves that domain adapters carry the intended policy as well as the execution owner enforcing it.
  • Sharpen existing domain glossary definitions for Command interruption, Failed run salvage, confirmed Self-merge completion, Claim ending and Spec accounting. Do not introduce a new domain term or ADR for this reversible interface refactor.
  • Leave native file-lock waits, notification HTTP transport, Base fix mark release, command timeouts, continuous process-tree discovery and the child Run graceful protocol unchanged, as settled in the Spec.
  • Run formatting checks, all-target Clippy with warnings denied, and the full test suite. The completed plan lands green with a single CLI execution owner and no legacy Git/GitHub capture implementation remaining.

Blocked by

Activity

  1. JacobStephens2 commented on Oct 7, 2026

    @JacobStephens2
    OwnerAuthor

    Closed by #472, merged into issue-465 by a thirdshift Merge run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions