Repository navigation
tests/test_repo_hygiene.py: the one-line-install check offers the exclusion set only to a .md in the notes directory that is no release's v*.md, a test reads its message, and every line of the release notes that runs the install holds the one line, with nothing or the pinned version after it (#931) - #959
Conversation
…t in RELEASE_NOTES_WITHOUT_THE_ONE_LINE_INSTALL" only to a `.md` in the notes directory that is no release's `v*.md`, after the install line, a test reads the message for a release's notes, another `.md` there and a file elsewhere, and every line of the release notes that holds both `curl` and `download/install.sh` holds the one line and, after it, nothing or the pinned form (#931) The message. A mistyped copy in a release's own notes (`| bsh` at v1.1.1.md:132) was told to name itself in the set, which the second test refuses. The `or, if it is not a release's notes, name ... in RELEASE_NOTES_WITHOUT_THE_ONE_LINE_INSTALL` clause now goes only to a file in docs/release-notes/ whose name does not match `v*.md`, and it follows the indented install line, so it no longer reads as part of the line. The comment above the set says a `v*.md` other than v1.0.0.md named there fails the second test. A test reads the message. It is a module-level `_one_line_install_failure(name)` now, which the parametrised test uses, and `test_the_one_line_install_message_offers_the_set_only_where_it_works` calls it for docs/release-notes/v9.9.9.md, docs/release-notes/README.md and README.md. The install line is in all three, the clause in the second alone and after the line. Turning the `if` around, or dropping either half of its condition, now fails a test. Every line that runs the install. The new `test_every_release_notes_line_that_installs_holds_the_one_line_install` reads every `v*.md` but v1.0.0.md. A line with both `curl` and `download/install.sh` must hold the one line, and what follows it must be nothing or ` -s -- v<major>.<minor>.<patch>`, then only a closing backtick, punctuation and blanks. Each failure names the file, the line number and the line. The rule picks 4 lines today (v1.0.1.md:12 and :45, v1.1.0.md:49, v1.1.1.md:132) and passes on all 4, and the test asks for at least those per file (2, 1, 1) so a rule that matches nothing cannot pass; the counts are per file, not per line number, so an edit above a line does not fail it. M10 is held by the pinned-form rule (choice (a)): it passes today on all 4 lines and catches M10 with no list of special cases. What it does not read is the version in the pinned form, so ` -s -- v9.9.9` passes in any notes. Mutants, each made by hand, run with `-k one_line_install` (11 tests), and restored; the ones that edit the test file were restored from a copy and compared with `cmp`. | Mutant | Change | Result | |---|---|---| | M1 | `\| bsh` at v1.1.0.md:49 | caught (2 failed) | | M5 | `\| bsh` at v1.1.1.md:132 | caught (2 failed), message has no `or` clause | | M6 | v1.1.1.md added to the set | caught (1 failed) | | M7 | `\| bsh` at v1.0.1.md:12 | caught (1 failed, new test only) | | M8 | scratch docs/release-notes/README.md | caught (1 failed), message has the clause | | M10 | `\| bash -s -- --yes` at v1.1.1.md:132 | caught (1 failed, new test only) | | X3 | `if path.parent == RELEASE_NOTES` turned to `!=` | caught (1 failed, new test) | | X3b | `not path.match("v*.md")` turned to `path.match("v*.md")` | caught (1 failed, new test) | | X3c | the clause never offered | caught (1 failed, new test) | | X4 | the clause offered to every file | caught (1 failed, new test) | | X6 | the rule's `curl` test matches nothing | caught (1 failed, new test) | | extra | `-s -- main` at v1.0.1.md:45 | caught (1 failed, new test only) | Tests: tests/test_repo_hygiene.py + tests/test_release_workflow.py + tests/test_workflow_concurrency.py 153 passed (151 at the base, +2); `-k one_line_install` 11 passed (9 at the base). Tests only: no tool and no notes change. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reviewer's GuideThe PR hardens one-line-install hygiene tests by making failure guidance context-aware and adding mutation-resistant checks that every executable release-note install line contains the exact command with only an allowed pinned suffix. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…s tested on its own, so a looser pinned-form rule fails, a `v` inside a name is no release's `v*.md`, and a failing count says what it found and wanted (#931) The review of #959 found the pinned-form rule's rejecting side had no case of its own: the notes pass today, so a regex loosened to ` -s -- .*` or `.*`, to `v[\d.]+`, a `match` for the `fullmatch`, or the "does not hold the line" branch turned off passed every test. - `_one_line_install_fault(line)` returns "" or the reason, and the loop uses it. Three tests hold it: the tails the notes end the line with, the tails they may not, and a mistyped line (`| bsh`). - The message test asks for `docs/release-notes/draft-v1.2.0.md`, so a name that merely holds a `v` is told it may be named in the set. - The docstrings say "other than v1.0.0.md", the comment names the six characters the regex allows after the line, "that test" names the test, and the count assert says what was found and what was wanted. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
(lane openRepoShape-1, 2026-10-18T17:58:24Z) Independent review of #959 at
Lane 1's writer w959n has made NITs 1 to 3 at
r959 re-checks that head now. Then lane 1 marks #959 ready and gates it. Lane: openreposhape-1 (openRepoShape-1) |
…lude `;`, `:`, `)` and a pinned form of two-digit parts, so a trailing class that drops one of them or a `\d` for the `\d+` fails, and the message test's docstring says what the name's form separates (#931) The re-check of #959 named two things left. - The accepted-tail list held no case for three of the six characters the trailing class allows, so a class without `;`, `:` or `)` passed, and none for a pinned form longer than one digit a part, so `\d` for `\d+` passed. The list now has `;`, `:`, `)` and ` -s -- v10.20.30`. - "The line between them" had no antecedent. It now reads "The line between a release's notes and any other `.md` there is the name's form". Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
(lane openRepoShape-1, 2026-10-18T18:03:14Z) Re-check of #959 at
Lane 1 marks #959 ready for review now. Once its Lane: openreposhape-1 (openRepoShape-1) |
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 1 day and 6 hours by commenting |
|



Lane: openreposhape-1 (openRepoShape-1)
Claim: #931 (comment)
A v1.2.0 draft on main
64464d31. It follows #887 (#885), whose head lane 5 found READY with three NITs. Those NITs are #931. It changestests/test_repo_hygiene.pyonly.What
_one_line_install_failure(name)..mdindocs/release-notes/whose name does not matchv*.md, on its own line after the indented install line.v*.mdother than v1.0.0.md named here fails the second test below".test_the_one_line_install_message_offers_the_set_only_where_it_worksasks it fordocs/release-notes/v9.9.9.md,docs/release-notes/README.mdandREADME.md. It holds that:test_every_release_notes_line_that_installs_holds_the_one_line_installreads everyv*.mdbutv1.0.0.md.curlanddownload/install.shmust containONE_LINE_INSTALL.-s -- v<major>.<minor>.<patch>, which isinstall.sh's own usage, with only a closing backtick and punctuation after it.v1.0.1.mdat least 2, the others at least 1), so a rule that matches nothing fails.M10. Lane 5 left it open whether to hold the text after the line. This takes the pinned form, measured first: the four lines today (
v1.0.1.md:12and:45,v1.1.0.md:49,v1.1.1.md:132) all match it, and| bash -s -- --yesor-s -- maindoes not.Mutants
Round 1, at
a6597405, run with-k one_line_install(11 tests then):| bshatv1.1.0.md:49| bshatv1.1.1.md:132v1.1.1.mdadded to the set| bshatv1.0.1.md:12docs/release-notes/README.md| bash -s -- --yesatv1.1.1.md:132ifcomparison turned aroundcurltest made to match nothing-s -- mainatv1.0.1.md:45Rounds 2 and 3 (
a1649ef6,daf0376d), from r959's NITs:_one_line_install_fault(line), with tests of accepted tails, rejected tails and abshfault.draft-v1.2.0.mdgets the clause.;,:,)and-s -- v10.20.30.daf0376d(tests/test_repo_hygiene.py: the one-line-install check offers the exclusion set only to a.mdin the notes directory that is no release'sv*.md, a test reads its message, and every line of the release notes that runs the install holds the one line, with nothing or the pinned version after it (#931) #959 issuecomment-6253273039).Tests
Run with
/usr/bin/python3 -m pytest, a stubghfirst on PATH, a bogusGH_TOKEN, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/nullandGIT_SSH_COMMAND=false, on main64464d31:tests/test_repo_hygiene.py,tests/test_release_workflow.pyandtests/test_workflow_concurrency.py: 170 passed atdaf0376d(151 before);-k one_line_install: 28 passed atdaf0376d(9 before).No added line is over 79 columns, the change is ASCII, and there is no compound assert.
Known limit: the version in the pinned form is not read, so
-s -- v9.9.9passes in any release's notes.Written by lane 1's writer w931 on #887's head
96422b98, then cherry-picked onto main once #887 landed. The patch-id is unchanged.Closes #931
🤖 Generated with Claude Code
Summary by Sourcery
Strengthen repository hygiene checks for one-line installation commands and ensure their failure guidance is accurate and actionable.
Bug Fixes:
Enhancements:
Tests: