bug(cli): review-eligibility answers ELIGIBLE when the forge never mentioned the whitelist #1342
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#1342
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?
rt review-eligibilityanswers ELIGIBLE out of a forge that never mentioned the field, becauseEnableApprovalsWhitelistis a plain bool and an absent field decodes to false.Found by @quartermaster reviewing
#1339, which implements#1277. Not blocking; he approved and it merged at7c03a86b.The defect
A plain
boolcannot distinguish "the forge said false" from "the forge said nothing". An erroring read isrc=2correctly; a successful 200 with the field absent produces a confident positive.The function's own doc comment states the rule this breaks: "A missing/unreadable input is rc=2; it must never collapse into an empty allowlist and produce a confident negative or positive." It holds for every input except this one.
Why it matters more than a normal nil-decode
#1277exists because @engineer's stamps readofficial=falseand silently never satisfied the gate — a reviewer believing their approval counted when it did not. A nil read rendering as ELIGIBLE recreates exactly that, through the tool built to prevent it.The fix, and the precedent is in the same struct
EnablePushandPushWhitelistDeployKeysare both*boolten lines above, from#1313/#1105. The rationale written there substitutes unchanged: "far too strong a claim to manufacture out of a forge that never mentioned it." Roughly 5 lines.Measured
enable_approvals_whitelistis PRESENT on every repo probed — release-toolkittrue, alcatraz-infrafalse, tmux-telltrue. So nil means an older or divergent forge, which is the argument FOR the pointer rather than against it.Why this was not a blocking review
The field is present on this forge, nothing consumes the command yet, and a false ELIGIBLE fails toward a stamp that does not count rather than a bad merge — the gate still holds. Drift-resistance, not a live defect. Filed rather than fixed inline because pushing to
#1339would have dismissed its only approval (dismiss_stale_approvals=true) to buy five lines.AC
EnableApprovalsWhitelistis*bool, and a nil read isrc=2rather than ELIGIBLE. The refusal comes BEFORE any identity read — reading identity to answer a question the forge never posed is the same overreach one layer down.internal/forgejopins that an omitted key decodesnilwhile explicitfalsedecodes non-nilfalse— the distinction the pointer exists for;cmd/rtpinsrc=2, empty stdout, no identity call. Mutation (collapse the nil branch into the false branch):applied=YES rc=1, restoredrc=0,applied=read off the file.