format: the sentence saying which words a setting takes is written in one place - #41
Merged
Merged
Conversation
… one place Two places in the archive package listed the values of a closed set by hand, in the registry's order and the registry's phrasing, for compression and for entry_owner. The registry builds that sentence from the declared set, so these were copies of it with nothing comparing the two. Identical copies are the dangerous kind, because nothing goes red while they agree - and they agreed. The day they stop agreeing is the day somebody adds a value to the declaration: the registry lists it, tfg formats prints it, the window offers it, and the hand written line does not. The second copy arrived through the change that closed the first half of this, which is the clearest evidence available that this copies itself faster than anybody notices. Both now ask the declaration. Nothing a person sees changes: a bad value is refused by the registry first, with exit 4, in the registry's own words, and these branches sit behind that check for a direct caller. Three guards, each proven by mutation. The sentence is built in one place, read from string literals rather than file text so a comment may still name it. A refusal quotes the registry, which catches a copy that was reworded rather than repeated. And every word the declaration offers is one its reader accepts, which closes the hole the fix itself opens: Allows says nothing is wrong with a value it allows, so a word added to the set and not handled by the reader would be refused with an empty reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two places in the archive package listed the values of a closed set by hand, in the registry's order and the registry's phrasing -
compressionandentry_owner. The registry builds that sentence from the declared set, so both were copies of it with nothing comparing the two.Identical copies are the dangerous kind, because nothing goes red while they agree, and they agreed. The day they stop agreeing is the day somebody adds a value to the declaration: the registry lists it,
tfg formatsprints it, the window offers it, and the hand written line does not.The second copy arrived through the change that closed the first half of this, in the same week the note warning about copies was written.
What changes for a person using the tool
Nothing. Measured on the built binary:
--set compression=TURBOand--set entry_owner=USERare refused by the registry, exit 4, in the registry's own words. Both hand written branches sit behind that check and no surface reaches them - they are there for a direct caller, which is what a guard is. No changelog entry, because there is nothing a person would notice.Guards
Three, each proven by mutation.
Allowssays nothing is wrong with a value it allows, so a word added to the set and not handled by the reader would arrive as a refusal with an empty reason.The first mutation is worth naming: it puts back a sentence identical to the one the registry builds, so the second guard stays green under it. That is the whole shape of the problem.
Checks
Full
go testgreen,preflight --quickgreen on all twelve checks,stalenessclean at 727 entries.🤖 Generated with Claude Code