Skip to content

chore: build the binaries plural from whole words, and document releasing - #113

Merged
max-sixty merged 2 commits into
mainfrom
cut-release
Sep 18, 2026
Merged

max-sixty merged 2 commits into
mainfrom
cut-release

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

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. binaries_phrase now 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 allowlisted binar in .typos.toml instead; 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.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.

CLAUDE.md's pre-commit sentence is rewritten to describe the hook set rather than claim parity with CI. #97 adds pre-commit run --all-files to ci.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, and pre-commit run --all-files are all green, the last now leaving the tree clean.

Note for #97: its verification section records pre-commit passing on main, which was true when it was written on 2026-08-28 but stopped being true when #82 introduced the binar stem on 2026-09-16. Its new CI step would fail on today's main. This PR removes that blocker.

This was written by Claude Code on behalf of max-sixty

…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 cargo-affected-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CLAUDE.md Outdated
…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>
@max-sixty max-sixty changed the title chore: fix the typos false positive in collect.rs, and document releasing chore: build the binaries plural from whole words, and document releasing Sep 18, 2026
@max-sixty
max-sixty merged commit 60981b9 into main Sep 18, 2026
8 checks passed
@max-sixty
max-sixty deleted the cut-release branch September 18, 2026 01:37
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.

2 participants