fix(ci): verify-index must read the authoritative index, not the raw CDN - #497
Merged
Conversation
verify-index fetched index.yaml from raw.githubusercontent.com seconds after the release job may have pushed gh-pages. raw.* is CDN-fronted and serves a stale copy for a while after a push, and ?nocache= does not reliably bust it -- so the job could read a clean index while the customer-facing one was already polluted, greening the exact backstop it exists to be. Now read through the contents API at ?ref=gh-pages, which is read-after-write consistent for a ref, and fail loudly on an empty read rather than reporting the invariants as holding on no data. Found by Bugbot on the staging->main promotion (client#495).
Contributor
Author
|
bugbot run |
Contributor
Author
|
👋 Heads-up — Code review queue is at 34 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c60167a. Configure here.
Actions parses workflow commands from stdout only, so an ::error:: sent to stderr fails the step with no annotation. Every sibling ::error:: in this file already uses stdout (Bugbot, client#497).
This was referenced Jul 30, 2026
Merged
saadqbal
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Bugbot flagged this on the
staging -> mainpromotion (client#495) and it's a fair hit on a guard I added yesterday in #467 — the finding is that the guard can pass while the thing it guards is already broken.The problem
verify-indexran:curl -fsSL "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/gh-pages/index.yaml?nocache=$GITHUB_RUN_ID"raw.githubusercontent.comis CDN-fronted and serves a stale copy for some time after agh-pagespush, and a?nocache=query parameter does not reliably bust it. This job runs seconds after thereleasejob may have pushed, so it could read a pre-push index, see no prerelease versions, and go green while the customer-facing index was already polluted — precisely the leak it was written to catch (the 1.9.7-rc published-as-stable incident).The fix
Read the blob through the contents API at
?ref=gh-pages, which is read-after-write consistent for a ref rather than CDN-cached:Plus an explicit empty-read guard: an unreadable index now fails the job instead of letting the invariant checks trivially "hold" against no data. That is the same failure shape as the empty-index commit I made during the gh-pages surgery — a critical read that silently returns nothing must never look like success.
Adds a job-scoped
permissions: contents: read.Verification
actionlint+shellcheckat CI-pinned versions: 6 findings before, 6 after — my change adds none (all six are pre-existing, in unrelated steps).Note on the promotion
client was correctly held out of today's prod hop by this finding. It should stay held until the
1.9.8chart bump reaches staging: promoting now would put 17 commits of chart changes onmainwhileChart.yamlstill reads1.9.7, somainwould no longer match the published 1.9.7 artifact. With this fix plus the bump on staging, the next prod hop promotes and cutsv1.9.8with content that matches its version.Note
Low Risk
CI-only change to a release guard; no runtime or customer install path behavior changes beyond making the backstop read the current index.
Overview
The post-publish
verify-indexjob no longer fetchesindex.yamlfromraw.githubusercontent.com(CDN can lag right aftergh-pagespushes, so checks could pass on a stale file while the public index was already wrong). It now loads the blob withgh apioncontents/index.yaml?ref=gh-pages, which is treated as authoritative for that ref.The job also fails if the read is empty instead of running invariant grep on no data, and grants
contents: readfor that API call. Workflow error annotations stay on stdout so Actions surfaces them reliably.Reviewed by Cursor Bugbot for commit 0b1bf13. Bugbot is set up for automated code reviews on this repo. Configure here.