Skip to content

ci(semver-label): fresh-fetch labels + self-heal superseded runs; cut v1.6.0 on merge#584

Merged
claude-dataviking merged 1 commit into
mainfrom
ci/semver-label-self-heal
Jul 18, 2026
Merged

ci(semver-label): fresh-fetch labels + self-heal superseded runs; cut v1.6.0 on merge#584
claude-dataviking merged 1 commit into
mainfrom
ci/semver-label-self-heal

Conversation

@claude-dataviking

Copy link
Copy Markdown
Contributor

Why

#583 pre-bumped the version artifacts to 1.6.0, but its post-merge Auto Semver Tag run refused to tag: the first cut of the Semver Label check (from #582) left a cancelled superseded run parked on the PR's head SHA (label events don't move the SHA), and auto-tag's "Verify CI checks passed" step treats any non-green check run on the merged head SHA as a blocker. That SHA is unrecoverable — reruns of a payload-based check replay the original (unlabeled) payload and stay red.

What

Rework semver-label.yml so it can coexist with auto-tag's strict SHA verification:

  • Fetch labels fresh from the API instead of the event payload — the same approach auto-tag itself uses (sy-73j) and for the same reason: a rerun must see labels added after the original event.
  • Drop concurrency cancellation — a cancelled conclusion poisons the SHA exactly like a failure; runs take ~2 s, superseded runs can simply finish.
  • Self-heal: after passing, re-run any superseded non-green runs of this workflow on the same SHA; with fresh-fetch they flip green, leaving the SHA clean for auto-tag. (Fork PRs, where the token lacks actions: write, get a warning telling the operator to re-run manually.)

Release: this PR carries semver:minor and cuts v1.6.0 on merge

Main already sits at the pre-bumped 1.6.0 artifacts (#583), so this PR's auto-tag run takes the documented pre-bumped escape hatch: computes v1.6.0, finds nothing to commit, tags HEAD, creates the GitHub Release, and dispatches the PyPI publish. The minor bump covers the 23-PR backlog since v1.5.7 (v3 branching dispatch, MCP max_cost, synthesis failure-recovery ladder, ...).

The label will be added after the opened check run completes, deliberately — the failing opened run plus the label-triggered self-heal is an end-to-end test of this fix on its own PR.

Verification

🤖 Generated with Claude Code

…uto-tag can verify the SHA

The first cut of this check read labels from the event payload and used
cancel-in-progress concurrency. Both interact badly with auto-tag.yml's
"Verify CI checks passed" step, which refuses to tag while ANY non-green
check run sits on the merged head SHA:

- Label events don't move the head SHA, so the opened-event run that
  (correctly) failed or was cancelled before the label landed lingers
  non-green on the very SHA auto-tag verifies. This exact interaction
  blocked the v1.6.0 recovery: PR #583's auto-tag run refused to tag
  because the superseded Semver Label run sat cancelled on its head SHA.
- Payload-based runs can never be healed: a rerun replays the original
  payload, so it stays red even after the label is added.

Now the check fetches labels fresh from the API (rerunnable to green),
drops concurrency cancellation (a cancelled conclusion is just another
way to poison the SHA; runs take ~2s), and — once green — re-runs any
superseded non-green runs of itself on the same SHA so they re-fetch
labels and flip green, leaving the SHA clean for auto-tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploying synthpanel with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ebceaa
Status: ✅  Deploy successful!
Preview URL: https://ff2db95a.synthpanel.pages.dev
Branch Preview URL: https://ci-semver-label-self-heal.synthpanel.pages.dev

View logs

@claude-dataviking claude-dataviking added the semver:minor Bump minor version on merge label Jul 18, 2026
@claude-dataviking
claude-dataviking merged commit de0f8bb into main Jul 18, 2026
23 of 24 checks passed
@claude-dataviking
claude-dataviking deleted the ci/semver-label-self-heal branch July 18, 2026 18:27
claude-dataviking added a commit that referenced this pull request Jul 18, 2026
The "Verify CI checks passed" step counted EVERY check run on the merged
head SHA. The check-runs API returns runs from every check suite ever
started there, and label events don't move the head — so superseded
red/cancelled runs (e.g. the pre-label `opened` Semver Label run) parked
on the SHA forever and blocked tagging. This blocked the first v1.6.0
attempt. Fix: extract the logic into .github/scripts/verify-ci-checks.sh
and collapse to the latest run per (app, name) — started_at with id as
same-second tiebreak — before judging, mirroring GitHub's own merge-box
collapse. The script runs standalone (read-only) against any SHA.

Also:
- Stage root server.json in the version-bump commit. render_server_card.py
  rewrites it alongside the server card, but it was missing from git add
  and drifted on main (bit PR #583).
- Remove semver-label.yml's self-heal rerun step (added in PR #584): it
  existed only to flip superseded runs green for the old count-everything
  verify. With latest-per-name evaluation it is dead weight; dropping it
  also drops the actions:write permission.

Validated read-only against 9ebceaa (PR #584 head, filter=all to
reconstruct the pre-self-heal state): old logic refuses (stale
in_progress Cloudflare Pages attempt + failed pre-label Semver Label
run), new logic ignores the 3 superseded runs and passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-dataviking added a commit that referenced this pull request Jul 18, 2026
The "Verify CI checks passed" step counted EVERY check run on the merged
head SHA. The check-runs API returns runs from every check suite ever
started there, and label events don't move the head — so superseded
red/cancelled runs (e.g. the pre-label `opened` Semver Label run) parked
on the SHA forever and blocked tagging. This blocked the first v1.6.0
attempt. Fix: extract the logic into .github/scripts/verify-ci-checks.sh
and collapse to the latest run per (app, name) — started_at with id as
same-second tiebreak — before judging, mirroring GitHub's own merge-box
collapse. The script runs standalone (read-only) against any SHA.

Also:
- Stage root server.json in the version-bump commit. render_server_card.py
  rewrites it alongside the server card, but it was missing from git add
  and drifted on main (bit PR #583).
- Remove semver-label.yml's self-heal rerun step (added in PR #584): it
  existed only to flip superseded runs green for the old count-everything
  verify. With latest-per-name evaluation it is dead weight; dropping it
  also drops the actions:write permission.

Validated read-only against 9ebceaa (PR #584 head, filter=all to
reconstruct the pre-self-heal state): old logic refuses (stale
in_progress Cloudflare Pages attempt + failed pre-label Semver Label
run), new logic ignores the 3 superseded runs and passes.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:minor Bump minor version on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant