Skip to content

ci: judge each check by its newest run - #54

Merged
siarheidudko merged 1 commit into
mainfrom
claude/stuck-prs-dependency-update-18rrre
Aug 29, 2026
Merged

ci: judge each check by its newest run#54
siarheidudko merged 1 commit into
mainfrom
claude/stuck-prs-dependency-update-18rrre

Conversation

@siarheidudko

Copy link
Copy Markdown
Member

Rolls out from siarheidudko/claude#8.

Problem

The merge gate could refuse to merge a PR whose checks were actually green.

autoupdate.yml dispatches CI, then claude.yml dispatches it again. Both are workflow_dispatch on the same branch, so they land in the same pr-checks concurrency group and the second cancels the first. Those cancelled check runs stay attached to the commit, and the gate — which read every check run for the SHA — scored them as failures.

Seen live in ireceipt-pro/js#37: four green checks from the winning dispatch plus four leftovers from the superseded one, and the gate logged total=8 pending=0 failed=3 on a healthy PR.

Fix

The gate keeps only the newest run of each check name before judging:

group_by(.name) | map(max_by(.id))

Applied in both autoupdate.yml and claude.yml. Verified against a fixture built from that PR's real check runs: total=8 failed=3 becomes total=4 pending=0 failed=0, while a genuine later failure on the same name is still counted.

Generated from the siarheidudko/claude templates; no repo-specific hand edits.


Generated by Claude Code

Two separate causes left autoupdate PRs open again.

1. The merge gate counted cancelled leftovers as failures.

   autoupdate.yml dispatches CI, then claude.yml dispatches it again.
   Both are workflow_dispatch on the same branch, so they land in the
   same pr-checks concurrency group and the second cancels the first.
   The cancelled check runs stay on the commit, and the gate — which
   looked at every check run for the SHA — read them as failures.

   ireceipt-pro/js#37 was the casualty: Claude found nothing to fix, the
   winning run was green on all four checks, and the gate still reported
   "total=8 pending=0 failed=3" and refused to merge a healthy PR.

   The gate now keeps only the newest run of each check name
   (group_by(.name) | map(max_by(.id))) before judging. Verified against
   a fixture built from that PR's real check runs: 8/failed=3 becomes
   4/failed=0, while a genuine later failure is still counted.

2. jsdom keeps being bumped back past Node 20.

   jsdom 30 declares engines.node ^22.22.2 || ^24.15.0 || >=26.0.0 and
   crashes on Node 20, which stripe-js tests. v2.0.80 already pinned it
   to ^29 for this reason; npm-check-updates walked it back to ^30 this
   week and broke the same job again. A pin in package.json cannot
   survive `ncu -u`, so jsdom joins ignore_packages for that repo.

   Dropping Node 20 from the matrix instead is a support-policy change,
   not a compatibility shim, so it stays the maintainer's call.
@siarheidudko
siarheidudko marked this pull request as ready for review August 29, 2026 09:20
@siarheidudko
siarheidudko merged commit 2e14934 into main Aug 29, 2026
8 checks passed
@siarheidudko
siarheidudko deleted the claude/stuck-prs-dependency-update-18rrre branch August 29, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants