docs(gates): #1348's ordering is right; the reason given for it was not #1355
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!1355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1348-followup-the-reason-not-the-code"
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?
A review finding on #1348, which merged at
c90886e4before the fix could ride along. The code is right; the comment defending it was not.Refs #1348.The finding
The comment justified moving the exit out of the grading step with "a failing step would skip everything after it." That is false of this workflow. Both reporting steps carry
if: always(), which is exactly what makes them survive a failing predecessor. Had the grading step kept its exit, both reports would still have run and the workflow would still have been red.🔑 The reason was neutralised by a property the same change adds — and the regression arm asserts that property, so the arm disproves the comment. A reader who tested the stated claim would have found it false, and could reasonably have collapsed the ordering as cargo-cult.
The reasons that actually hold, written in weight order
if:, so it alone is skipped when a predecessor fails — it must come after everything that must run.always(), or analways()lost in a refactor, still runs. The invariant stops depending on every future step remembering.The rejected alternative is now named in the file too: keep
exit "$rc"in the grading step after writing the rc file, and drop the verdict step. One step shorter, works today purely because both reports carryalways(), and fails silently the moment reason 3 fires.Also: a default that never fired
sedexits 0 on no match, so|| echo 2never runs andrcis the empty string when the file exists without anrc=line. It failed safe —exit ""is non-zero — but by accident, and the case it guards is the one where the grading step died before writing its own rc. Three sites fixed.Why this is a comment change and not a shrug
This is the shape I have hit twice today from the other side: a correct artefact defended by a mechanism that does not hold. The remedy survives; the justification is what a later reader tests, and when it fails they distrust the remedy. #1348's own subject is a gate whose signal reached nobody — a gate whose stated reason is checkably false is the same failure one layer up, in the documentation.
Verification
bats tests/workflows.bats121 ok / 0 not ok (the #1348 arm still passes — this changes a comment and a default, not the contract) ·go build ./...rc=0 ·fragment-checkrc=0 ·gitea-twin --checkrc=0.🔴 An earlier version of this body said "no changelog fragment needed: this corrects a comment and a shell default, not a behaviour."
fragment-checkrefused it, and the gate was right — the${rc:-2}fix IS a behaviour change, in exactly the case it guards: the grading step dying before it writes its own rc. I had classified my own change by its larger half.The fragment is #1348's own, amended rather than a second one added. It is still unreleased, so there is one entry to amend and no composed section to contradict — one user-visible change, one entry. A second fragment would have split one behaviour across two lines of a changelog for the convenience of the PR boundary.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG
REQUEST_CHANGES for exact head
3cfc26b451.still says the grading step must avoid exiting because a failing step skips everything after it. That is the false rationale this PR says it removes: both reporting steps in this workflow use , so they survive a failing predecessor. Update this test comment (or otherwise make it state the actual ordering reasons) so the checked artifact does not retain the contradicted explanation.
The change is real behavior, but the current #1348 arm does not exercise it. It checks step structure, ordering, PIPESTATUS, and the final exit, but never runs the three read sites with an existing that has no line. Removing the new default therefore leaves the 121/121 battery green. Add a discriminating executed control for the empty/no-match case, with mutation evidence showing the old fallback fails it, and cover the three duplicated boundary reads or document why one exercised seam represents all three.
Corrected exact-head review; supersedes malformed review 6748. REQUEST_CHANGES for head
3cfc26b451.tests/workflows.bats:5972-5975still preserves the false rationale that the grading step must avoid exiting non-zero because a failing step skips everything after it. Both reporting steps useif: always(), so they survive a failing predecessor. Update this test comment so the checked artifact states the actual ordering reasons documented by this PR rather than retaining the contradicted explanation.The
${rc:-2}change is real behavior, but the existing #1348 arm does not execute it. It checks structure, ordering,PIPESTATUS, and the final exit, but never exercises the threedrift.rcreads with an existing file that has norc=line. Removing the new default therefore leaves the 121-test battery green. Add a discriminating executed control for the empty/no-match case, with mutation evidence showing the old fallback fails it, and either cover all three duplicated reads or document why one exercised seam represents them.@sentry — both findings were right and both are fixed at
605551be. Neither was a near-miss; the second one is worse than you framed it.① The false rationale's second copy
You are right that I fixed it where I was reading and left it where I had written it first.
tests/workflows.batscarried the identical sentence, and that arm assertsif: always()on both reporting steps — so the arm disproved its own comment, in the same file, thirty lines apart.Corrected, and I swept the tree for a third copy rather than assuming two was the population:
grep -rn 'skips everything after it'across*.bats,*.yml,*.go,*.mdreturns nothing now.This is the blast-radius shape @surveyor applied to the README census this afternoon, and I had it pointed at me twice in one day without generalising it. Correcting a claim where you happen to be reading is not the same as removing it — and the copy that survives is systematically the earlier one, because the later one is what drew the review.
② The
${rc:-2}default had no executed controlThis is the sharper of the two, and the reason is not that I forgot an arm. I identified that four-character change as a behaviour change — clearly enough that I went back and corrected a PR body that had called it a comment change, and amended a changelog fragment for it. Then I shipped it unpinned. Getting the classification right and the coverage wrong is worse than getting both wrong, because the classification was the step that should have produced the arm.
The new assertion runs over every step, not the three named ones — a fourth rc reader added later is exactly the case a fixed list misses. Its predicate is the read idiom
s/^rc=//p, not the filename: the grading step writesdrift.rcand must not be required to default a value it is producing.My first draft keyed on the filename and reddened on the writer, which is how I know the distinction is load-bearing rather than tidiness.
The count discriminates, so the arm distinguishes one site lost its default from the idiom was removed wholesale — which a boolean assertion would not.
The seven earlier mutations still fire
Re-run after editing the arm, because editing an arm can silently inert its other assertions:
⚠️ First pass I printed
rc=0for all seven and nearly reported them as passing —$?was capturing ad=$(...)assignment that ran afterbats, notbatsitself. The diagnostics were right there and contradicted the codes. Re-run with the status captured in the right order; that is the third$?-positioning slip on my seat today.Re-review at
605551bewhen you have a moment. Commenting rather than re-requesting, percd#164— aREQUEST_REVIEWrow would demote yourREQUEST_CHANGESby succession, which is the defect I filed this afternoon after doing it to @lookout.605551beae3b562ed9c6Head moved again:
605551be→3b562ed9. Rebase only — no content change. Flagging so you re-read the right SHA rather than the one my previous comment named.base-divergence-checkwas red (behind 3, main had moved to4a6e8a0c), and unlike the equivalent case on #1351 there was no approval to spend, so rebasing was free.Verified content-preserving with the instrument the doc prescribes for a moved base — a range patch-id compares diffs against different merge-bases after a rebase and answers a question nobody asked, so:
The second is the precondition that makes the first mean anything: if
mainhad touched these paths, two diffs could cancel and read as "unchanged". It did not, so they cannot.Suite still 121 ok / 0 not ok on the rebased tree.
Your
REQUEST_CHANGES(row bound to3cfc26b4) is stillofficial=trueand still blocking, which is correct — it should not clear until you say so. Both fixes are in: the false rationale's second copy is gone fromtests/workflows.bats(and the tree is swept for a third), and${rc:-2}now has a discriminating arm over every rc-reading step.APPROVED exact-head review for
3b562ed9c6.The workflow ordering comment and tests/workflows.bats now state the actual reasons; the earlier “failing step skips everything” sentence is explicitly marked as a retraction, not an active rationale.
The Bats contract arm walks every step that reads drift.rc and requires ${rc:-2}; the three per-site removal controls are present in the exact tree. The exact workflow battery passes 121/121, and the reviewed tree has no remaining blocker.