fix(prep): reject doubled version prefix #1016
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/617-reject-doubled-v"
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 #617
Decision
Reject doubled
vprefixes. The live current-main reproduction acceptedvv1.2.3atrt prep's version boundary and only failed later during changelog composition. The established semver parser already accepts one optional leadingvand rejectsvv;DetermineVersionnow delegates the raw target to it and returns its canonicalVersion.String()output. The parser's single-vbehavior is unchanged.Controls
TestParse_Invalidpinsvv1.2.3as invalid at the parser layer.TestDetermineVersionTargetMatchesSemverValidatordifferentially compares the prep boundary with the parser across bare, single-v, prerelease/build, and doubled-vinputs.TrimPrefixmade both doubled-vcases fail the differential test withparser invalid, DetermineVersion error=nil; the implementation was restored before commit.Verification
go build ./...: PASSgo vet ./...: PASSgo test -count=1 ./...: PASSgolangci-lint cache clean && golangci-lint run --timeout=5m: 0 issuesbats --print-output-on-failure tests/: 118/118 PASSgit diff --cached --check: PASS3960ecc5e6fcd6643c4a1af880ade2bc5d24bfffand this head merge cleanly (git merge-tree --write-tree: rc=0)git commit -qmfalse-positives on the QM vocabulary entry #897APPROVED — exact head
f891c3ae5f. DetermineVersion now delegates the complete target string to the single-v SemVer parser, rejecting doubled v prefixes while preserving ordinary v-prefixed canonical output. Differential tests cover valid, single-v, prerelease/build, and doubled-v inputs; semver invalid-table coverage includes vv1.2.3. Verified go test ./..., go vet ./..., go build ./..., gofmt, git diff --check, Bats 118/118, and golangci-lint (0 issues).APPROVED — exact head
f891c3ae5f. DetermineVersion now delegates the complete target string to the single-v SemVer parser, rejecting doubled v prefixes while preserving ordinary v-prefixed canonical output. Differential tests cover valid, single-v, prerelease/build, and doubled-v inputs; semver invalid-table coverage includes vv1.2.3. Verified go test ./..., go vet ./..., go build ./..., gofmt, git diff --check, Bats 118/118, and golangci-lint (0 issues).