Skip to content

ci: a newer draft run masks failed confirmation and retains its reservation #3648

Open

Description

@schlessera

Out of scope

No change to what counts as passing proof, merge authorization, reservation capacity or selected CI categories. This follow-up does not repair the session-safety implementation.

Context

Observed on 2026-11-06 while confirming #3639 at b88c1f049f2d261f214857b238c893aaae2c940a, base cfbfcab18b869f829da803dec39f23fd55935074:

  1. integrate.ts confirm acquired the exact-candidate reservation and requested candidate run 42156201790.
  2. Declaration builds failed with TS4058. Returning the PR to draft left that run terminal with cancelled conclusion, nine failed jobs and cancelled remaining selected work.
  3. The same-head draft event produced newer successful cheap run 42156667802.
  4. More than nine minutes after its startup, the original confirmation process was still running rather than reporting the failed/cancelled confirmation and completing cleanup.

(latestIntegrationRun, scripts/integration-proof.ts:19-26) selects only the highest matching run ID. The normal confirmation loop (while (!lost), scripts/integrate.ts:346-361) repeatedly selects that latest run, returns null for draft/feedback cadence, and then sleeps before selecting the same run again. It never examines the older terminal confirmation once a newer draft run masks it. The heartbeat continues independently while the candidate head/base remain unchanged. Owned cleanup is only reached in the final block (} finally {, scripts/integrate.ts:367-373).

Related #3573 concerns a different latest-run problem in contract proof. It does not cover a newer cheap CI run masking the requested failed confirmation.

Scope

Bind confirmation observation to the requested confirmation lifecycle, or explicitly terminate when the live PR is returned to draft. A newer cheap same-head run must not cause indefinite observation of that run or extend the failed confirmation's reservation.

Acceptance criteria

  • A requested confirmation that fails or is cancelled reaches an explicit terminal refusal and releases only its owned reservation even if a newer same-head draft/feedback run completes afterward.
  • Returning a confirming PR to draft has a bounded, documented outcome; it cannot silently retain authority until the sixty-minute cap.
  • Preserve head/base/run/attempt/cadence binding, transient transport retry behavior, and ownership fences. Never accept an older passing run as proof for a new confirmation.

Verification

Extend the existing offline integration-command runtime fixture with a terminal failed/cancelled requested run followed by a successful newer draft/feedback run. Prove the process exits and the owned lease is released, with a mutation/failing-first receipt. Preserve healthy confirmation and foreign-holder controls.

Contract impact

Repository tooling only; no published package or integration-contract change. This wanted tooling correction is unscheduled; priority p2 applies.

Triage 2026-11-08 at main 1619741f291f525d17cde4970a5ada40644117c1: Inspected latest-run selection, the current confirmation loop and owned-finally cleanup. The reported newer-cheap-run masking path remains in source and the offline runtime-fixture brief is complete. This is source evidence, not a newly executed process-hang reproduction.

Activity

  1. added
    type: fix
    area: ci
    priority: p2
    agent-ready
    on Nov 6, 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

    agent-readyarea: cipriority: p2type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions