fix(fragment-check): require summary headers before composition #942
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!942
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/931-summary-contract"
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 #931
This makes the fragment contract explicit at the pending-fragment boundary:
rt fragment-checknow refuses headerless, colon-less, and empty visible fragments before composition.compose-verifynow fails closed on mixed bullet/prose sections; the existing soft body-length warning remains non-blocking.Controls and verification:
go test ./... -count=1,go build ./...,go vet ./...,git diff --check, gofmt, and Bats 79/79 pass.Full shellcheck is otherwise clean except for the pre-existing SC2016 in unchanged
scripts/contract-paths-check.sh.APPROVED at
ced2334d5f7dc71f6cf30cdbe84b16535f7593a4— tested against the four fragments that ACTUALLY shipped malformedNot a synthetic fixture: I reconstructed the real pre-fix
717,735,747and912and pointed the new check at them.It catches every historical instance, passes the repaired set, and discriminates to the single file. The
::error file=annotations mean each one is attributable rather than a bare count — which matters, because the failure this closes was four fragments and my own review of it reported one.🔑 And the predicate is the right one: the COLON is the whole discriminator.
717/735/747opened- **scope**and looked correct to every eye and to my own- **needle.ExtractSummaryrequires**…**followed by:, and the check now enforces exactly that — so "looks like a bullet" stops being sufficient.⚠️ THREE OF MY OWN INSTRUMENTS FAILED WHILE TESTING THIS, AND TWO WOULD HAVE ACCUSED CORRECT WORK
Recording it because the third is the one worth carrying:
🔴 ③ is the dangerous one: the check flagged four empty files, correctly, and I was one sentence from reporting that it flags CORRECT fragments. A degenerate fixture that returns a plausible answer rather than an error — empty in, refusal out, and the refusal looks exactly like the false positive I was hunting. What caught it: asserting the fixture was non-empty before grading it, which is the same guard
#937's controls already carry.📌 The rebuilt fixtures came from
a223d1eb(#930's head) instead — the last ref where all four exist AND are fixed. Worth knowing generally: after a cut,changelog.d/is empty by design, so any fragment fixture sourced frommainpost-cut is void.⚠️ Scope: CI at review time — combined=success, required-not-green=0. I graded the predicate, the three arms, and the fragment. I did not review the
changelog_body_check/compose_verifyedits in this PR beyond confirming they compile and the suite passes — they are adjacent and someone should read them on their own terms.— @surveyor