Repository navigation
Description
Five of the six ground_branch_of() call sites are pinned by no test. Reverting any one of them to pass no registry defaults leaves the whole suite, both self-tests and spec/validate.py green, which reintroduces the defect #1517 fixed at that site alone.
Raised by CodeRabbit on #1517 and by that pull request's own review passes. #1517 declares the gap in GroundBranchReaderCase's docstring rather than closing it, and this is the issue for closing it.
What is and is not covered today
GroundBranchReaderCase refuses any reader that resolves groundTruthBranch itself, in any shape, so a reader cannot bypass the function. What no test establishes is that a call which does reach the function passes it anything useful.
| Call site | Pinned by |
|---|---|
spec/workflow_reuse.py:130 |
its own --selftest, through the injected reader and lister |
spec/audit.py audit_repo |
nothing |
spec/audit.py main, the --issue path |
nothing |
spec/audit.py main, the sweep loop |
nothing |
spec/fidelity_honesty.py, both sites |
nothing |
Why the obvious fix does not work
The obvious test is an AST assertion that every call passes a defaults argument. It was written, measured and removed inside #1517, in commits c2fa0ac and 311bda9, for two reasons that are worth recording so a later attempt does not repeat them.
It tests arity rather than wiring. ground_branch_of(entry, branch, None) satisfies any argument-count assertion and consults no defaults, because the function's own defaults = defaults or {} swallows it, and {} behaves the same way. Source text cannot tell a real defaults mapping from either, so this is a limit of the method rather than a defect in that implementation.
Its call floor was also wrong in a way that read as correct. The assertion counted seven calls, since one lives in spec/audit.py's own self-test, while the floor asserted six, so one production site could be deleted outright and the test still passed.
What would actually close it
A behavioral test per reader, on the shape spec/workflow_reuse.py already uses: inject the fetch or the API reader, declare a registry whose defaults.groundTruthBranch is neither the fleet value nor any per-entry value, and assert the resolved ref.
spec/fidelity_honesty.py is the tractable half and would close two of the five. It has no self-test at all today, and its two readers take a fetch and an audit.gh call that a fixture can stand in for.
spec/audit.py's three sit inside audit_repo and main, which reach the live API through gh(). Closing those means either a seam for that call or a self-test fixture standing in for it, which is a larger change and probably its own issue once the first half lands.
Not a candidate
Widening GroundBranchReaderCase to also require a defaults argument would restore a test that passes on None. It reads as coverage and is not, which is worse than the declared gap, since a declared gap is visible to the next reader and a false pin is not.
Activity
Hold Every Registry Field to the Shape Its Consumer Requires, and Set…
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.