Skip to content

End a Claim when its Run ends: in-progress off at ready for review, swapped for agent-failed on failure - #1929

Merged
JacobStephens2 merged 6 commits into
issue-1901from
issue-1902
Nov 10, 2026
Merged

JacobStephens2 merged 6 commits into
issue-1901from
issue-1902

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

in-progress now marks only a live Run (ADR 0029). How a Run ends decides what replaces it:

 Claim::end(ending)
   Merged                      -> remove in-progress once the issue is closed
-  ReadyForReview | Held       -> keep in-progress
+  ReadyForReview | Held       -> remove in-progress, put nothing back
   Failed, nothing on origin   -> release (ready-for-agent back)
-  Failed, work on origin      -> add agent-failed beside in-progress
-  Security fix failed         -> add agent-failed beside in-progress
+  Failed, work on origin      -> swap in-progress for agent-failed (one edit)
+  Security fix failed         -> swap in-progress for agent-failed (one edit)
   Stop / NotReproduced        -> unchanged (needs-triage / needs-info)

Pickup's gates:

 gates
   sweep(closed issues: in-progress, agent-failed)
   clear_and_count_failures(open agent-failed issues)
-    neither in-progress nor needs-triage -> "took over": take agent-failed off, don't count
+    (no such take-over: a failure now leaves exactly that, so it counts)
     ready-for-agent back                 -> take agent-failed off, don't count
+    every one                            -> take in-progress off too (the Sweep), warning on failure

A Custom process already removed in-progress at ready for review, and it now shares the failure swap. Its Delivery now records whether its own pull request merged. A merged Custom process ends its Claim the way a Ticket run does: in-progress stays until the issue is closed. A child Run that the Process dispatched and that merged no longer counts as the parent's merge.

The guide and the hand-written pages (site/index.html, site/how-it-works/, site/architecture/) describe the new endings. site/docs/index.html is regenerated from the guide.

Evidence

Execution evidence

  • Before (against a6880d0), for the Spec review's finding: cargo test --test process a_self_merge_whose_issue_could_not_be_closed_keeps_in_progress_until_it_is_closed

    test a_self_merge_whose_issue_could_not_be_closed_keeps_in_progress_until_it_is_closed ... FAILED
    

    After: cargo test --test process → test result: ok. 236 passed; 0 failed; 1 ignored

  • Before (against f082b5c), for the Standards review's follow-up finding: cargo test --test process a_dispatched_child_that_merges_does_not_keep_the_parents_claim

    panicked at tests/process/published.rs:860:5:
    ["in-progress"]
    thirdshift: labelling #7 in-progress, in place of ready-for-agent
    thirdshift: labelling #8 in-progress
    thirdshift: removing in-progress from issue #8
    test result: FAILED. 0 passed; 1 failed
    

    After: cargo test --test process -- a_dispatched_child_that_merges_does_not_keep_the_parents_claim a_self_merge_whose_issue_could_not_be_closed self_merge → test result: ok. 14 passed; 0 failed

  • These fake-gh integration tests pass on this branch:

    • pickup_run: 146
    • fresh_run: 26
    • spec_run: 92
    • merge_run: 40
    • continuation: 9
    • security_run: 125
    • architect_run: 94
    • base_fix: 16
    • stop: 10
    • bug_run: 14
    • fix_run: 11
    • triage_run: 28
    • activity_log: 16
    • review_pass: 14
    • failed_run: 15
    • process: 236

    pickup_run and process were rerun on the review fixes. The rest ran on the first commit; the later commits change only Custom-process code and wording, which those files don't assert. Locally I also ran cargo clippy --all-targets (clean), cargo fmt --check, and npm run docs:check --prefix site (passes).

  • Not run locally: the bin's inline unit tests (claim::tests, pickup::tests). rustc was OOM-killed (SIGKILL) building the bin's test harness on this 7 GB host. They typecheck (cargo check --tests, clippy), and CI runs them. Two site checks also fail here for host reasons: npm test --prefix site has no Playwright Chromium, and site_deploy::the_systemd_units_verify trips on the host's own snapd.service. Neither touches the changed files.

Visual evidence

No headless browser is available on this host (Playwright's Chromium is not installed), so there are no captures. The site changes are text only: two sentences, one list item, and two SVG labels that now read "PR to draft, agent-failed" instead of "PR to draft, Claim kept". The SVG box widths are unchanged.

Unaddressed findings

Standards

  • The Failed run path #5 — Mysterious Name: clear_and_count_failures now also does part of the Sweep. Declined. The function's main job is still counting failures, and its error handling differs from sweep's: a failed listing fails the run instead of warning. The two docs cross-reference each other (src/pickup.rs, the sweep doc: "[clear_and_count_failures] sweeps the open issues that carry agent-failed"), and the guide's Sweep section names the open-issue step. Renaming it would be churn with no change in behaviour.

Spec

None. The single Spec finding, a Custom process that merged without closing its issue, is fixed and tested.

Security review outcome

No unaddressed introduced findings.

Review coverage

Both reviewers read every file changed in a6880d0 and f082b5c. Both accepted site/docs/index.html as generated output and did not read it: it is generated from docs/guide.md by site/generate-docs.mjs, and npm run docs:check --prefix site passes. Commit a37987d came after the follow-up review, so the review left these unread:

  • src/processes/ticket.rs: one merged: false initializer.
  • tests/process/published.rs: the Standards reviewer's own test, renumbered to issues the fake has.
  • The a37987d hunks in src/processes.rs, src/claim.rs, src/pickup.rs and docs/guide.md.

Merge Danger

Door: two-way

Only label edits change. Reverting brings back the old labels on new endings. Issues already relabelled stay valid under both rules.

Blast Radius: labels

  • The first Pickup run after merge takes in-progress off every open issue that also carries agent-failed, on every repository it runs on. That is intended (ADR 0029), but it is a visible batch of label edits.
  • Issues that ended ready for review under the old rules keep in-progress until someone removes it by hand. Spec: in-progress marks only a live Run #1901 leaves that out of scope.

Closes #1902

Built with claude 2.1.314 · claude-opus-5-5 · medium

…wapped for agent-failed on failure

Ready for review and a held Self-merge take in-progress off and put
nothing back. A failure with work on origin, and a failed Security fix,
swap in-progress for agent-failed in one label edit. Pickup no longer
reads neither in-progress nor needs-triage as a take-over, and its Sweep
takes in-progress off every open issue labelled agent-failed.

Closes #1902
…losed, tidy Sweep code

A Custom process whose Self-merge merged now ends its Claim as a Ticket
run's does, removing in-progress only once the issue is closed. Fold the
Sweep's handed-back decision into one place, rename claim_stays, rewrap
docs, and align the step wording. Update the Process tests for the new
endings.
A dispatched child Run that merged no longer keeps in-progress on the
parent issue whose own pull request is only ready for review. Clarify the
release doc and rewrap the Pickup module and guide text.
…fakes; keep Run a workflow name only

Edit::labels_after now follows the request apply makes, so a Delete leaves
an already-present agent-failed in its own case, as GitHub does. The
hand-written pages say 'run' where the Claim prose meant a run, not the
Run concept the pages test forbids.
… the issue has it

Edit::labels_after now follows the Delete request, which leaves the other
labels in their order, so the Claim tests expect in-progress where it was
read, not moved to the end.
…en failures

A failed Run now leaves agent-failed without in-progress, so the Failure
limit skip test seeds its failures that way, and the closed-issue Sweep
test expects the open failure it seeds to have in-progress taken off.
@JacobStephens2
JacobStephens2 merged commit 5ffa9d2 into issue-1901 Nov 10, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1902 branch November 10, 2026 04:35
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