bug(register-check): a scan that resolved no paths returns success #1132

Closed
opened 2026-09-04 15:46:05 +02:00 by bosun · 0 comments
Owner

register-check returns success when it scanned nothing. A typo'd path in a CI callsite silently narrows the scan, and a callsite where every path is typo'd passes green having checked no files at all.

Measured

rt register-check docs/integration.md    rc=0  "OK: 0 register-drift hits across scanned paths"
rt register-check docs/integration.mdx   rc=0  "no paths to scan (all requested paths missing); treating as pass"
rt register-check --bogus-flag           rc=0  same message — DisableFlagParsing reads the flag as a PATH

The typo'd-path case is the one that matters: it is what a CI callsite looks like after a file is renamed or moved.

Why it is a defect

Could-not-scan is its own state and it is not a pass. The gate's own message says "treating as pass", so the behaviour is deliberate and inherited from the bash [[ -e ]] loop — but a gate that reports success having examined zero files gives a green that means nothing, and nothing downstream can tell it apart from a real pass.

--bogus-flag reading as a path is a second consequence of DisableFlagParsing: true on the same command.

AC

  • zero scannable paths is a distinct outcome from a clean scan — PR #1141 merged at ed0d26cea1011b7939ff074d36efa5bd73b99cc0; explicit unresolved paths now return CANNOT-GRADE/exit 2.
  • a path that was requested and does not exist is reported, not silently dropped — the missing-only and mixed controls name every unresolved path.
  • the existing "no paths configured at all" case stays a pass if that is intended, and is distinguished from "paths were requested and none resolved" — omitted defaults pass; explicit missing paths refuse.
  • an arm that reddens if the two collapse back together — disabling the new branch reddens all three missing-path controls.

Closeout

PR #1141 is merged. Current origin/main is 226cc806dec1f2c9c961c3ea532a7bc10435bc50 and contains the implementation, tests, and changelog.d/1132.fixed.md. Landed verification: Go test/vet, Bats 149/149, ShellCheck, workflow parse 27/27, contract/dates/fragment checks, and mutation controls pass.

Anchor: found by @engineer on 2026-09-04; implemented by @rigger in PR #1141.

`register-check` returns success when it scanned nothing. A typo'd path in a CI callsite silently narrows the scan, and a callsite where every path is typo'd passes green having checked no files at all. ## Measured ``` rt register-check docs/integration.md rc=0 "OK: 0 register-drift hits across scanned paths" rt register-check docs/integration.mdx rc=0 "no paths to scan (all requested paths missing); treating as pass" rt register-check --bogus-flag rc=0 same message — DisableFlagParsing reads the flag as a PATH ``` The typo'd-path case is the one that matters: it is what a CI callsite looks like after a file is renamed or moved. ## Why it is a defect Could-not-scan is its own state and it is not a pass. The gate's own message says "treating as pass", so the behaviour is deliberate and inherited from the bash `[[ -e ]]` loop — but a gate that reports success having examined zero files gives a green that means nothing, and nothing downstream can tell it apart from a real pass. `--bogus-flag` reading as a path is a second consequence of `DisableFlagParsing: true` on the same command. ## AC - [x] zero scannable paths is a distinct outcome from a clean scan — PR #1141 merged at `ed0d26cea1011b7939ff074d36efa5bd73b99cc0`; explicit unresolved paths now return CANNOT-GRADE/exit 2. - [x] a path that was requested and does not exist is reported, not silently dropped — the missing-only and mixed controls name every unresolved path. - [x] the existing "no paths configured at all" case stays a pass if that is intended, and is distinguished from "paths were requested and none resolved" — omitted defaults pass; explicit missing paths refuse. - [x] an arm that reddens if the two collapse back together — disabling the new branch reddens all three missing-path controls. ## Closeout PR #1141 is merged. Current `origin/main` is `226cc806dec1f2c9c961c3ea532a7bc10435bc50` and contains the implementation, tests, and `changelog.d/1132.fixed.md`. Landed verification: Go test/vet, Bats 149/149, ShellCheck, workflow parse 27/27, contract/dates/fragment checks, and mutation controls pass. Anchor: found by @engineer on 2026-09-04; implemented by @rigger in PR #1141.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#1132
No description provided.