LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 5, 2026, 4:44 PM
updatedAtNov 5, 2026, 6:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/20340
authorneo-opus-grace
commentsCount0
parentIssue20328
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 5, 2026, 6:21 PM

PR Baseline never cancels a run for a superseded head

Closed v13.4.0/archive-v13-4-0-chunk-3 enhancementaiperformancebuild
neo-opus-grace
neo-opus-grace commented on Nov 5, 2026, 4:44 PM

Context

#20328 (cause 3: job count against 20 org-wide slots). At 15:43Z on 2026-11-05, 21 PR Baseline runs sat queued in this repository at ten jobs each. Three of them were for heads that had already been superseded; one was #20332's first head, queued for 64 minutes. No other PR workflow leaves superseded runs alive. pr-baseline.yml has no concurrency block, while sixteen sibling PR workflows have one.

The Problem

A push or a body edit starts a new baseline run, and the previous run keeps its place in the queue. When that run finally starts, it spends ten slots judging a head nobody is proposing any more.

The Architectural Reality

  • .github/workflows/pr-baseline.yml calls neomjs/neo-agent-skills/.github/workflows/reusable-pr-baseline.yml@v0.1.84 on pull_request: [opened, edited, synchronize, ready_for_review]. edited is there so a corrected body goes green without a push.
  • same-head-check-repair.yml watches PR Baseline and reruns, once, every earlier red run (cancelled included) on the same head after a later run passes. A cancelled run on the same head therefore costs a full rerun later.
  • #15593 (build.yml and the test workflows) set the rerun-safe group: first attempts share one group per ref, and a rerun gets its own (github.run_attempt == '1' && github.ref || github.run_id). Otherwise an obsolete rerun cancels the current head's run.

Design authority: #15593: "Normal first-attempt supersession is valuable and must remain: a new commit should cancel expensive work for the previous commit", plus its rerun-safe group.

The Fix

pr-baseline.yml gains:

  • group: pr-baseline-${{ github.run_attempt == '1' && github.ref || github.run_id }}
  • cancel-in-progress: ${{ github.event.action != 'edited' }}

A new head cancels the run for the old one. A body edit waits behind the running run instead of cancelling it, so the same-head repair has nothing to rerun.

A new spec, PrBaselineConcurrency.spec.mjs, pins three things: both expressions, and that the repair still watches PR Baseline, which is why edited must not cancel.

Acceptance Criteria

  • A push to a PR cancels that PR's queued or running baseline run for the previous head.
  • A body edit never cancels a run for the same head, and a rerun never cancels the current head's run.
  • The spec pins the group, the cancel condition and the repair's watch list, red-first.
  • Post-merge: queued baseline runs for superseded heads drop to zero, read from actions/runs?status=queued.

Out of Scope

  • Ten jobs into one, and an edited run that only needs pr-body: neomjs/neo-agent-skills#281.
  • Brain's and Institution's own shared-pr-baseline.yml callers. Each is its repository's own one-file change.

Avoided Traps

  • Plain cancel-in-progress: true: a body edit would cancel its own head's run, and the same-head repair would rerun all ten jobs.
  • A ref-only group: a stale rerun cancels the current head's run (#15593).

Related

#20328 (parent) · #15593 · #20064 (same-head repair) · neomjs/neo-agent-skills#281

Sweeps at 2026-11-05T15:45Z found no equivalent:

  • latest open;
  • an all-state search on baseline / concurrency / superseded;
  • A2A claims;
  • Memory Core.

Origin Session ID: 8545cff9-f4d7-4731-b93e-7dfad1347c8a Retrieval Hint: "PR Baseline concurrency superseded head cancel-in-progress edited same-head repair run_attempt"