chore: build the binaries plural from whole words, and document releasing - #113
Conversation
…sing
Two maintenance items found while cutting 0.4.1.
`pre-commit run --all-files` rewrote collect.rs's `format!("{n} binar{}", …)`
to `binary{}`, reintroducing the "1 binaryy" output bug #82 had just fixed. The
binary/binaries plural splits mid-word, so the bare stem is deliberate, and
typos can't tell that from a misspelling. `.typos.toml` now carries it as an
extend-word. Nothing else would have caught the rewrite: no CI job runs typos,
though CLAUDE.md claimed one did. Corrected alongside.
CLAUDE.md also gains a Releasing section. The process — bump the version, open
a `chore: release X.Y.Z` PR, tag the squash commit, and let the tag push
trigger release.yaml's Trusted-Publishing `cargo publish` — lived only in git
history and that workflow's header comment, so cutting 0.4.1 meant
reconstructing it from the previous release commits.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cargo-affected-bot
left a comment
There was a problem hiding this comment.
The typos entry is correct and it does silence the only hit — I reproduced both directions against this tree (typos 1.50.2): with the entry the repo is clean, and with it removed src/collect.rs is the sole error, binar should be binary. Every claim in the new Releasing section also checks out against release.yaml and history: the tag filter **[0-9]+.[0-9]+.[0-9]+* matches vX.Y.Z, the last five releases all went out as chore: release X.Y.Z PRs, and nothing in that workflow creates a GitHub release.
Two things worth deciding before this lands.
The stem is avoidable, which would make the allowlist entry unnecessary. binaries_phrase in src/collect.rs builds the noun as format!("{n} binar{}", if n == 1 { "y" } else { "ies" }). Moving the split to the whole word — format!("{n} {}", if n == 1 { "binary" } else { "binaries" }) — produces identical output, and the existing binaries_phrase_splits_the_noun_not_the_suffix test pins all three cases, so the change is covered. That leaves nothing for --write-changes to rewrite and no .typos.toml entry to carry. As written, the entry allows binar in every file in the repo, and the format string that produced #82's regression is still sitting there for the next --write-changes run to find — the hazard is contained by a config line rather than removed. Happy to push that as a commit on this branch if you want it: the format line and the doc comment above it that explains the split, plus dropping the .typos.toml hunk.
#97 is the other half of this sentence and disagrees with it. That PR adds a pre-commit run --all-files step to ci.yaml's lint job — which runs typos — and its body says explicitly "This PR fixes the gap rather than the sentence, so CLAUDE.md needs no edit." Both are open, so whichever merges second leaves the tree inconsistent: this PR's new sentence becomes false the moment #97 lands. Worth picking one before merging either.
…stem Review feedback: the `.typos.toml` entry this branch added was allowlisting a token the code had no reason to produce. `binaries_phrase` interpolated the plural's tail after a bare `binar` stem, which is what typos flagged and what `--write-changes` then rewrote into "1 binaryy". Selecting the whole noun produces byte-identical output — the existing unit test pins all three cases — and leaves nothing for typos to flag, so the allowlist entry goes. The CLAUDE.md sentence drops its claim about CI parity rather than restating it. #97 is open and adds `pre-commit run --all-files` to `ci.yaml`'s lint job, which would make any claim about what CI does or doesn't cover stale on whichever of the two merges second. Describing what the hook set runs is true either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two maintenance items found while cutting 0.4.1.
pre-commit run --all-filesrewrote collect.rs'sformat!("{n} binar{}", …)tobinary{}, reintroducing the "1 binaryy" output bug #82 had just fixed.binaries_phrasenow selects the whole noun —format!("{n} {}", if n == 1 { "binary" } else { "binaries" })— which is byte-identical output (the existing unit test pins 0, 1 and 2) and leaves typos nothing to flag. The first draft of this PR allowlistedbinarin.typos.tomlinstead; fixing the producer is the better half of that trade, since the allowlist entry would have suppressed the token repo-wide to protect one call site that didn't need to emit it.CLAUDE.md also gains a Releasing section. The process — bump the version, open a
chore: release X.Y.ZPR, tag the squash commit, and let the tag push trigger release.yaml's Trusted-Publishingcargo publish— lived only in git history and that workflow's header comment, so cutting 0.4.1 meant reconstructing it from the previous release commits.CLAUDE.md's
pre-commitsentence is rewritten to describe the hook set rather than claim parity with CI. #97 addspre-commit run --all-filestoci.yaml's lint job, so any claim about what CI does or doesn't gate would go stale on whichever of the two lands second.cargo test(117 unit + 44 functional),cargo clippy --all-targets, andpre-commit run --all-filesare all green, the last now leaving the tree clean.Note for #97: its verification section records
pre-commitpassing onmain, which was true when it was written on 2026-08-28 but stopped being true when #82 introduced thebinarstem on 2026-09-16. Its new CI step would fail on today'smain. This PR removes that blocker.