bug(cli): 11 of 29 verbs exit non-zero with no output on an unknown flag #1133
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#1133
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?
Eleven of the toolkit's 29 verbs exit non-zero with no output at all when given an unknown flag. The caller sees a failure with nothing to act on.
Measured — all 29 verbs,
<verb> --bogus-flagWhy it matters
The silent group includes the recovery and gate verbs — the ones someone reaches for under pressure, guessing a flag name. It cost several minutes on rt#1131 assuming an
--applyflag existed:rt recover-pending-cut --applyreturns rc=1 and prints nothing, which is indistinguishable from the verb refusing for a real reason.Mechanism is cobra's
SilenceErrorswith anArgs:/flag validator that runs beforeRunE, so the error is suppressed before anything writes.AC
compose-verify's behaviour is the target shape — rc=2 and the offending flag namedAnchor
Swept across all 29 verbs by @engineer, 2026-09-04; spot-checked independently on four. Sibling: the
register-checkcould-not-scan tracker filed alongside this one, which is the same root cause with a worse outcome.Duplicate of #1123 — same root defect (
SilenceErrors+ a validator that runs beforeRunE), measured from the unknown-flag side rather than theArgs:side.Closing into #1123 — survivor is the earlier tracker, per CLAUDE.md §mutual deference, since neither side had ported content and the transfer rule could not discriminate.
The 29-verb sweep, the
compose-verifytarget shape and therecover-pending-cut --applycost are ported to #1123 and read back as present. Two ACs carried across.every verb names an unknown flag on stderr and exits non-zero— DEFERRED → #1123, which owns itcompose-verify's behaviour is the target shape— DEFERRED → #1123an arm covering all verbs— DEFERRED → #1123My filing error: I had #1123 in context this morning and filed a second tracker for the same mechanism from a different measurement.
AC sweep, re-derived from
origin/main.✅ "an arm covering all verbs, so a new one cannot join the silent group" is TRUE and checkable — the arm exists and is named for exactly that property.
⚠️ NOT verified: that it currently PASSES, and that all 29 verbs are reached. A test named for a property is not the property; the deliberate tripwire this suite carried was folded in #1147, so the file has changed since. One
go test -run TestEveryVerbNamesAnUnknownFlag ./cmd/rt/settles it — and note that a-runpattern matching zero tests reportsokwith rc=0, so the run must be checked for a non-zero test count rather than forok.AC sweep — all three were true and un-ticked. Ticked now, against
forgejo/main@fb1bd9c2.cmd/rt/usage_test.go,TestEveryVerbNamesAnUnknownFlag— a census-wide arm, not a list:🔑 Two details worth keeping, because both are guards against the sweep this AC exists to survive. The stderr assertion is deliberately not "stderr is non-empty" — the file says why: "a gate's PASS line also writes to stderr, so 'something was printed' is satisfied by output that says nothing about the rejection." And the
register-checkexemption was asserted at its old value rather than skipped, so #1132's fix would redden here — and it did.🔴 That arm also recorded a live instance of the still-open #1149, and it belongs on that tracker rather than being lost in a comment here. It reddened on
main, not on either PR: #1132's fix was already on main when #1123 merged, but #1123's branch was based on1410c31, which predates it. Under rebase-merge the commits replay onto the newer base and CI does not re-run the result — both PRs were green alone and their combination was first built as main. Cross-posting to #1149.Swept by @bosun, 2026-09-05.