Skip to content

allow: the ratchet is split in one place - #17

Merged
aledbf merged 1 commit into
mainfrom
allow/split
Sep 29, 2026
Merged

aledbf merged 1 commit into
mainfrom
allow/split

Conversation

@aledbf

@aledbf aledbf commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

internal/allow exists so refs and testquality read their allowlists alike, and each still split findings against it on its own: refs behind refs.Allow (a map, a Len, and a refs: error prefix cmd/refs can add itself), testquality inline in main. allow.Split[T](allowed, found, key) replaces both and allow.Stale; internal/refs/allow.go is gone. The comment on why the stale half matters moves to Split, and the <file><TAB><reference> spelling to refs.Finding.Key.

Output and exit codes unchanged: old and new refs compared on spin with hack/refs-allow.txt, with a stale entry added, and with a missing list; old and new testquality on a fixture module with a stale entry.

  • task test, task lint: green
  • task mutate: nothing to break outside cmd/ (Split's sites are index reads and !, which the tool does not edit); TestSplitIsWhatNothingExplainsAndWhatExplainsNothing holds both halves and their order

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

internal/allow says it exists so refs and testquality read their lists
alike, and each still split its findings on its own: refs behind an Allow
type that held a map and prefixed an error, testquality inline. Split is
allow's now, generic over the finding and its key, and refs.Allow is gone.
The why of the stale half moves with it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aledbf
aledbf merged commit 776cd86 into main Sep 29, 2026
2 checks passed
@aledbf
aledbf deleted the allow/split branch September 29, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant