Skip to content

CI: a superseded dispatched run's pending status can overwrite the newer run's result (typescript.yml, python.yml) #5223

Closed

Description

@cliffhall

In typescript.yml and python.yml, the dispatch-status-pending job posts its (dispatched) status as pending without first checking for a newer dispatched run on the same commit. The dispatch-status result job does check (#5178), and it posts nothing when a newer run exists.

How it happens

  1. Run A is dispatched on commit X, and then run B.
  2. B finishes and posts success (or failure).
  3. A's pending job runs after that and posts pending. Two ways this can happen:
    • A is re-run after B finished. A re-run keeps its run ID, so it is still the older run.
    • A's pending job starts late, which the ordering allows when the two runs are not in one concurrency group.
  4. A's result job finds B, the newer run, and exits without posting.

The status stays pending until someone dispatches the workflow again.

Expected

The pending job runs the same newer-run check as the result job and posts nothing when it finds one. A test runs the pending script against a stub gh to pin this.

Found by Copilot on #5222. That PR fixes the two reporters it adds (dco.yml, everything-mcp-diff.yml). This issue covers the two existing ones, which that PR leaves alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions