Skip to content

Spec: in-progress marks only a live Run #1901

Closed
3 of 3 issues completed
Closed

Description

@JacobStephens2

This was generated by AI during a grill-with-docs session.

Problem Statement

The Day shift can't tell from GitHub what thirdshift is running. A Claim's in-progress stays on after its Run has ended. It stays when the Run's pull request is ready for review, and when the Run failed with work on origin, even next to agent-failed. A Spec run that ends waiting only on gated Tickets is reported as a Failed spec run, so it keeps in-progress, gets agent-failed, and counts toward the Failure limit though nothing is broken. A Custom process already takes in-progress off at ready for review, so the same ending leaves different labels depending on which Command ran. And a failure's Recovery reaches only the host's command log, the Run notification and the Console, never the issue. On 2026-10-23 the Day shift relabelled six stale issues by hand and stopped trusting the label (#1165).

Solution

in-progress means a live Run, on issues as it already does on pull requests (ADR 0029). It comes off whenever a Run ends, and the issue is left marked with how it ended:

  • Ready for review, or a Self-merge held with its pull request ready: no label. The open pull request stands for the work.
  • Failed with work on origin, or a failed Security fix: agent-failed in place of in-progress, for Ticket runs, Spec runs and Custom processes alike. The Day shift takes over by putting ready-for-agent back, taking agent-failed off, or closing the issue.
  • A Spec run that is only waiting: ready-for-agent back on its Spec, with no agent-failed, so Pickup continues it once a Ticket becomes startable. If an account that is not a Trusted account has edited the Spec since its last Trusted labelling, the Spec gets needs-triage instead.

Every agent-failed issue except a failed Security fix gets its Recovery as a generated comment, and a waiting Spec gets a comment naming each undone Ticket and what it waits on. The Sweep takes in-progress off any open issue that also carries agent-failed.

Decided in the #1165 grill (Rounds 1–3).

User Stories

  1. As the Day shift, I want in-progress on an issue only while a Run is live on it, so that the issue list answers "what is running?" for every host.
  2. As the Day shift, I want a Ticket run whose pull request is ready for review to take in-progress off and put nothing back, so that a waiting review doesn't look like live work.
  3. As the Day shift, I want a Spec run whose Spec PR is ready for review to take in-progress off its Spec, so that Specs and Tickets read the same way.
  4. As the Day shift, I want a Self-merge held by a policy, security or merge hold, with its pull request left ready, to take in-progress off as ready for review does, so that a held merge doesn't look live.
  5. As the Day shift, I want a Custom process's Delivery to keep taking in-progress off at ready for review, so that every Command ends ready for review the same way.
  6. As the Day shift, I want an issue whose Self-merge merged but whose closing failed to keep in-progress until it is closed, so that the finish still owed stays visible.
  7. As the Day shift, I want Pickup not to take an issue whose pull request is waiting for review, even with no label on it, so that removing in-progress doesn't restart finished work.
  8. As the Day shift, I want a Failed ticket run with work on origin to swap in-progress for agent-failed, so that a failure looks different from live work.
  9. As the Day shift, I want a Failed spec run, one with a failed or interrupted Ticket, to swap in-progress for agent-failed on its Spec, so that a real failure still holds the Failure limit.
  10. As the Day shift, I want a failed Custom process on an issue to swap in-progress for agent-failed and count toward the Failure limit, so that all failures count alike (Failure limit: should a failed Custom process run label its issue agent-failed? #1583).
  11. As the Day shift, I want a failed Security fix to swap in-progress for agent-failed even with nothing on origin, so that it stays with me as it does today.
  12. As the Day shift, I want a Run interrupted without a Stop to end like any other Failed run, so that interruption doesn't leave a stale in-progress.
  13. As the Day shift, I want to take over a failed issue by taking agent-failed off, so that one act ends the failure whatever kind of Command failed.
  14. As the Day shift, I want putting ready-for-agent back on a failed issue to clear agent-failed and let Pickup start a Continuation, so that a retry stays one label edit.
  15. As the Day shift, I want closing a failed issue to clear agent-failed through the Sweep, as today.
  16. As an operator, I want Pickup never to clear agent-failed merely because the issue carries neither in-progress nor needs-triage, so that the Failure limit still brakes once failures no longer carry in-progress.
  17. As an operator, I want a Pickup run's Sweep to take in-progress off any open issue that also carries agent-failed, so that issues failed under the old rules match the new ones without hand edits.
  18. As the Day shift, I want a Spec run whose undone Tickets are all Unready Tickets, or blocked only behind them, to put ready-for-agent back on its Spec without agent-failed, so that a human gate doesn't count as a factory failure.
  19. As the Day shift, I want a Spec run whose undone Tickets wait on other running work, or sit outside the Spec's repository, to end the same waiting way, so that waiting on anything that isn't a failure reads the same.
  20. As the Day shift, I want to clear a Ticket's gate and have Pickup continue its Spec on its own, without handing the Spec back as well, so that the work I owe is only on the Tickets.
  21. As the Day shift, I want a waiting Spec with no Startable Ticket to stay put under ready-for-agent, as Pickup already passes over it, so that putting the label back doesn't make Pickup spin.
  22. As a security-minded owner, I want thirdshift to put ready-for-agent back on a waiting Spec only if no account that is not a Trusted account has edited its title or body since its last Trusted ready-for-agent labelling, and to label it needs-triage otherwise, so that the factory's own relabelling never launders an untrusted edit.
  23. As the Day shift, I want a Spec run with any failed or interrupted Ticket to end agent-failed even when other Tickets are only waiting, so that a mixed result keeps the failure brake.
  24. As the Day shift reading GitHub, I want every agent-failed issue to get a comment marked as generated, giving the cause, where the Run stopped, what was preserved, the machine, and how to retry, so that I can act on a failure from the issue alone.
  25. As the owner of a public repository, I want that comment to leave out local paths and the continue command, so that host details stay off GitHub.
  26. As a security-minded owner, I want a failed Security fix to post no comment, so that a vulnerability's details stay in its private advisory.
  27. As the Day shift, I want a failure that releases its issue to ready-for-agent to post no comment, so that a retry loop can't fill the issue with comments.
  28. As the Day shift, I want a waiting Spec to get a generated comment naming each undone Ticket and what it waits on, so that "waiting for you" looks different from a failure on GitHub (Distinguish Spec runs waiting for the Day shift from failed Spec runs #585).
  29. As the Day shift, I want a Run that fails again on the same issue to post again, so that the issue keeps a history of its attempts.
  30. As a Continuation session, I want the previous failure's comment in the issue text I'm given, as it is written by a Trusted account, so that I start from a factual account of where the last Run stopped.
  31. As the Day shift, I want a Stop to keep leaving needs-triage, and a bug that can't be reproduced to keep leaving needs-info, so that those endings don't change.
  32. As a reader of the docs, I want the guide and the site's hand-written pages to describe the new label meanings, so that they match what thirdshift does.

Implementation Decisions

  • Claim ending. Ending a Claim becomes "the Run is no longer live". The ready-for-review and held-Self-merge endings take in-progress off and put nothing back, using the ending a Custom process's Delivery already uses. The failure ending with work on origin, and a failed Security fix, swap in-progress for agent-failed in one label edit. Release, Stop, not-reproduced and merged-and-closed endings are unchanged. Ending still finishes after Command interruption, and a failed label edit is a warning that names the edit to make by hand.
  • Custom processes share the Claim ending, so they swap labels the same way. Failure limit: should a failed Custom process run label its issue agent-failed? #1583 is answered by keeping their agent-failed.
  • Take-over rule. Pickup's check that clears agent-failed from an open issue the Day shift has acted on loses its "neither in-progress nor needs-triage" clause. agent-failed comes off when ready-for-agent is back, when the Day shift took it off (nothing to do), when the issue is closed (the Sweep), or when a new Claim is made (unchanged).
  • Sweep. It also takes in-progress off every open issue that carries agent-failed, keeping other labels, as a warning-only step like the rest of the Sweep.
  • Waiting Spec run. The Spec run's ending tells "only waiting" apart from failed. It is only waiting when no Ticket failed or was interrupted, and every undone Ticket is an Unready Ticket, blocked by Unready Tickets or by work elsewhere, or outside the Spec's repository. A blocking cycle is a failure, not waiting: nothing will unblock it until someone reshapes the Tickets. A waiting Spec run takes in-progress off its Spec and puts ready-for-agent back, with no agent-failed. Before doing so it applies the Trusted-account check used for Ready issues, from the Spec's last ready-for-agent labelling by a Trusted account. If an untrusted edit came after it, the Spec gets needs-triage instead. Distinguish Spec runs waiting for the Day shift from failed Spec runs #585 keeps the run's outcome name, exit code and notification wording. This Spec settles only the labels and the comment.
  • Ready issue. A ready-for-agent that thirdshift puts back on a waiting Spec counts as a handback after the last Claim ended.
  • Recovery comment. When a Run ends agent-failed, other than a failed Security fix, thirdshift posts one issue comment. It opens with the repository's AI-attribution line, then gives the cause, where the Run stopped, what was preserved (the Issue branch and pull request by name), the machine, and "put ready-for-agent back to retry". It has no local paths and no continue command. A waiting Spec run posts one comment on its Spec naming each undone Ticket and why. A failed comment post is a warning, never a failure.
  • Glossary. Already updated on the grill branch: Claim, Failure limit, Ready issue, Recovery, Sweep. Triage runs (Unattended triage of existing needs-triage issues #1695) follow the same take-over rule. A failed Triage run's extra ready-for-human is Unattended triage of existing needs-triage issues #1695's concern.

Testing Decisions

  • A good test drives a real thirdshift Command against the fake gh and fake Harness, then asserts the label edits and issue comments that the fake recorded. It does not assert internal calls.
  • Seams (no new ones):
    • the fake gh integration tests, as the main seam: ready for review in a Ticket run and a Spec run, a failed Ticket run, a failed Custom process, the Sweep and take-over in Pickup runs, a waiting Spec run, and the Recovery comment;
    • the in-memory Outside already used for Claim ending, for the label-edit edge cases: a failed edit, interruption, and a held Self-merge;
    • the in-memory Outside already used for Pickup's Failure-limit count, for the take-over and Sweep rules;
    • the Spec run's existing Outside, for classifying waiting against failed endings.
  • Prior art: the agent-failed tests from Spec Spec: keep working Ready issues - a Failure limit for pickup and a Command limit for Passes #1564 in the failed-run, Pickup-run, process and Stop integration tests; the Spec run's "Tickets not done" cause tests; and the Base CI report's issue-comment tests.

Out of Scope

Further Notes

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added
    enhancement
    needs-triage
    on Nov 9, 2026
  2. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    in-progress
    on Nov 9, 2026
  3. JacobStephens2 commented on Nov 10, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Handed back to Pickup. in-progress is off and ready-for-agent is on, so the next thirdshift Pickup that is not skipped for the Command limit can continue this issue. Where agent-failed is still present, that pass takes it off as the Day shift's acknowledgement.

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

    enhancementready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions