test: Layer-2/3 cut-safeguard FAIL-path coverage (the safeguard's protective behavior is currently untested) #64
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#64
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?
Why this exists now
Slice 1b (PR #63) added the three-layer cut-safeguard to
release-decide.sh. The whole point of the slice (Surveyor a315 catch on slice 1): subject-regex-alone is insufficient onceact on decisionis live — a false-subject-match must NOT false-CUT. Layer 2 (branch-source-check) + Layer 3 (author-identity) exist precisely to flip cut→update when a non-rolling merge happens to carry achore(release): prepare vX.Y.Zsubject.The slice-1b tests verify the safeguard is wired, but not that it works:
release-decide.batsslice-1b tests run--dry-run, which setsFORGEJO_API_DRY_RUN→ Layer 2 + Layer 3 both returnskip→skipis treated as pass →mode=cut.fail→mode=updatewithsafeguard_fail=layer{2,3}surfaced).In other words: the safeguard's actual protective behavior — the reason the slice exists — has no unit coverage. A regression that broke Layer 2's
failbranch would not be caught by the current suite.Why it was deferred (and why that's defensible, not blocking)
LAYER2 != fail && LAYER3 != fail → cutgate and theSAFEGUARD_FAILemit are correct.So this is a unit-coverage gap with a downstream empirical backstop — not a correctness hole. Filing per deferral-discipline so the gap is substrate-recorded rather than living only as a PR-body bullet.
What a fix covers
head.ref != release-prep/rolling→mode=update,safeguard_fail=layer2emittedmerge_commit_sha(direct push / window-miss) →mode=update,safeguard_fail=layer2release_authorconfigured + merged PR author mismatch →mode=update,safeguard_fail=layer3safeguard_failworkflow output reaches theact on decisionupdate branch's log lineMechanism note (non-prescriptive)
PR #63 §"What this PR does NOT do" scopes this to "API mock infrastructure," which may be heavier than needed. The tests already
run "$SCRIPT"as a subprocess; a lighter path could be a function-stub offorgejo_find_pr_by_merge_sha(or a PATH-shadowedcurl/forgejo_api_call) returning canned JSON for the non-dry-run branch — if the script's sourcing order allows the override to stick. Whichever is cleaner in the harness is the implementer's call; the AC is fail-path coverage, not a specific mock layer.Refs
Filed: 2026-06-25 from Surveyor's #63 review.
refs/pull/N/headon auto-delete-branch merge #92