Repository navigation
fix(ci): catalog publishing skips runs whose only change is vector noise - #5480
Merged
Merged
Conversation
somanshreddy
approved these changes
Oct 12, 2026
somanshreddy
left a comment
Contributor
There was a problem hiding this comment.
Review at 77e81d1c: no blockers, approving.
What I checked
- The failure is real. The latest failing
catalog-publish.ymlrun on main (30359f80) logsCatalog publication: 1 files, 1 signed commit batches.and then 422 "No commits between main and bot/catalog-publish". 9 of the last 12 runs on main failed. sameGenerated(root, base)loses no real change compared withbatches.length === 0.catalogTreeisread-tree HEADplusgit add -A -- GENERATED_CATALOG_PATHS, so it covers the same untracked files (gitignore respected) and deletions thatcatalogChangesgets fromdiffplusls-files --others --exclude-standard. The check returns true only when every difference is anMon a vectors file andsameVectorsagrees. New files, deletions, metadata changes, and vectors that point elsewhere all still publish.- Clearing on noise is safe.
sameGenerated(base)only holds when main's committed catalog already equals what regenerating gives, apart from noise. Any open publish PR is obsolete then, exactly as in the old zero-files case. A pending real publication can't be dropped: regenerating from main's source reproduces it, so the check is false. - Tests:
scripts/catalog-publication.test.mjspasses 24/24. - Mutants:
| Mutant | Result |
|---|---|
Revert to batches.length === 0 |
Both noise tests fail |
sameGenerated ignores sameVectors (any vector change counts as noise) |
"point elsewhere" and "still publishes" fail |
batches.length === 0 || sameGenerated(...) |
Passes, as expected: an empty diff already makes sameGenerated true, so the new check covers the old one |
Non-blocking: This repeats the follow-up you already named: the clear decision and the publish list now come from two different diffs. A single owner would stop them drifting outside a fresh CI checkout.
— Somu
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.
What
"Publish catalog" on main stops failing with HTTP 422 "No commits between main and bot/catalog-publish", and stops opening pull requests whose only change is float noise in
local-vectors.bin. It has failed on 9 of the last 12 main pushes, including the v0.8.147 release merge.Why it failed
Regenerating the catalog rewrites
local-vectors.binwith tiny float differences.sameVectorsalready treats those as equal, butpublish()only cleared when zero files changed, so a noise-only run was treated as a real publication. That broke in two ways:local-vectors.bin(+0/-0).keptSnapshotBasesees no generated difference and opens a PR from a branch with no commits of its own, and GitHub answers 422.Signature in the failing logs:
Catalog publication: 1 files, 1 signed commit batches., followed by the 422.How
publish()now decides "nothing to publish" by comparing the regenerated catalog with main through the existingsameGeneratedcheck (vector noise counts as equal), instead of counting changed files. A noise-only run takes the same path as a no-change run: close any open publish PR and move the branch to main. Real changes, including real vector changes, publish as before.Test
Three new cases in
scripts/catalog-publication.test.mjs:Results:
publish-catalog.mjs, both noise cases fail (22 pass, 2 fail).oxfmt --check,oxlintandfallow audit --base origin/mainare clean.Known and left alone: on a noise-only run, the log still prints "Catalog publication: 1 files" before "No unpublished catalog changes", and
--dry-runstops before the new check.Follow-up worth doing separately: the "nothing to publish" decision now uses
sameGenerated's tree diff, while the publish list still comes fromcatalogChanges. CI's fresh checkout keeps the two in agreement. Deriving both from one diff would leave a single owner.