fix(decide): preserve changelog refusals (#697) #908
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!908
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rigger/697-refusal-preservation"
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?
Scope
Fixes #697 on the surviving
rt decidesurface.scripts/release-decide.shis already absent from current main, so this is a behavior fix in the Go replacement, not a Bash resurrection or a docs-only disposition.Measured boundary
Measured against live main
516e4fff4c8ae98e12f715d914e30e73710841a5:release-decide.shinvocation in the release workflow. The remaining mentions are comments/prose and the retired oracle surface.2>/dev/null || truesearch finds only cleanup, deliberate no-match test commands, documentation, and explanatory comments; no liverelease-decide.shcallsite remains.internal/decide.ExecGitRunnerpropagates command errors.lookupMergedPRalso propagates non-404 errors;checkLayer2andcheckLayer3turn lookup failures intoverdictFail, and the cut allowlist admits onlypassorn/a, so those paths fail closed.checkOrphanChangelog: a non-missing CHANGELOG read error and aLatestVersionparser error both returned nil, the same result as a valid absent/no-cut changelog. Both disabled the orphan guard silently.The new boundary is explicit: a missing path remains a valid no-op; an existing path that cannot be read returns a named fatal refusal; a malformed heading returns a named fatal refusal; a valid changelog with no released section remains a no-op.
Controls
TestDecide_697UnreadableChangelogRefuses: existing-but-unreadable path is fatal and names #697 plus the path.TestDecide_697MalformedChangelogRefuses: parser refusal is preserved witherrors.Is(ErrMalformedHeading)and a #697 diagnostic.TestDecide_697NoReleasedSectionRemainsEmpty: valid empty latest-version result is still accepted.TestDecide_697RefusalReachesOperatorStderr: the CLI returns exit 1, emits no stdout, and exposes the #697 refusal on stderr.Mutation evidence: with the new tests present against the unchanged base, the unreadable and malformed arms both went red while the valid no-cut inverse stayed green. After the fix, the focused and full suites pass.
Verification
go build ./...go vet ./...go test ./... -count=1golangci-lint run --timeout=5m-> 0 issuesgofmt -l .: cleangit diff --check: cleanExact lineage
12843c5b8f1d23f0565cfdafd9f74e45544a5f2mainwhen this PR was opened:516e4fff4c8ae98e12f715d914e30e73710841a5c62205b9e926c07f5f23d783ccd5a04eb6b0d611git merge-tree --write-tree origin/main HEAD: exit 0Changed files:
internal/decide/decide.go,internal/decide/decide_test.go,cmd/rt/decide_test.go, andchangelog.d/697.fixed.md.No review was requested and no merge was performed.
2>/dev/null || trueflattens downstream refusals into empty answers, defusing the three-state seams #697Reviewed exact head
c62205b9e926c07f5f23d783ccd5a04eb6b0d611.The handed-off server base was
516e4fff4c8ae98e12f715d914e30e73710841a5; this branch's merge-base is12843c5b8f1d23f0565cfdafd9f74e45544a5f2d, and live main/base has advanced since handoff. The own diff from the merge-base is exactlychangelog.d/697.fixed.md,cmd/rt/decide_test.go,internal/decide/decide.go, andinternal/decide/decide_test.go(+127/-2). No rebase was requested for this review.The code paths are sound: an absent changelog remains accepted, while an existing non-missing read error refuses with a named #697 diagnostic; a malformed version heading refuses through
changelog.ErrMalformedHeading; and a valid changelog with no released section still returns the no-cut result. Mutation checks confirmed each refusal assertion fails when its refusal is removed, and the no-cut assertion fails when the empty result is made fatal.BLOCKER: the required fragment gate fails at this exact head.
go run ./cmd/rt fragment-check changelog.dreportschangelog.d/697.fixed.mdline 3 failing check 7: its sentence is 35 words, over the 30-word limit. The other output is pre-existing warning noise; this new fragment is the failure. Split that sentence and rerun fragment-check before merge.Focused and full Go tests,
go vet ./..., format, and diff checks pass, but this fragment-density failure requires changes. Requesting changes for exact headc62205b9e926c07f5f23d783ccd5a04eb6b0d611.Reviewed exact head
964237f1adebd9626c420cd397722b651116cc31.The live server base/main at review time is
32f4bfe49d571da407d6740c97b19e8780b3bb95; the merge-base is12843c5b8f1d23f0565cfdafd9f74e45544a5f2d. This follow-up is a direct child of the previously reviewed headc62205b9e926c07f5f23d783ccd5a04eb6b0d611and changes onlychangelog.d/697.fixed.md, splitting the density-failing sentence. No rebase was needed or requested.The refusal/acceptance implementation is unchanged from the previously reviewed head: an absent changelog remains accepted; an existing non-missing read error refuses with the named #697 diagnostic; malformed version headings refuse through
changelog.ErrMalformedHeading; and a valid changelog with no released section remains a no-cut result. Each refusal assertion and the no-cut inverse were mutation-verified on that unchanged code.go run ./cmd/rt fragment-check changelog.dnow passes density for the new fragment. Focused and full Go tests,go vet ./..., format, and diff checks also pass at this exact head.Approval is for exact head
964237f1adebd9626c420cd397722b651116cc31.Reviewed exact head
964237f1adebd9626c420cd397722b651116cc31.The live server base/main at review time is
32f4bfe49d571da407d6740c97b19e8780b3bb95; the merge-base is12843c5b8f1d23f0565cfdafd9f74e45544a5f2d. This follow-up is a direct child of the previously reviewed headc62205b9e926c07f5f23d783ccd5a04eb6b0d611and changes onlychangelog.d/697.fixed.md, splitting the density-failing sentence. No rebase was needed or requested.The refusal/acceptance implementation is unchanged from the previously reviewed head: an absent changelog remains accepted; an existing non-missing read error refuses with the named #697 diagnostic; malformed version headings refuse through
changelog.ErrMalformedHeading; and a valid changelog with no released section remains a no-cut result. Each refusal assertion and the no-cut inverse were mutation-verified on that unchanged code.go run ./cmd/rt fragment-check changelog.dnow passes density for the new fragment. Focused and full Go tests,go vet ./..., format, and diff checks also pass at this exact head.Approval is for exact head
964237f1adebd9626c420cd397722b651116cc31.