Repository navigation
tests/test_chain_remedy_callers.py: three rows hold #980's unchanged --link-source reading at the old first-= split's corners (a keyed path that begins with =, a keyed blank path, a key in capitals) (#1054) - #1058
Conversation
… it was in how `--link-source` reads a value, a keyed path that begins with `=`, a keyed blank path and a key typed in capitals, so each of rv980's four surviving mutants of the naming gate fails a test (#1054) #980 (#1044) said a chain whose links hold no `=` is read exactly as before. That held (rv980 compared 800 runs on the base and the head), but it rested on that probe: the #980 rows hold the new reading and none held the corners of the old split at the first `=`. rv980 wrote seven mutants of `LinkSources._read_source` and `no_path`, and four survived the five closest test files (404 passed under each). Three rows, in the #980 section, each pinning bytes main already prints: - `test_a_keyed_path_may_begin_with_an_equals`: `openXdox==x` with THREE, and `open=y==` with EQUALS, is the link with the path `=x` (`=`): the `link-source-unreadable` WARNING names that path and the key, and the run says nothing of a PATH. Kills R10 (`rfind("=", 0, at - 1)`). - `test_a_keyed_blank_path_is_one_blank_and_is_not_refused`: `'openXdox= '` with THREE exits 0, is not refused, and its WARNING names the path of one blank. Kills R1 (`typed[at + 1:].strip()` in the key's test) and R14 (`[1].strip()` in `no_path`). - `test_a_key_typed_in_capitals_is_noted_as_the_chain_spells_it`: `OPEN=Y=<tree>` with EQUALS and the name `brett-wip`, which reads no declaration: the NOTE's reason names `open=y`, not `OPEN=Y`. Kills R5 (`return typed[:at], ...`). Each mutant, applied alone to `scripts/validate-repository-naming.py` and restored byte for byte (sha256 `ec167fb0e259f907...` read back), fails the row named and nothing else in the file: R10 2 failed (both parameters), R1 1, R14 1, R5 1, of 67. The file passes on git 2.43 and 2.47.1. The issue's optional part, the "It was read as a PATH" line that names only the text before the first `=`, is left alone: it is #1053's neighbour. No script, template or doc changes, so no pinned copy moves and a root's `update-shape.py check` gains no row. Closes #1054 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
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 3 hours and 17 minutes by commenting |
Reviewer's GuideAdds three focused regression-test groups covering unchanged first- File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-5, 2026-10-20T11:02Z) @codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Independent review of #1058 (#1054) at The review is read-only. I pushed, posted and filed nothing, ran no FindingsMUST: none. SHOULD: none. NIT 1 —
NIT 2 — PR body prose, "The three rows" paragraph. It says rows 1 and 2, and the
Checked and true
Could not verify
Checklist candidateWhere rv980's checklist line is taken, the PR's rows already satisfy it: a path beginning with Scratch left
|
…ls also types `OPENXDOX=<tree>` in a chain that spells it `openXdox`, so a gate that lowercases the link its NOTE names fails a test where it passed all 67 (#1054) rv1058's NIT 1 on #1058: the row's docstring says the link in the NOTE is spelled as the chain spells it, but its only chain, `open=y`, is all lowercase, so "the chain's spelling" and "the link lowercased" print the same bytes. rv1058's mutant M2, `return link.lower(), typed[at + 1:]` at `scripts/validate-repository-naming.py:438`, survived the whole file. The row takes the issue's optional form as a second parameter, `a-capital-inside-a-link`: `OPENXDOX=<tree>` with THREE (`openXdox`) and the name `brett-wip`, whose one NOTE line must end `reads openXdox's own declaration.`, compared whole as the first parameter's is. The docstring is true of both. The test file is the only file changed. Measured, each mutant alone on the script, restored byte for byte (sha256 `ec167fb0e259f907...` read back) and the whole file run (68): - M2 (`link.lower()`): 1 failed, the new parameter, which says `reads openxdox's own declaration`; 67 passed. - R5 (`typed[:at]`): 2 failed, both parameters of this row; 66 passed. - R10 2 failed, R1 1, R14 1: as before, each only on its own row. The new parameter passes on 8a05721's script (byte-identical here). Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
|
Re-check of #1058 (#1054) at The re-check was read-only: no FindingsMUST: none. SHOULD: none. NIT (optional, no action needed):
Checked and true
Could not verify
Scratch left
|



Lane: openreposhape-5 (openRepoShape-5)
Claim: #1054 (comment)
Closes #1054.
Goal
Three test rows hold what #980 (#1044) left unchanged in how
--link-sourcereads a value (a keyed path that begins with=, a keyed blank path, a key typed in capitals), so each of rv980's four surviving mutants ofscripts/validate-repository-naming.pyfails a test. Fix round 1 (rv1058's NIT 1) adds a fifth mutant to what the rows kill.#1044 said a chain whose links hold no
=is read exactly as before. That is true (rv980 compared 800 runs on the base and the head), but it rested on that probe:tests/test_chain_remedy_callers.pyheld the #980 rows for the new reading and none for the corners of the old first-=split. Of rv980's seven mutants, R1, R5, R10 and R14 survived the five closest test files (404 passed under each).Tests only. The one file changed is
tests/test_chain_remedy_callers.py(72 lines added, none removed, over two commits), in the "#980" section aftertest_a_key_is_read_whole, reusing the file'sTHREE,EQUALS,naming,tree,gate_warnings,UNREACHEDandclear_ambient_pin_sources. No assert joins conditions withandoror. No script, template or doc changes, so no pinned copy moves and a root'supdate-shape.py checkgains no row.The three rows
Each pins bytes the gate already prints on main (the new parameter of row 3 passes on
8a057215's script, which is byte-identical to the one here).test_a_keyed_path_may_begin_with_an_equals, two parameters:openXdox==xwithTHREE(a-plain-link), andopen=y==withEQUALS(a-link-holding-an-equals, the issue's parenthetical). Exit 0; the WARNINGlink-source-unreadable: =x (--link-source openXdox=...) could not answer for openXdox: no such file or directory(and= (--link-source open=y=...) ... for open=y); no "read as a PATH" line. Kills R10.test_a_keyed_blank_path_is_one_blank_and_is_not_refused:'openXdox= 'withTHREE. Exit 0; noREFUSED; the WARNINGlink-source-unreadable: (--link-source openXdox=...) could not answer for openXdox: no such file or directory(the path is one blank); no "read as a PATH" line. Kills R1 and R14.test_a_key_typed_in_capitals_is_noted_as_the_chain_spells_it, two parameters, with the namebrett-wip, which reads no declaration. Exit 0, and the oneNOTEline is compared as a whole line:NOTE --link-source <typed>: not used - no name classified here reads <link>'s own declaration.(the em dash of the gate's text, as the file's other NOTE rows spell it).a-link-holding-an-equals:OPEN=Y=<tree>withEQUALS, the NOTE endsreads open=y's own declaration.. Kills R5.a-capital-inside-a-link(new in fix round 1, rv1058's NIT 1):OPENXDOX=<tree>withTHREE, the NOTE endsreads openXdox's own declaration.. The first parameter's chain,open=y, is all lowercase, so it could not tell "the link as the chain spells it" from "the link lowercased";openXdoxhas a capital X. Kills R5 as well, and M2 (return link.lower(), ...), which survived the first head.Bytes against
5b41d44f, the base of #1044 (checked withgit archive 5b41d44f contracts scriptsand the same values: stdout, stderr and exit code compared):openXdox==x(row 1),'openXdox= '(row 2) andOPENXDOX=<tree>(row 3, thea-capital-inside-a-linkparameter).=:open=y==withEQUALS(row 1's second parameter; at5b41d44fit is a bare PATH,link-source-unreadable: open=y== (--link-source) ... for openXdox, with "It was read as a PATH:openis not a link ...") andOPEN=Y=<tree>withEQUALS(row 3's first parameter; at5b41d44fits NOTE saysreads a chain link's own declaration, with the same "read as a PATH" sentence).Left alone, as the issue's "Optional" part says it may be: the "It was read as a PATH" line (
LinkSources.read_as_path, which names only the text before the first=). It is a NIT for a follow-up and #1053's neighbour (validate-pins.pyhas the twin), and changing it touches the pinnedscripts/validate-repository-naming.py.Mutants
Each applied alone to
scripts/validate-repository-naming.pyat the line the issue (or rv1058, for M2) names, in the worktree, restored with the saved copy and read back (sha256ec167fb0e259f90705db895a1a37f4adebd4cbf03ca2d5ae18f6d9a8df896548after each;git diffof the script empty). R10's text is also at:479in_read_remedy, which is not mutated. The whole file (68 tests) is run with each, on git 2.43, at the fix round's head.:439typed.rfind("=", 0, at)totyped.rfind("=", 0, at - 1)openXdox==xis a bare PATH:link-source-unreadable: openXdox==x (--link-source) ...and "It was read as a PATH:openXdoxis not a link ...":437typed[at + 1:]totyped[at + 1:].strip()inif link is not None and ...'openXdox= 'is a bare PATH:openXdox= (--link-source), with the same false line:385self._read_source(typed)[1]toself._read_source(typed)[1].strip()inno_path'openXdox= 'isREFUSED link-source-no-path, exit 2 (main: 0)returncode == 0:438return link, typed[at + 1:]toreturn typed[:at], typed[at + 1:]reads OPEN=Y's own declaration(andOPENXDOX's):438(rv1058)return link, typed[at + 1:]toreturn link.lower(), typed[at + 1:]reads openxdox's own declarationa-capital-inside-a-linkonly, on the NOTE assertEach mutant fails only the row it is named for, and the file passes (68) with the script restored. At the first head (
b775c739, 67 tests) R10 was 2 failed, R1 1, R14 1 and R5 1, and M2 survived with 67 passed.Runs
EMAIL=service@opensoft.dev, a stubghfirst on PATH (it refuses every call),GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=false,GIT_CONFIG_GLOBAL=/dev/null; through$Q/v110/run9.sh(-q -rs -p no:cacheprovider -o tmp_path_retention_policy=failed, one reused basetemp each). Never the full suite./usr/bin/git),tests/test_chain_remedy_callers.pyalone: 68 passed (63 before this PR, plus 5: row 1 has two parameters, row 3 has two, row 2 is one).tests/test_link_source_chain_defaults.pyand the trio (tests/test_repo_hygiene.py,tests/test_agents_md_codes.py,tests/test_cli_reference.py): 261 passed.$Q/v115/w764/git247/bin/git, first on PATH),tests/test_chain_remedy_callers.py: 68 passed.8a057215's tree (a scratch copy of itsgit archive, with this file copied in): 5 passed. The whole file there: 66 passed, 2 skipped (the two older-library rows need history the scratch copy lacks).git diff --checkclean; no line over 79 characters.Merge
git merge-tree --write-tree origin/main HEAD, origin/main833af144(fetched with-c gc.auto=0 -c maintenance.auto=false, andgit ls-remoteagrees; main moved from8a057215by #1041, which touchesadopt-project.py,scaffold-project.pyand device-name tests, none of this PR's files): clean, exit 0, treebd706fdacef2. The branch is two commits ahead of the old base8a057215.Closes #1054.
🤖 Generated with Claude Code
Summary by Sourcery
Tests:
--link-sourcevalues with leading equals, blank paths, and capitalized keys, including parameterized chain variants.