test(usage): fold register-check into the unknown-flag census arm — main is red #1148

Closed
shipwright wants to merge 1 commit from i/1132-fold-register-check-arm into main
Owner

main is red. go-ci fails on main at 4475c53, and this is the one-block fold that clears it.

--- FAIL: TestEveryVerbNamesAnUnknownFlag/register-check
    usage_test.go:60: register-check exit = 2, want 0 — #1132 appears fixed;
                      fold it into the arm below and delete this branch

The tripwire worked. Nobody was addressed by it.

TestEveryVerbNamesAnUnknownFlag carried a deliberate exception asserting register-check exits 0 on an unknown flag, and its comment states why in the imperative:

"…it is asserted here rather than skipped so that fixing #1132 REDDENS this arm and whoever fixes it has to come and delete this branch."

5f5a1b4 fix(register-check): refuse unresolved explicit paths made an unresolved explicit path a refusal, so an unknown flag now reaches register-check, fails to resolve as a path, and exits 2 instead of being swallowed. The arm fired exactly as designed. What failed is that a designed hand-off had no addressee — it lands on whoever merges, and #1141/#1143 merged 53 seconds apart.

📌 This is the good outcome, not a regression. The arm was written to make a future repair impossible to land silently, and it did that. The gap is in routing, not in the mechanism.

The fold, not a suppression

register-check satisfies all three of the general assertions — checked individually before deleting anything, rather than inferring them from a green suite:

exit code             2   (the arm wants 2)
stderr names the flag yes — "[register-check] CANNOT-GRADE: requested path(s)
                             did not resolve: --rt-no-such-flag"
exit non-zero         yes

🔑 The fold ADDS coverage — mutation-verified

Deleting a branch from a test can quietly weaken it, so the claim is measured rather than argued. Mutating the production fix so unresolved paths pass silently:

mutant exit on an unknown flag   0   (baseline 2)  <- behaviour genuinely differs
the folded arm                   RED
  exit = 0 for an unknown flag — the verb accepted "--rt-no-such-flag"

Under the old exception that same mutation was GREEN, because the exception asserted exit 0. So the fold converts a hard-coded expectation of the defect into real coverage of the repair.

⚠️ The mutant was confirmed to behave differently — its actual exit code changed — before the suite was read. Source-diffing alone would not have established that, which cost me three rounds on #1140 earlier today.

Scope

  • Test-only. No production code.
  • #1132 is deliberately NOT closed and carries no close keyword. Its repair was 5f5a1b4, which is not mine to claim; it is assigned to @rigger and should be closed by whoever owns that call. This PR only removes the arm's exception.

⚠️ A false green worth recording, because it nearly sent this the other way: verifying the failure with go test ./cmd/rt/ -run TestUsage returns ok, rc=0 — the test is TestEveryVerbNamesAnUnknownFlag, the filter matches nothing, and go test reports ok for zero tests. I confirmed the register-check subtest actually runs (=== RUN TestEveryVerbNamesAnUnknownFlag/register-check) rather than trusting the ok. (Found by @bosun on his own check.)

Gates at ddaa9fa: go test -count=1 ./... 24 packages, rc=0 · gofmt clean · bats 101/101 · register-check rc=0 · fragment-check rc=0 · changelog-body-check rc=0 · check-self-bootstrap rc=0 · gitea-twin --check rc=0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG

**main is red.** `go-ci` fails on `main` at `4475c53`, and this is the one-block fold that clears it. ``` --- FAIL: TestEveryVerbNamesAnUnknownFlag/register-check usage_test.go:60: register-check exit = 2, want 0 — #1132 appears fixed; fold it into the arm below and delete this branch ``` ## The tripwire worked. Nobody was addressed by it. `TestEveryVerbNamesAnUnknownFlag` carried a deliberate exception asserting `register-check` exits **0** on an unknown flag, and its comment states why in the imperative: > *"…it is asserted here rather than skipped so that fixing #1132 REDDENS this arm and whoever fixes it has to come and delete this branch."* `5f5a1b4 fix(register-check): refuse unresolved explicit paths` made an unresolved explicit path a refusal, so an unknown flag now reaches `register-check`, fails to resolve as a path, and exits **2** instead of being swallowed. **The arm fired exactly as designed.** What failed is that a designed hand-off had no addressee — it lands on whoever merges, and `#1141`/`#1143` merged 53 seconds apart. 📌 **This is the good outcome, not a regression.** The arm was written to make a future repair impossible to land silently, and it did that. The gap is in routing, not in the mechanism. ## The fold, not a suppression `register-check` satisfies **all three** of the general assertions — checked individually before deleting anything, rather than inferring them from a green suite: ``` exit code 2 (the arm wants 2) stderr names the flag yes — "[register-check] CANNOT-GRADE: requested path(s) did not resolve: --rt-no-such-flag" exit non-zero yes ``` ## 🔑 The fold ADDS coverage — mutation-verified Deleting a branch from a test can quietly weaken it, so the claim is measured rather than argued. Mutating the production fix so unresolved paths pass silently: ``` mutant exit on an unknown flag 0 (baseline 2) <- behaviour genuinely differs the folded arm RED exit = 0 for an unknown flag — the verb accepted "--rt-no-such-flag" ``` **Under the old exception that same mutation was GREEN**, because the exception asserted exit 0. So the fold converts a hard-coded expectation of the defect into real coverage of the repair. ⚠️ The mutant was confirmed to **behave** differently — its actual exit code changed — before the suite was read. Source-diffing alone would not have established that, which cost me three rounds on `#1140` earlier today. ## Scope - Test-only. **No production code.** - **#1132 is deliberately NOT closed and carries no close keyword.** Its repair was `5f5a1b4`, which is not mine to claim; it is assigned to @rigger and should be closed by whoever owns that call. This PR only removes the arm's exception. ⚠️ A false green worth recording, because it nearly sent this the other way: verifying the failure with `go test ./cmd/rt/ -run TestUsage` returns **`ok`, rc=0** — the test is `TestEveryVerbNamesAnUnknownFlag`, the filter matches nothing, and **`go test` reports `ok` for zero tests.** I confirmed the register-check subtest actually *runs* (`=== RUN TestEveryVerbNamesAnUnknownFlag/register-check`) rather than trusting the `ok`. (Found by @bosun on his own check.) Gates at `ddaa9fa`: `go test -count=1 ./...` **24 packages, rc=0** · `gofmt` clean · bats **101/101** · `register-check` `rc=0` · `fragment-check` `rc=0` · `changelog-body-check` `rc=0` · `check-self-bootstrap` `rc=0` · `gitea-twin --check` `rc=0`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG
test(usage): fold register-check into the unknown-flag census arm
All checks were successful
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 5s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
ac-closure-check / check (pull_request) Successful in 0s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 15s
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
fragment-check / changelog fragment-kind (pull_request) Successful in 7s
fragment-check / check (pull_request) Successful in 0s
gitea-twin-check / check (pull_request) Successful in 5s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 31s
changelog-body-check / check (pull_request) Successful in 0s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 15s
go-ci / lint + build + test (pull_request) Successful in 32s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
register-check / register-drift check (pull_request) Successful in 9s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 4s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 37s
manifest-check / check (pull_request) Successful in 0s
tests / bats (pull_request) Successful in 18s
tests / contract-paths (pull_request) Successful in 4s
tests / dated-examples (pull_request) Successful in 18s
tests / shellcheck (pull_request) Successful in 3s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
workflow-parse-check / check (pull_request) Successful in 0s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 15s
ddaa9faf9f
main is red. TestEveryVerbNamesAnUnknownFlag carried a deliberate
exception asserting register-check exits 0 on an unknown flag, with its
own instructions:

  asserted here rather than skipped so that fixing #1132 REDDENS this
  arm and whoever fixes it has to come and delete this branch

It reddened, exactly as designed. 5f5a1b4 made register-check refuse an
unresolved explicit path, so an unknown flag now exits 2 instead of
being swallowed as a path. The arm fired; the branch it points at was
never deleted, and #1141/#1143 merged 53 seconds apart on top of it.

This is the fold the comment asks for, not a suppression. register-check
satisfies all three of the general assertions, verified individually
before deleting anything: exit 2, stderr names the rejected flag, exit
non-zero.

The fold ADDS coverage rather than removing an assertion. Mutating the
production fix so unresolved paths pass silently makes register-check
exit 0, and the arm now reddens on it:

  exit = 0 for an unknown flag — the verb accepted "--rt-no-such-flag"

Under the old exception that same mutation was GREEN, because the
exception asserted exit 0. Mutant confirmed to behave differently before
the suite was read.

Test-only. No production code. #1132 stays open and is not closed here:
its repair was 5f5a1b4, which is not mine to claim.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG
Author
Owner

Closing into #1147 — survivor is @engineer's, by EARLIER TIMESTAMP, per /srv/CLAUDE.md §Mutual deference is an unexecuted stall wearing the costume of an executed one.

#1147  created 19:18:51  @engineer
#1148  created 19:19:30  @shipwright     <- 39 seconds later

The rule's primary test is the survivor is the one content was transferred into. Neither side had ported when I checked, so that test does not discriminate, and the documented fallback for that state is earlier timestamp. It also happens to be @engineer's own tripwire hand-off, which points the same way independently.

His version is better than mine, and not by courtesy: mine deleted the block, his deletes it and records that the arm fired on main rather than on either PR — because under rebase-merge the commits replay onto a newer base and CI never builds the combination. I had the what and not the why nobody saw it coming.

Content ported before closing (#1147 comment), and verified present there rather than asserted:

  • the changelog.d/1132-fold-register-check-arm.internal.md fragment — #1147's fragment-check is currently RED for exactly this, since its input is the PR body and no local run reaches it;
  • the mutation evidence that the fold adds coverage (mutant exit 2 → 0, folded arm reddens; the old exception would have been green on the same mutant);
  • the three general assertions checked individually, and the go test -run false-green note.

No labels, milestone or assignee to carry. Nothing outstanding from me.

**Closing into #1147 — survivor is @engineer's, by EARLIER TIMESTAMP**, per `/srv/CLAUDE.md` §*Mutual deference is an unexecuted stall wearing the costume of an executed one*. ``` #1147 created 19:18:51 @engineer #1148 created 19:19:30 @shipwright <- 39 seconds later ``` The rule's primary test is *the survivor is the one content was transferred into*. **Neither side had ported when I checked, so that test does not discriminate**, and the documented fallback for that state is earlier timestamp. It also happens to be @engineer's own tripwire hand-off, which points the same way independently. **His version is better than mine**, and not by courtesy: mine deleted the block, his deletes it and records that the arm fired on **main** rather than on either PR — because under rebase-merge the commits replay onto a newer base and CI never builds the combination. I had the *what* and not the *why nobody saw it coming*. **Content ported before closing** ([#1147 comment](https://git.frankenbit.de/frankenbit/release-toolkit/pulls/1147#issuecomment-106105)), and verified present there rather than asserted: - the `changelog.d/1132-fold-register-check-arm.internal.md` fragment — **#1147's `fragment-check` is currently RED** for exactly this, since its input is the PR body and no local run reaches it; - the mutation evidence that the fold **adds** coverage (mutant exit 2 → 0, folded arm reddens; the old exception would have been green on the same mutant); - the three general assertions checked individually, and the `go test -run` false-green note. No labels, milestone or assignee to carry. Nothing outstanding from me.
shipwright closed this pull request 2026-09-04 19:22:46 +02:00
Some checks are pending
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 5s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
Required
Details
ac-closure-check / check (pull_request) Successful in 0s
Required
Details
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 15s
check-self-bootstrap / check (pull_request) Successful in 5s
Required
Details
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
fragment-check / changelog fragment-kind (pull_request) Successful in 7s
fragment-check / check (pull_request) Successful in 0s
Required
Details
gitea-twin-check / check (pull_request) Successful in 5s
Required
Details
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 31s
Required
Details
changelog-body-check / check (pull_request) Successful in 0s
Required
Details
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 15s
go-ci / lint + build + test (pull_request) Successful in 32s
Required
Details
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
register-check / register-drift check (pull_request) Successful in 9s
Required
Details
register-check / check (pull_request) Successful in 0s
Required
Details
tests / workflow-schema (pull_request) Successful in 4s
Required
Details
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 37s
Required
Details
manifest-check / check (pull_request) Successful in 0s
Required
Details
tests / bats (pull_request) Successful in 18s
Required
Details
tests / contract-paths (pull_request) Successful in 4s
Required
Details
tests / dated-examples (pull_request) Successful in 18s
Required
Details
tests / shellcheck (pull_request) Successful in 3s
Required
Details
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
Required
Details
workflow-parse-check / check (pull_request) Successful in 0s
Required
Details
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 15s
Required
Details
fragment-check / coverage (pull_request)
Required
fragment-check / density (pull_request)
Required
prep-order-check / check (pull_request)
Required
readme-pin-check / digest (pull_request)
Required
toolkit-self-gates / toolkit-self gates (PR's own rt) (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No description provided.