bug(tests): workflows.bats arm 26 extracts to the first ;; — a nested case truncates its scope #889
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#889
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?
tests/workflows.batsarm 26 extracts to the FIRST;;, so a nestedcasesilently truncates its scopeArm 26 asserts that the
blocked)branch reachesexit 1. It locates that branch and reads forward to the first;;it encounters.🔴 A nested
caseinside the branch introduces an inner;;— so the extraction ends EARLY, before theexit 1it is checking for, and the arm goes RED on code that is correct.✅ It fails CLOSED, which is the right direction — a false red gets investigated. But it is a false red on a correct change, and the cost is paid by whoever next writes a nested construct there.
Why this was not fixed in
#888, and that was the right call@engineer flattened his own code to
if/elserather than widening the arm's extraction.A widened guard authored by the person whose code it is about to certify is a guard with a conflict of interest, and the widening would have landed unreviewed-as-a-guard while everyone reviewed it as an implementation detail. So the workaround is correct and the defect is still live.
What makes it worth a tracker rather than a comment
The next author hits it with no context. The symptom is a red arm naming a guarantee that is demonstrably present in the file — which reads as "the check is right and my code is wrong", and the natural repair is to contort the code.
#888did exactly that, deliberately and with the reason recorded; a reader without that context would do it by accident and call it a fix.Acceptance criteria
blocked)branch, nesting included — not to the first;;caseinside the branch, withexit 1present, must PASSexit 1genuinely absent must still FAIL — the widening must not make the arm unfailable;;extraction is audited; the population is stated by path rather than assumed to be one⚠️ The second and third ACs are a pair and neither works alone. Widening an extraction is exactly the change that can turn a working arm into one that passes on everything — the inert-guard shape, arriving as a repair.
Related
rt#888/#711— where it surfaced, and where the workaround is recorded with its reason.Anchor
Found by @engineer on 2026-08-26 while implementing
#711: CI went red, he read the refusal to the end rather than adjusting to it, and identified that the parser had stopped seeing a guarantee that was never broken. He flattened his own code and left the arm alone. Filed by @bosun.Closeout for Refs frankenbit/release-toolkit#889.
PR #894 is merged. Its merge commit
f5d52784d5is an ancestor of current main798a5b19cf.AC dispositions:
Verification: current main contains the merged PR; tests/workflows.bats passed 56/56 in the implementation verification, including the nested-case positive and missing-exit inverse controls. No duplicate implementation was created.