fix: dev branch must skip past a pre-GA hotfix's reserved micro version (BERTE-609)#277
fix: dev branch must skip past a pre-GA hotfix's reserved micro version (BERTE-609)#277charlesprost wants to merge 1 commit into
Conversation
…on (BERTE-609) A pre-GA hotfix branch (e.g. hotfix/10.0.0) permanently reserves its X.Y.Z version the moment it is cut, since every version it can ever produce is X.Y.Z.<hfrev>, never a bare X.Y.Z. The parent dev branch (development/10.0) must therefore target X.Y.(Z+1), not X.Y.Z. _update_major_versions() already applied this rule for major-only dev branches (development/10 skipping past hotfix/10.0.0 to 10.1.0), but not for minor dev branches, which ignored phantom hotfix branches when computing latest_micro. Fold phantom hotfix micros into that computation too, mirroring the existing major-only handling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
LGTM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #277 +/- ##
=======================================
Coverage 90.00% 90.00%
=======================================
Files 81 81
Lines 11048 11051 +3
=======================================
+ Hits 9944 9947 +3
Misses 1104 1104
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closed as a side effect of renaming the source branch to follow the |
Summary
hotfix/10.0.0) permanently reserves itsX.Y.Zversion the moment it is cut: every version it can ever produce isX.Y.Z.<hfrev>(.0pre-GA,.1+ post-GA), never a bareX.Y.Z. The parent dev branch (development/10.0) must therefore targetX.Y.(Z+1), notX.Y.Z, or a laterX.Y.Ztag cut from the dev branch would collide with the hotfix line while describing different code._update_major_versions()already implements this rule for major-only dev branches (development/10correctly skips pasthotfix/10.0.0to target10.1.0), but the equivalent minor-branch path ignored phantom hotfix branches when computinglatest_micro. This change folds phantom hotfix micros into that computation too, mirroring the existing major-only handling.test_branch_cascade_2digit_with_pre_ga_hotfixto assert the corrected expectation (development/10.0→10.0.1, not10.0.0) both pre- and post-GA, and added assertions on the hotfix's own version (10.0.0.0→10.0.0.1) to make the pairing explicit.Ref: BERTE-609
Test plan
test_branch_cascade_2digit_with_pre_ga_hotfixupdated and passingQuickTestcascade/hotfix/phantom test class passing (29 tests)TestQueueing/TaskQueueTestsfailures pre-exist on unmodifiedmain(require the full mock-server CLI harness, not bare pytest)🤖 Generated with Claude Code