fix(prep): deduplicate body-referenced fragment commits (#672) #898
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!898
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rigger/672-cc-fragment-dedup"
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
Implements release-toolkit#672 for the Go
rt prepcomposer.Decision
Shape B is implemented: a subject-ref-less conventional commit can carry a body reference such as
Refs #N. Whenchangelog.d/<N>.<kind>.mdexists, the richer fragment entry is retained and the duplicate conventional-commit subject is suppressed. A subject(#N)trailer remains the preferred convention.Shape A is intentionally not implemented. The fragment-adding walk remains
--diff-filter=A; changing it toAMwould make an unrelated fragment edit suppress a genuine conventional-commit bullet. This is the polarity trap called out by the tracker.Controls and evidence
055e1f02d19b7bc9fcb67438ffd0fe08bfa4afbc: a temporary copy of the focused test was injected into the pre-change tree andgo test ./internal/prep -run '^TestCompose_suppressesSubjectRefLessCommitWhenBodyReferencesFragment$' -count=1exited 1 withsubject-ref-less body-reference commit's CC bullet was NOT suppressed; the duplicate subject was present beside the fragment prose.Refs #664remains in the rendered CC output when only663.fixed.mdexists, so the body-reference filter cannot make every arm pass.Files
internal/prep/prep.go- body-reference suppression and shared filename-ref matchers.internal/prep/prep_test.go- positive and inverse regression controls.docs/conventions.md- subject/body dedup convention.docs/fragment-style.md- fragment/commit pairing guidance.changelog.d/672.fixed.md- changelog entry.Verification
go test ./internal/prep -run '^TestCompose_suppressesSubjectRefLessCommitWhenBodyReferencesFragment$' -count=1- PASS.go test ./...- PASS.go vet ./...- PASS.go run ./cmd/rt fragment-check changelog.d- PASS; the existing #662 fragment emits its repository warning, while the new fragment passes.gofmt -l internal/prep/prep.go internal/prep/prep_test.go- no output.git diff --checkandgit diff --cached --check- PASS.Exact artifact
mainat055e1f02d19b7bc9fcb67438ffd0fe08bfa4afbc.rigger/672-cc-fragment-dedup.cd33f8c5d6c510d901d1245718a6c13301340a69.No review was requested and no merge was performed.
Reviewed exact head
cd33f8c5d6against exact base055e1f02d1.Approved. Shape A retains the load-bearing polarity: fragmentAddingShas still calls git log with --diff-filter=A, and this change does not widen it to AM. Shape B is a separate filename-identity body-reference pass. The focused positive and inverse controls pass: with 663.fixed.md present, a subject-ref-less commit whose body says Refs #663 is suppressed, while a commit saying Refs #664 remains rendered. Thus an ID with no corresponding fragment cannot suppress the unrelated conventional-commit bullet.
The five-file diff is scoped to the prep implementation, its regression, the two convention docs, and the #672 fragment. go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass at this exact head. Forgejo CI was pending at review time. This review does not establish #884/main production-unblocked; that still requires successful release/decide+act evidence.
Reviewed exact head
cd33f8c5d6against exact base055e1f02d1.Approved. Shape A retains the load-bearing polarity: fragmentAddingShas still calls git log with --diff-filter=A, and this change does not widen it to AM. Shape B is a separate filename-identity body-reference pass. The focused positive and inverse controls pass: with 663.fixed.md present, a subject-ref-less commit whose body says Refs #663 is suppressed, while a commit saying Refs #664 remains rendered. Thus an ID with no corresponding fragment cannot suppress the unrelated conventional-commit bullet.
The five-file diff is scoped to the prep implementation, its regression, the two convention docs, and the #672 fragment. go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass at this exact head. Forgejo CI was pending at review time. This review does not establish #884/main production-unblocked; that still requires successful release/decide+act evidence.