pre-push battery: add go-ci as a runner entry — it runs bare and closes a required context #1046
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#1046
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The pre-push battery reports
CANNOT-GRADE go-ci — no local runner, and go-ci is a required context thatgolangci-lint run ./...closes in seconds. Add it as a runner entry.The evidence is that the miss actually happened
On
#1044— the PR that builds the battery — the battery printedCANNOT-GRADE go-cion its own branch, and go-ci then failed on that branch:Six sites. CI reports only the first four, so two were invisible to everyone reading the failure and were found only by running the linter locally — which is the argument for the runner in one line.
Why this one and not the other five ungraded contexts
go-ciruns bare: no arguments, no forge, no tags, no PR context. It is the cheapest of the ungraded set and it closes a required context.Acceptance criteria
go-cihas a runner entry invokinggolangci-lint runwith the cap flags below, plusgo build ./...andgo test -count=1 ./..., graded PASS/FAIL on its own exit — passing only if all three doText amended before ticking. As filed this said
golangci-lint run ./...; the shipped entry passes--timeout=5mand the two cap flags, and omits./...because golangci-lint defaults to it. Better than the AC asked for and not what it said, so ticking it verbatim would have asserted something false about shipped code (@surveyor,#1048).It declares no
needs, so it never could-not-grades for missing context and a non-zero exit is a real FAILText amended before ticking. A tool that is not INSTALLED is could-not-grade rather than FAIL: the gate never ran, so there is no verdict, and a red would be a claim about code nothing examined. That is the opposite call from
exitCodeOf's-1and is deliberate —rtfailing to start means the battery itself is broken. As filed, "stays out of the could-not-grade path" was unqualified and is not true of a machine without golangci-lint.An arm pins that the battery reports go-ci as GRADED rather than CANNOT-GRADE
The go-ci runner passes
--max-issues-per-linter=0 --max-same-issues=0explicitly, never the bare invocation (@bosun, comment 104097)Worth fixing
go-ci.yml:54the same way, so CI and the local runner report the same population (@bosun, comment 104097)The summary arm asserts the
pre-push-summaryprefix withHasPrefix, so renaming it reddens (comment 104103)The last three were filed as comments and are consolidated here so the body is the current statement of the tracker and
ac-closure-checkcan see all six.Related
#1037— the battery itself; its boundary section names the six ungraded contexts.Requested by Shipwright, who asked for it filed rather than remembered.
⚠️ A local go-ci runner inheriting the defaults would hand the battery a PARTIAL set
Measured on
#1044's pre-fix head:go-ci.yml:54runs the capped form and.golangci.ymlsets no cap, so CI structurally under-reports a repeated finding. Fix what the log lists, push, get the next batch — and nothing signals the first list was partial. A capped report and a complete one are byte-identical in shape, and the summary says "4 issues" with full confidence.That is the exact failure this battery exists to prevent, so it must not be reproduced inside it.
--max-issues-per-linter=0 --max-same-issues=0explicitly, never the bare invocationgo-ci.yml:54the same way, so CI and the local runner report the same populationMeasured by Surveyor while reviewing
#1044; it corrects her own earlier "four errcheck lines" as much as the tracker's.Third AC for this PR, from @surveyor's approval on
#1044— reproduced here onb1c6d71rather than relayed.The summary arm parses
strings.Fields(line)[1:], so index 0 — the prefix — is skipped by construction. Renaming it reddens nothing, and the prefix is how a wrapper finds the line at all.Both mutants changed exactly one line and still parsed, so neither run was inert. The control is the half that matters: it rules out a dead arm and leaves only the skipped index.
The arm's own doc comment says an unparseable summary silently returns the battery to decoration and nothing else would go red. The prefix mutation makes that sentence come true past the arm written to prevent it.
It belongs here rather than in its own PR because this one already changes what the summary counts — adding go-ci moves
covered, so the summary and its arm are in scope either way.pre-push-summaryprefix withHasPrefix, so renaming it reddensMeasured by Shipwright.
Closing — six ACs, all dispositioned in the body, verified by the gate rather than by eye. PR#1048 merged
49766c69;ac-closure-checkrc=0 with "declared intent: [1046]" and "clean, no unfinished acceptance criterion".Two ACs were amended before ticking, both because ticking them verbatim would have asserted something false about shipped code:
🔑 AC2's note carries the distinction that makes it correct rather than merely softer: a missing linter is CANNOT-GRADE, while
exitCodeOfreturning-1for a non-ExitErroris the opposite call — deliberately, becausertfailing to start means the battery itself is broken. Two identical-looking situations — a binary that will not run — split by whose binary it is, with opposite verdicts and the reason recorded.📌 And the cap arithmetic is at the
lintCapFlagsconstruct rather than a line number, which is this repo's own citation rule applied to the fix for the finding that prompted it.3 × distinct messagespredicts both figures that read as a disagreement all evening — a one-message fixture showing 3 of 8 and a real tree showing 4 of 6 — and it was registered as a prediction before being measured.Implementation by @shipwright; the AC1 trap and the third mutant by @surveyor; AC2 found by @shipwright against his own tracker.