Skip to content

Re-run a job that lost its runner instead of starting a CI-fix Repair #908

Closed

Description

@JacobStephens2

This was generated by AI during triage.

A check that fails because GitHub lost its runner starts a CI-fix Repair: an agent session that can't fix anything, which uses up one of the Delivery's 5 Repairs. The job carries a deterministic sign of the fault, so thirdshift could re-run it without a Repair.

Evidence

Spec run #776, Spec PR #842, 2026-10-20 (UTC):

  • 19:16:43 CI failed on b5909e8: custom-release-smoke / wsl
  • 19:16:45 CI red; starting Repair 2 of 5. The session ran 81 s, used 420,084 input tokens, and committed nothing.
  • The job (Actions job 118795050607 in Release run 39469875996) ended conclusion: failure with its annotation reading "The hosted runner lost communication with the server". Its steps: Set up job succeeded, Run Vampire/setup-wsl@v7 was still in_progress, and the two later steps were pending. No step concluded failure.

Why not the existing Check re-run

ADR 0010 gives a head one Check re-run, but only after a CI-fix Repair left it unchanged. It rejected re-running before every Repair because most failures are real and that would add a CI cycle to each. A job that failed with no failed step is different: it is a fact GitHub reports, not a judgement, and it says the code never ran to completion.

Related

Activity

  1. added
    enhancement
    on Oct 20, 2026
  2. JacobStephens2 commented on Oct 20, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Re-run a GitHub Actions job that failed with no failed step (runner lost) before starting any CI-fix Repair for it

    Current behavior:
    When CI on the head is red on a check of the branch's own, Delivery starts a CI-fix Repair. A Check re-run happens only later, if that Repair leaves the head unchanged (ADR 0010). A job GitHub ended as failed because its runner was lost, with steps still in progress or pending and none failed, is treated like any other failure.

    Desired behavior:

    • An abandoned job is a GitHub Actions job whose conclusion is failure while none of its steps has the conclusion failure, and at least one step is not completed. Telling one needs only the jobs API's job and step fields, never annotation or log text.
    • When every failing check of the branch's own on a head is an abandoned job, Delivery asks GitHub to re-run the failed jobs of those workflow runs, with no Repair, then watches CI on the same head again. This happens at most once per head for the complete Delivery, and starts no Repair and counts against neither the Repair cap nor the upstream-move budget.
    • If abandoned jobs are mixed with ordinary failures, nothing changes: a CI-fix Repair starts for the ordinary ones, as today.
    • If the re-run is refused, or the same check is abandoned again on that head, carry on exactly as today for red CI.
    • The Command log names it, e.g. custom-release-smoke / wsl lost its runner on <short head>; re-running it.
    • This re-run is separate from ADR 0010's Check re-run. A head may get both, in that order. The watch after it uses the same guard as the Check re-run: wait for the old check run ids to leave the listing before trusting results.
    • Record the decision as an amendment to ADR 0010 or a new ADR, including why it isn't the "re-run before any Repair" option ADR 0010 rejected.
    • The glossary gains Abandoned job and says where it fits beside the Check re-run.

    Key interfaces:

    • The CI watch's reading of failed checks, which already identifies GitHub Actions jobs (ActionsJob: check run id and workflow run id); it needs the job's step conclusions.
    • The Repair loop's red-CI arm and the per-Delivery re-run bookkeeping (CheckReruns).
    • The existing request to re-run a workflow run's failed jobs and the grace-period wait that follows it.

    Acceptance criteria:

    • A unit test classifies a job with a failure conclusion, no failed step and an in-progress step as abandoned. One with a failed step is not, and neither is a completed job whose steps all succeeded but which concluded failure with no incomplete step.
    • An in-process Repair loop test: the only own failure is abandoned. The loop re-runs it, starts no Repair, and continues on green.
    • The same with the re-run failing again as abandoned: the loop proceeds as today (CI-fix Repair).
    • Mixed abandoned and ordinary failures start a CI-fix Repair as today.
    • The second abandonment on the same head does not trigger a second re-run.
    • ADR and glossary updated; cargo test, cargo clippy --all-targets -- -D warnings and cargo fmt --check pass.

    Out of scope:

    • Inherited failures and Base fixes.
    • Retrying failures with failed steps (flaky tests): ADR 0010's Check re-run covers them.
    • Commit statuses and non-Actions check runs.
  3. added
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Oct 20, 2026
  4. removed
    in-progress
    on Oct 21, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions