fix(decide): a first cut no longer infers v1.0.0 from a breaking commit #1571
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit!1571
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/1483-first-cut-no-auto-major"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #1483
First PR from the rt-bugfix-loop pilot.
Summary
rt decide: on a virtual anchor (no manifest, no stable tag), an auto-inferred major now gets thepre_v1_breaking_to_minorremap whatever the config says. Sofeat!:as the first commit cutsv0.1.0, notv1.0.0.autobump source is remapped.--bump-override majorand abump/majorlabel are a human choosingv1.0.0, and still reach it.rt prep: the auto bump gets the same rule when the CHANGELOG has no cut and there is no tag. The workflow passes decide'snext_versionas--target-version, so this only matters for a hand-runrt prep. Without it, the two verbs would disagree on a fresh repo.integration.md§Bootstrapping andconventions.md.bump/*-label option is removed.What each AC gets
bootstrapVirtual;--bump-override majorstill reachesv1.0.0firstCutInferred := a.bootstrapVirtual && bumpSource == "auto", ORed into the policy flag. Pinned byTestDecide_1483OverrideMajorOnBreakingFirstCutReachesV1.TestDecide_1483FirstCutMatrix: oneREADME.md, nine subjects, a fresh repo per arm. Every arm matches the issue's measured table, exceptfeat(release)!:, which moves fromv1.0.0tov0.1.0.noopis correct and adoption is not a release, using the issue's sentence. The README callout gets the same change.bump/*-label option is removed, not correctedDecision tree
Which bump sources to remap.
autoonly. This is right because the issue's argument is about an inference: no previous release, so nothing to break.--bump-override majorintov0.1.0, and so break AC1.The existing config flag still applies to every source, as before. That behaviour is unchanged.
What counts as a first release in
rt prep.Not chosen: failing closed on
autoat a virtual anchor, and flooring the bump at patch. The issue records both as rejected.Self-bootstrap (AGENTS.md §2)
No re-pin: toolkit-self floats
@main(AGENTS.md §2.1). Go and docs only; adopters get it from the next cut tag.⚠️ This is a behaviour change for adopters. A fresh repo whose first release-relevant commit is breaking used to cut
v1.0.0and now cutsv0.1.0. It only affects repos with nothing released, and the issue argues that is the point. The fragment says how to choosev1.0.0.Verification
go test ./...ingolang:1.25on an LF clone atd28b424: 30/30 ok.golangci-lint(forgejo-ci-go:latest): 0 issues.fragment-checkcontent mode: density PASS, 315 chars.autoon any anchor.FirstRelease.--bump major.FirstRelease.Review request
@ the rt PR Reviews session, please verify at source (AGENTS.md §6):
bumpSource == "auto"is the only source string the auto path sets. Check that no other path (e.g. a fragment-only bump) reaches the remap under a different source name and gets skipped.--prerelease) on a virtual anchor still behaves.effectivefeedsprereleaseLeveltoo.🤖 Generated with Claude Code
Verdict: CHANGES NEEDED at
d28b424a328e7c99f8c0838e697dc7280172a2f2Posted as COMMENT, because the forge identity is
claude, the PR's author (rt-bugfix-loop pilot: Alex keeps the approve-and-merge click).Refs #1483
The fix is right and I verified it at source. One item blocks: the PR changes what a
--prereleasefirst cut produces, and no test or doc covers that change.Blocking: the prerelease first cut changes, untested and unstated
effectivealso feeds the prerelease path's start-a-series arm (prereleaseLevel = effective, thedefault:case). So on a virtual anchor,feat!with--prerelease alphaand no override now starts a different series.I measured it with a probe that reuses this PR's helpers (
newRepo,commitFilesOnly,decideOn), runninginternal/decideingolang:1.25:decide.goatfeat!+--prerelease alpha+ --bump-override major9048da0(base)next_version=1.0.0-alpha.11.0.0-alpha.1d28b424(this head)next_version=0.1.0-alpha.11.0.0-alpha.1The new value follows the issue's argument: there is no previous release, so there is nothing to break. The deliberate path still reaches
1.0.0-alpha.1. But:prereleaseLevel = bumpLevelin that arm passesinternal/decide,internal/prepandcmd/rt.0.1.0-alpha.1where they used to get1.0.0-alpha.1.Fix:
9048da0'sdecide.goand green here.integration.mdbullet, or to the fragment, saying a--prereleasefirst cut follows the same rule.Your three questions, verified at source
1. Is
autothe only inferred source? Yes.updateDecisionsets exactly three values:rolling_pr_label(decide.go:1098);auto(:1102);cli(:1107).A fragment-only bump cannot arrive under another name:
autoBumpreturnsmaxBump(fragBump, commitsBump)(:1317-1336), so fragments and commits both come throughauto. My mutantbumpSource != "cli"(which remaps a label too) is killed byTestDecide_1483MajorLabelOnFirstCutReachesV1.2. The prerelease path. It behaves as the issue argues, but it is the blocking item above.
3. The docs wording.
integration.md§Bootstrapping carries the issue's sentence nearly verbatim ("The first rolling release PR appears only after a release-relevant commit (fix:/feat:) reaches the trunk, and adding release-toolkit is not itself such a change").fix(release): adoptrecommendation and no patch floor.bump/*-on-noop option is gone from both files.bump/majoris now offered only "once one exists".bump_overridedispatch input the new text names exists (reusable-release.yml:47,examples/go-project/.../release.yml:8).v1.0.0first-cut claim is left in README,integration.mdorconventions.md.Other checks
bumpSource != "cli": killed by the label test.a.bootstrappedfora.bootstrapVirtual): killed byTestDecide_1483ReleasedAnchorKeepsInferredMajor.bumpLevel: survives (the blocking item).go test ./...ingolang:1.25passes in every package.d28b424.mainis9048da0, the PR's base.Non-blocking
rt decideand a hand-runrt prepdisagree in one case. Take a repo whose CHANGELOG has a cut but which has no manifest and no tag:FirstRelease(noPriorCut && lastTag == "") does not.The workflow passes decide's
next_versionas--target-version, so only a hand-runrt prepsees the difference. Your decision tree picked prep's rule on purpose; this is just a note that decide does not apply the same one.HOLD: adding the prerelease first-cut test and a doc clause from review 7291 as a new commit. I'll post the new head here when it's pushed.
HOLD released. New head:
76da73a6370291bd0e8beed7eef7b6c52b60e34eOne new commit on top of
d28b424, answering review 7291:TestDecide_1483PrereleaseFirstCut(the reviewer's code). With--prerelease alpha,feat!:on a first cut gives0.1.0-alpha.1, and with--bump-override majorit gives1.0.0-alpha.1.integration.md: the breaking-commit bullet now says a prerelease first cut follows the same rule.Checks:
prereleaseLevel = bumpLevelin the default arm) is now killed, byTestDecide_1483PrereleaseFirstCut/override=.internal/decide,internal/prepandcmd/rtpass inforgejo-ci-go. Lint: 0 issues.Non-blocking note, not changed here: with a CHANGELOG cut but no manifest and no tag, decide remaps (virtual anchor) while a hand-run prep does not. In the workflow, prep takes decide's version as
--target-version, so the two only differ for a hand-run prep.Verdict: APPROVE at
76da73a6370291bd0e8beed7eef7b6c52b60e34eThis replaces review 7291, which was at
d28b424. It is posted as COMMENT because the forge identity isclaude, the PR's author. Under the rt-bugfix-loop pilot, Alex keeps the approve-and-merge click.Refs #1483
Delta
d28b424..76da73a, verified at sourced28b424is an ancestor of76da73a, so nothing was rewritten. The base is still main9048da0.TestDecide_1483PrereleaseFirstCutis the test from 7291, unchanged.golang:1.25,internal/decide,internal/prepandcmd/rtall pass on this head.prereleaseLevel = bumpLevel(thedefault:arm) through/override=.9048da0'sdecide.go, so it pins the behaviour this PR introduces.integration.mdnow says a prerelease first cut follows the same rule,v0.1.0-alpha.1and notv1.0.0-alpha.1. That matches the measurednext_versionon both arms.76da73aare success.Everything I verified in 7291 still holds:
autois the only remapped source. Fragments come in throughautoBump.The non-blocking note (decide versus a hand-run prep, when a CHANGELOG has a cut but there is no manifest or tag) is acknowledged on the PR. It does not hold up the merge.
Landing identity record
76da73a6370291bd0e8beed7eef7b6c52b60e34e76da73a6370291bd0e8beed7eef7b6c52b60e34eThis is a post-merge identity record. It does not retroactively review the landed object; it records whether the server landed the object that an official approval named.