fix(upgrade): remove hard chain depth cap for nightly delta upgrades#444
fix(upgrade): remove hard chain depth cap for nightly delta upgrades#444
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 111 passed | Total: 111 | 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 1071 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.11% 95.25% +0.14%
==========================================
Files 167 167 —
Lines 22531 22542 +11
Branches 0 0 —
==========================================
+ Hits 21430 21471 +41
- Misses 1101 1071 -30
- Partials 0 0 —Generated by Codecov Action |
f7fdcc1 to
586f4fa
Compare
The MAX_CHAIN_DEPTH=10 limit silently rejected nightly delta upgrade chains when >10 commits landed on main between the current and target versions (~2-3 days of normal development). This caused fallback to full binary downloads (~30 MB) even when the total patch chain was much smaller. The existing SIZE_THRESHOLD_RATIO=0.6 already guards against chains where cumulative patch size exceeds 60% of the full binary — this is the meaningful cost/benefit check. The hard depth limit was redundant for nightly and fired before the size check could even run. Changes: - Rename MAX_CHAIN_DEPTH → MAX_STABLE_CHAIN_DEPTH (stable keeps the limit since it also controls GitHub Releases per_page) - Remove hard depth cap from resolveNightlyChain — nightly chains now rely solely on the size budget - Add debug logging when chain resolution is rejected (depth exceeded, size budget blown, validation failure, no tags found) so --verbose reveals why delta was skipped
586f4fa to
7fc7c06
Compare
|
Addressed BugBot feedback: added |
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.

The
MAX_CHAIN_DEPTH=10limit silently rejected nightly delta upgrade chainswhen >10 commits landed on
mainbetween the current and target versions (~2-3days of normal development). This caused fallback to full binary downloads (~30 MB)
even when the total patch chain was much smaller.
The existing
SIZE_THRESHOLD_RATIO=0.6already guards against chains where cumulativepatch size exceeds 60% of the full binary — this is the meaningful cost/benefit check.
The hard depth limit was redundant for nightly and fired before the size check could run.
Changes
MAX_CHAIN_DEPTH→MAX_STABLE_CHAIN_DEPTH(stable keeps the limit sinceit also controls GitHub Releases
per_page)resolveNightlyChain— nightly chains now rely solely onthe size budget
--verbosereveals why deltawas skipped