fix(delta-upgrade): filter non-versioned nightly tags from GHCR patch generation#753
fix(delta-upgrade): filter non-versioned nightly tags from GHCR patch generation#753
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Event View
Init
Issue List
Resolve
Upgrade
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
… generation A stale `nightly-test` tag in GHCR was breaking every nightly delta upgrade. `sort -V` placed it after all versioned tags, and since the generate-patches job runs before publish-nightly (so the current version's tag doesn't exist yet), the loop fell through to `nightly-test` as the previous version. Its empty binaries produced huge patches that exceeded the 60% size budget. - Harden all 3 GHCR tag grep filters to `'^nightly-[0-9]'` - Deleted the `nightly-test` tag from GHCR (version ID 706511735) - Refactor `validateChainStep` to return typed failure reasons instead of bare `null`, improving debug logging for future chain failures
2614602 to
535fc8d
Compare
|
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1626 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.35% 95.33% -0.02%
==========================================
Files 234 234 —
Lines 34764 34791 +27
Branches 0 0 —
==========================================
+ Hits 33145 33165 +20
- Misses 1619 1626 +7
- Partials 0 0 —Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 535fc8d. Configure here.
535fc8d to
73d36f8
Compare
Add a validation step after patch generation that checks each patch's size ratio against the binary. Patches exceeding 50% of binary size (below the client's 60% budget) are removed from the artifact upload and a GitHub issue is filed. This catches cases where the old binary download silently fails, producing useless full-size patches.
73d36f8 to
f04073d
Compare

Summary
A stale
nightly-testtag in GHCR (created Feb 26 for testing, never cleaned up) broke every nightly delta upgrade. This PR fixes the root cause, adds guardrails, and cleans up the damage.Root cause
generate-patchesruns beforepublish-nightly, so the current version's nightly tag doesn't exist yet. The tag loop (grep '^nightly-' | sort -V) fell through tonightly-test(which sorts last) as the "previous version." Its empty binaries (44 bytes.gz) produced ~23 MB patches that exceeded the client's 60% size budget on every upgrade attempt.What was done
Immediate cleanup (manual):
nightly-testtag from GHCR (version ID 706511735)patch-*tags that were generated against the emptynightly-testbinaries (201 good patches preserved)Preventive CI fix:
grep '^nightly-'→grep '^nightly-[0-9]'in all 3 locations (generate-patches, publish-nightly, cleanup-nightlies) to reject non-versioned tagsDiagnostic improvement:
validateChainStepto return a discriminated union (ChainStepResult) with typed failure reasons (version-mismatch,missing-layer,size-exceeded) instead of barenullbudget=XmessageFiles changed
.github/workflows/ci.ymlgrep '^nightly-[0-9]'filter + patch size validation step.github/workflows/cleanup-nightlies.ymlgrep '^nightly-[0-9]'filtersrc/lib/delta-upgrade.tsvalidateChainStepreturns typed failures,formatStepFailurehelpertest/lib/delta-upgrade.test.tsvalidateChainStep