Repository navigation
tests/test_adopt_check_throwaway_repos.py: rows pin that refused_paths holds each case twin under its own name and blob, or names it, with core.ignorecase true or false, and that check names the twins git refuses and none it holds (#1033) - #1158
Conversation
…hs` holds each case twin under its own name with its own blob, or names it, with `core.ignorecase` true (#1033) `refused_paths` (#910, #1031) writes its own index with `update-index -z --index-info` and no row said what that index makes of case twins where `core.ignorecase` is true, the default on a disk that ignores case. Measured with git 2.43: git holds both twins of a path it takes (a file, a folder, a folder beside a file), each with its own blob, and leaves out both twins of a path it refuses, which `plan-path-git-refuses` names. - `with_paths` gains `own_blobs`, so a twin held with its sibling's blob would show; - ten rows ask `refused_paths` in a rehearsal whose own config holds `core.ignorecase` true or false (the control), and read the index with `git ls-files -s`; - one row asks a disk that ignores case itself, and skips where `git init` wrote no `core.ignorecase=true` (every CI disk, Linux since #597); - one `check` row, under a global `core.ignorecase=true`, pins that `plan-path-git-refuses` names the four twins git refuses and none of the six it holds, and that `plan` asks about each twin by name. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideTests only: expands throwaway-repository coverage for case-twin paths, using unique blobs and both ignorecase settings to ensure refused_paths neither folds nor silently drops entries, and verifies check reports exactly the twins Git refuses. 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-1, 2026-10-22T14:41:18Z) Independent review r1158 of #1158 at Review of PR #1158 (head
|
| Mutant | Fails | Mutant | Fails |
|---|---|---|---|
| M1 fold input (twins only) | 6 | M11 dedupe 2nd twin, named | 6 |
| M2 fold input and read, silent | 5 | M12 sort answer casefolded | 2 (disk, check) |
| M3 name later twin of kept pairs | 6 | M13 name nothing | 6 |
| M4 fold the read | 0 | M14 swap twin blobs | 5 |
| M5 one blob for twins | 5 | M15 silent drop, only when ignorecase true |
3 |
| M6 file folded into folder twin, named | 4 | M16 one blob, only when ignorecase true |
3 |
| M7 same, silent | 3 | M17 name nothing, only when ignorecase true |
4 |
| M8 dedupe 2nd twin, silent | 10 | M18 / M19 / M20 | 0 / 0 / 0 |
| M9 name only one refused twin | 6 | ||
| M10 reverse order | 6 |
- PR table: M1 to M7 give 6, 5, 6, 0, 5, 4 and 3, which match the body's HM1 to HM7 exactly. HM4's 0 is real, but the equivalence reason is wrong (MUST-1).
- Per-row kills:
- kept-twin rows (file twins, folder twins) die under M1, M2, M5, M8, M11 and M14;
- the folder-and-file rows die under M6 and M7;
- the refused-twin rows die under M9, M10, M13 and M8;
- the disk row dies under every mutant except M4, M18, M19 and M20;
- the
checkrow dies under M1, M3, M6, M8 to M13 and M17. It cannot see silent drops (M2, M5, M7, M14, M15, M16).
- The
truerows do real work: M15 and M16 fail only theignorecase=truerows. M17 fails thecheckrow, which proves the globaltruereaches the throwaway repository. Thefalserows are controls.
2. Python and git version dependence
I found none.
Ignoring path: the rows assert on no git message text. The onlyIgnoring pathmention in the test file is the pre-existingrefused_pathsdocstring. The wording is git's (my probe shows it once per refused path). In git/git it isfprintf(stderr, "Ignoring path %s\n", path_name)inbuiltin/update-index.cat both v2.43.0 (lines 481 and 578) and master (477 and 574), untranslated.refused_pathsreads the index back instead of parsing it, so it does not depend on the text.- The rest of the git path: I read git's source, not ran it.
add_cacheinfois the same in v2.43.0 and master.ignore_caseis used only inadd_to_indexinread-cache.c, not by--index-info.git mktreehas noverify_pathor fsck in master, so the new twin names rely on it no more than the pre-existing..and.Git/xrows. - Python: nothing in the diff is 3.14-sensitive. It has no
ast.dump, onlyfrom __future__ import annotationsand plain f-strings. - The disk skip: it is sound.
git initwritescore.ignorecase=trueonly when itsCoNfIgprobe finds a case-insensitive disk.writtenis read with--local, so a global setting cannot cause or hide the skip. Every CI disk keeps case (tests.ymlruns the suite on ubuntu-24.04 only, plus a Git Bash job for the launcher and installer suites). - Limits of this check: I ran only Python 3.12.3 and git 2.43. I could not try a casefold tmpfs in a user namespace here (the kernel refused the mount), and no case-insensitive disk exists on this bench.
- CI is still running: the full-suite
testsjob (Python 3.x, pytest 8.3.4) wasin_progressat 14:40 UTC, about 55 minutes in. It is the only real evidence for 3.14 and newer git. SonarCloud passed and the quality gate is OK, with 0 open issues and 0.0 duplication.packageandtests-git-bashpassed.
3. Test runs
- Whole file
tests/test_adopt_check_throwaway_repos.pyon head: 40 passed, 1 skipped (41 collected, 29 existing plus 12 new). The 12 new rows: 11 passed, 1 skipped, which matches the body. The same result came in a CI-like environment (noGIT_CONFIG_GLOBAL, emptyHOME, CI identity variables). tests/test_no_auto_maintenance.py: 58 passed, 2 skipped withGIT_CONFIG_GLOBAL=/dev/null(the skips are caused by my env var), which matches the body. In the CI-like environment: 60 passed, 0 skipped.- Others named in the body's gate table:
tests/test_adopt_single_repository_record.py: 37 passed, 2 skipped (git filter-repomissing). With the throwaway file that gives the body's 77 passed and 3 skipped.tests/test_path_guard_hygiene.py: 49 passed.- Meta-test
test_no_test_skips_on_an_assertion_error(it scans everytests/*.py): passed.
- I did not run the shape-doctor shards or
tests/test_scaffold_leg_path_collisions.py. This PR changes one test file and no tool. git diff --checkis clean. No new line is over 79 columns, no non-ASCII is in the test file, and the file compiles.
4. The PR body
- Title: 244 characters (limit 250).
- Closing lines: exactly one,
Closes #1033on line 1. The other#1033mentions are not closing. GitHub'sclosingIssuesReferenceslists only adopt-project.py:refused_paths'update-index -z --index-infois untested withcore.ignorecaseand case twins (aandA) on a case-insensitive disk #1033. - Issue coverage: adopt-project.py:
refused_paths'update-index -z --index-infois untested withcore.ignorecaseand case twins (aandA) on a case-insensitive disk #1033's four directions are all covered, so the close is right. - HTML tags: the only match is
<p>, inside a code span. - Operator address and folders outside /workspace: none (no
@, no/home,/mnt,/tmpor/Users). - Measured claims confirmed:
- the raw
update-indexprobe; - the kept and refused lists, with
Ignoring pathonce per path; - end-to-end
check: kept twins giveplan okwith no global setting; - under a global
core.ignorecase=true, folder twins getplan-file-reencoded, while file twins and folder-and-file twins pass; .Git/Aand.Git/aare both named;notes/.git/xis named, and its kept twinNOTES/xis not.
- the raw
- Known limits and "Not in this PR": accurate.
- The one wrong claim: MUST-1.
Files
/workspace/projects/openRepoShape-worktrees/l1-r1158/tests/test_adopt_check_throwaway_repos.py/workspace/projects/openRepoShape-worktrees/l1-r1158/adopt-project.py(refused_pathsline 12349; early return at lines 12649-12650)- Scratch evidence in
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1158:- mutants in
mut/M* - the fixed test file in
mut/fixed/test_adopt_check_throwaway_repos.py - run outputs in
notes/ - raw probes in
probe/probe1.shandprobe/probe2.sh
- mutants in
Housekeeping
- I ran the head tests in the assigned checkout. It is clean except ignored
__pycache__directories, because my first two runs wrote bytecode before I setPYTHONDONTWRITEBYTECODE=1. - I used Python
shutil.rmtreeonce, to regenerate my own scratch mutant copies M1 and M2. I ran no shellrm. - One
pytest --versionrun in the default shell environment hung. I killed it by PID, and every later run used the stub environment.
Lane: openreposhape-1 (openRepoShape-1)
…s by its mode beside the one it holds (a symlink `.GITMODULES` and the file `.gitmodules`), a file beside a folder, three twins and a non-ASCII pair (#1033) Round 1 review of #1158: - `with_paths` and `with_twins` take `links`, written as mode 120000, and `test_a_twin_git_refuses_by_its_mode_is_named_beside_the_one_it_holds` asks `refused_paths` for the pair with `core.ignorecase` true and false: git refuses the symlink and holds the file, so an answer that folds the index's paths into one case now fails (hand mutant HM4 was not equivalent). - `CASE_TWINS` gains `a-file-and-a-folder`, `three-twins` and `non-ascii-twins` (spelled with escapes, so the file stays ASCII). - The `check` row's docstring no longer says no finding refuses twins of each other: under a global `core.ignorecase=true` the #654 rehearsal refuses `D/x` and `d/x`, and the row does not see it because the rehearsal asks nothing of a source that holds a path git refuses. - The disk row's skip text no longer names the per-run work directory. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…NS` and the `check` row's docstring name the twins they hold, and the held-or-named row's docstring says each twin, not both (#1033) Round 2 re-check of #1158, two comment NITs, no code change: - The comment above `ALL_TWINS` and the `check` row's docstring said they held "every twin above". They hold the twins of `file-twins`, `folder-twins` and `a-folder-and-a-file` and the two refused sets, and not the twins of `a-file-and-a-folder`, `three-twins` and `non-ascii-twins`. Both now say so. `ALL_TWINS` itself is unchanged. - `test_each_case_twin_is_held_with_its_own_blob_or_named` said "both twins" of a path git takes, and `three-twins` holds three. It says "each twin". Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
(lane openRepoShape-1, 2026-10-22T15:24:50Z) Re-check r1158b of #1158 (fix round f1158 at r1158b was stopped at an account swap with a provisional READY and five items left. Lane 1 ran those five on
The re-check as r1158b wrote it: I did not write r1158b partial result on head
|
| Mutant | Rows failed | Which rows |
|---|---|---|
| M4 | 2 | mode[true], mode[false] |
| M18 | 2 | the two a-file-and-a-folder rows |
| M19 | 2 | the two three-twins rows |
| M20 | 2 | the two non-ascii-twins rows |
I ran the other 23 mutants too. Every count in the body's two tables matches mine:
| Mutant | Rows failed |
|---|---|
| HM1 | 12 |
| HM2 | 11 |
| HM3 | 6 |
| HM4 | 2 |
| HM5 | 11 |
| HM6 | 6 |
| HM7 | 5 |
| M1 | 10 |
| M2 | 11 |
| M3 | 12 |
| M5 | 11 |
| M6 | 6 |
| M7 | 5 |
I built the HM mutants from the writer's mutants_scratch.py definitions. Their diffs against head lie only inside refused_paths.
The extra mutants M8 to M17 are all killed (16, 6, 6, 12, 2, 8, 11, 6, 6 and 5 rows).
Every per-row attribution line in the body (lines 83 to 90) holds against my row-by-mutant table.
- Raw git 2.43.0 probe,
update-index -z --index-info: a symlink.GITMODULESgivesIgnoring path .GITMODULESandls-filesholds.gitmodules. This is the same withcore.ignorecaseunset,falseandtrue. - As a regular file,
.GITMODULESis held alongside.gitmodules, so the refusal comes from the mode. - Git's source shows the mode check,
S_ISLNKthenskip_iprefix("modules"), inread-cache.cv2.43.0 line 932. - The code matches the review's spec:
with_pathsandwith_twinstakelinks;- leaves are
(mode, oid)tuples; - the row is parametrized over
trueandfalse; - it makes the three asserts.
- It passes on head and fails 2 of 2 under M4 and HM4.
- The docstring sentence is the review's text, apart from line wrapping.
- It is true. I probed it in a scratch copy under a global
core.ignorecase=true:D/xandd/xalone give exactlyplan-file-reencoded("will not add file alias 'D/x' ('d/x' already exists in index)");- with no global setting, they give no finding;
- adding
.Git/Aand.Git/agives onlyplan-path-git-refuses.
- The early return is
if refused: return []atadopt-project.py:12649. The rehearsal's command isgit add -u(line 12678), as the body says.
- The three params are exactly the review's text:
a-file-and-a-folder,three-twinsandnon-ascii-twins(\u00c9,\u00e9). - The test file has 0 non-ASCII bytes, its longest line is 79, and it compiles.
-rs shows the same text at line 438.git diff 1913e27c..0301af57changes onlytests/test_adopt_check_throwaway_repos.py. Hunks:with_pathsCASE_TWINSwith_twins- the new row
- the skip text
- the
checkdocstring
- 39 added lines: longest 77, none non-ASCII, no trailing whitespace.
git diff --checkis clean. The author and committer name is Brett Heap and the email is the estate identity. - The PR is one file, +183 and -7 against base
038dafba9.
- The whole test file gives 48 passed, 1 skipped (27.7 s).
- It holds 49 ids: 29 at base and 20 new. None of the 20 exist at base.
- The 20 new rows give 19 passed, 1 skipped (3.6 s).
- With
tests/test_adopt_single_repository_record.py: 85 passed, 3 skipped. tests/test_no_auto_maintenance.py: 58 passed, 2 skipped (line 222).- All of these match the body.
- Counts match mine, including the free-disk figures (
.dffiles show 38G and 39G). - Exactly one
Closes #1033(line 1), andclosingIssuesReferenceslists only adopt-project.py:refused_paths'update-index -z --index-infois untested withcore.ignorecaseand case twins (aandA) on a case-insensitive disk #1033. - No Sourcery block. Title is 244 characters.
- The only
<p>is inside a code span (line 19). - I saw no
@,/home,/mntor/tmpon reading. I did not grep for them.
- Draft, base
038dafba9, MERGEABLE, state UNSTABLE. tests,tests-git-bashandpackageare still IN_PROGRESS on the new head. SonarCloud is SUCCESS.
Findings
- MUST: none.
- SHOULD: none.
- NIT-A (new, from this round): two comments are stale.
- Where:
tests/test_adopt_check_throwaway_repos.py, the comment aboveALL_TWINS(about lines 334 to 336) and thecheckrow's docstring (about line 447). I did not capture exact line numbers for these two. - What they say: "Every twin above in one source commit" and "
checkover a source holding every twin above". - Evidence:
ALL_TWINSis unchanged. It holds A, a, D/x, d/x, F/x, f and the four refused paths. It does not holdE,e/x,AB,Ab,ab,Éoré. Before this round every param's twins were in it. - Effect on tests: none. Body line 87 already says the disk row does not see M18 to M20.
- Fix: reword both to "the twins of
file-twins,folder-twins,a-folder-and-a-fileand the two refused sets above". Alternatively add the new twins toALL_TWINS,TWIN_ANSWERSand the "six it holds" count.
- Where:
- NIT-B (optional): the
test_each_case_twin_is_held_with_its_own_blob_or_nameddocstring says "both twins", but one param now has three. "each twin" would be exact.
Left to check
tests/test_path_guard_hygiene.py(the body says 49 passed).test_non_utf8_git_failures.py::test_no_test_skips_on_an_assertion_error(the body says 1 passed).- A scripted regex scan of the body for closing keywords, HTML tags outside code spans, non-ASCII characters and address strings.
- A grep that no other test imports the throwaway-repos test file.
- The "Linux ext4" claim in the body.
- The shape-doctor shards and the collisions file were not rerun, as the body says. I do not plan to unless you ask.
Files
/workspace/projects/openRepoShape-worktrees/l1-r1158/tests/test_adopt_check_throwaway_repos.py/workspace/projects/openRepoShape-worktrees/l1-r1158/adopt-project.py(refused_pathsat 12349,if refused:at 12649)- Scratch, all under
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1158/r2/:out/holds the per-mutant and gate outputs.mut/holds the mutant copies.probe/holds the git probe.body.mdandpr.jsonhold the PR as I read it.- The probe test is in
mut/control/tests/test_probe_reencoded.py, in the scratch copy only.
- I ran no
rm. No repository file changed, and I posted nothing.
Lane: openreposhape-1 (openRepoShape-1)
… for each set the plan keeps in the root, the spec leg or the code leg, its absence for twins in different repositories, a dropped twin and folders that only merge, and `execute`'s refusal before any leg; #1158's row names the six twins it holds; `with_paths` merges into a folder HEAD holds (#1161) `with_paths` wrote a second `src` or `specs` tree beside HEAD's (git fsck: duplicateEntries); it now merges a new path into the folder HEAD already holds. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
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 4 hours and 39 minutes by commenting |
… (restack step 1 of 3: #1158 landed as ef619c7) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…stack step 2 of 3) Its one file, tests/test_adopt_check_throwaway_repos.py, conflicted and takes this branch's side: the merge of #1158's final head 1e71152 already brought #1158's content, and this branch's net change to that file is #1189's own. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s/test_adopt_check_throwaway_repos.py Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Merges main at 11560eb into fix/1161-check-names-case-twins at 58aa9d2 (merge-base ef619c7, #1158's squash). One conflict, tests/test_adopt_check_throwaway_repos.py, in the module docstring: #1189 and #1169 each added a paragraph after #1033's. Both are kept, #1161's first, because it opens "so `check` passed twins", which follows from #1033's measurement, then #1169's "#1136 followed". Every row and helper of both sides auto-merged untouched. adopt-project.py auto-merged: both sides change `_entry_findings` (#1189 its case twins after the source path findings; main the `GIT_ATTR_SOURCE` and split-clone questions before `_paths_git_refuses`, and `_submodule_findings`' `unasked`) and the `check` paragraph of the module docstring, in separate lines. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…repository as `plan-case-twins` on every disk, a one-blob set as a NOTE in a leg and, in the root, two paths in one folder, and `execute` refuses the finding before any leg (#1161) (#1189) `adopt-project.py check` printed `plan ok` for a plan that keeps case twins in one repository: source paths that differ only in case (`A` and `a`, `D/x` and `d/x`), or a path that names in another case a folder above another (`F/x` and `f`). The plan is written on one disk and the clone that loses a twin is made on another, and a clone on a macOS or Windows disk checks out one path of each set. On a disk that ignores case, `execute` could then stop with `check` having said `plan ok`: as `adopt-lost` or at `git rm` mounting the legs, after both legs were pushed, or at git's `will not add file alias`, before any leg existed. - `check` now exits 1 and names `plan-case-twins`, one finding per repository the split makes (the root, the spec leg, the code leg). A set is every source path that one answered entry sends into one repository, whose paths differ only in case, or where one path names in another case a folder above another. It is asked on every disk, since `core.ignorecase` where `check` runs says nothing about the reader's disk. `execute` runs the same checks first, so it refuses the finding as `plan-case-twins` before it makes either leg. - A set whose paths all fold to one name and hold one blob in one mode is a NOTE, and `check` still says `plan ok` for it. `execute` prints no NOTE and does not refuse it. - In a leg that holds for every such set, folder twins (`src/D/x`, `src/d/x`) and sets of three or more included. - In the root the NOTE takes only two paths whose names differ only in their last part, `A` and `a` or `D/A` and `D/a`. Folder twins of one blob there (`D/x`, `d/x`), `D/A` beside `d/a` and sets of three or more (`AB`, `Ab`, `ab`) stay in the finding, since on the FUSE disk `execute` met git's `will not add file alias` for them. - The remediation says to rename all but one twin of each set in the source, commit, and re-run `plan`. It no longer offers to answer the twins into different repositories, because on a disk that ignores case `execute` loses those too (#1183). - Paths git refuses (`plan-path-git-refuses` names them), `drop` and unanswered entries are left out. At most 10 paths are named per repository, and the rest are counted. - Behaviour change: a source that keeps `Makefile` and `makefile` side by side in the root is now `plan-case-twins`. Before, `check` printed `plan ok`, and on a disk that keeps case `execute` split it and verified it. Two params of `tests/test_adopt_make_reads_first.py` changed, and `test_execute_refuses_makefile_beside_makefile_before_any_leg` asserts the refusal: no bare repository, no assembly or leg clone in the work directory, no split branch in the source. - Measured with git 2.43, on the bench disk (keeps case) and on a FUSE disk that ignores case and keeps it (`casefold` lookups), against base `4c7b8acd`: - On base, `check` printed `plan ok` for every scenario on the bench disk. On the FUSE disk `execute` stopped on three of them: `F/x` and `f` in the root, exit 1, `adopt-lost: F/x`, both legs and the split already pushed; `src/A`, `src/a`, `src/D/x`, `src/d/x` with own blobs in the code leg, exit 2 in 3 of 5 runs at `git rm -r -q -- src` after both legs were pushed; and `D/x` and `d/x` in the root with own blobs, refused before any leg as `plan-file-reencoded`. - On head, `check` names `plan-case-twins` for each of those three (then `plan-file-reencoded` where git refuses the alias). - The NOTE sets verified in `execute` on the FUSE disk: `A` and `a` in the root (3 of 3 runs), `D/A` and `D/a` in the root (2 of 2), `src/A` and `src/a` in the code leg (3 of 3), `specs/A` and `specs/a` in the spec leg (1 run). - In the root, folder twins and three paths of one blob (2 runs each, at `a131fc25`): `check` printed `plan-case-twins` and `plan-file-reencoded`, and `execute` refused both before any leg as `plan-case-twins`. - The whole of `tests/test_adopt_check_throwaway_repos.py`, CPython 3.12: at the head `58aa9d2b`, 91 passed and 2 skipped; on base 38 of its ids fail (r1189c). Mutants of the new code: 36 of 36 killed, each file restored and its blob checked against HEAD's. - Known limits: - `casefold` is full case folding, so `ß` and `ss` are named as a set, though a disk may hold them apart. - Unicode normalization is not asked: a precomposed `é` beside `e` and a combining accent is no finding, though a macOS disk takes them as one name. - The cut at 10 named paths can fall inside a set. - The one-blob NOTE, and the root's narrower rule for it, rest on the FUSE disk with git 2.43; real APFS and NTFS were not measured. The row for a disk that ignores case skips on every CI disk, which keeps case. - Not in this PR, each a follow-up: case twins the plan sends to different repositories, or a twin it drops beside one it keeps (#1183); the rehearsal's alias refusal, which `check` reports as `plan-file-reencoded` though its words say the bytes were re-encoded (#1184); twins a kept path makes with a file the shape writes into the root (#1191). Review: lane 1's independent reviewers reviewed each round. r1189 found `8684af86` NOT READY, for two MUSTs and four SHOULDs (#1189 issuecomment-6356435838). r1189b found `4d40ce9f` NOT READY for one SHOULD, that the one-blob NOTE covered root shapes that do not verify on a disk that ignores case (issuecomment-6364543347). The next round narrowed the root's rule and the sentence, and r1189c, lane 1's independent re-checker, found `58aa9d2b` READY, with no MUST, no SHOULD and two notes that do not block (issuecomment-6375603307). It re-ran 15 of the 36 mutants, and all 15 were killed. After #1158 landed as `ef619c74`, the branch was restacked onto it by merges of #1158's final head and of its squash, and its changed lines equal the reviewed delta (sha256 `04b2909a`). After #1169 and #1223 landed, main `11560eb9` was merged in as `5c4fcd9d`; its one conflict, a docstring both sides added to, keeps both, and the changed lines equal the reviewed delta (issuecomment-6722938949). `7d2f651e` leaves out of lane 4's #1121 rows the two trees that keep case twins, which `execute` now refuses, with lane 4's agreement (issuecomment-6722980082). After #1105 landed, main `12122952` was merged in cleanly as `47478d51`, whose 787 changed lines equal the delta before it (sha256 `637968e3`), and `472944b5` makes the cut agreed on #473 (issuecomment-6723000456) of the three #1105 rows that keep case twins. Lane 1's check carries READY to `472944b5` (issuecomment-6724542222). Tests, under a stub `gh` with a bogus token: at `58aa9d2b`, r1189c's re-check gave 91 passed and 2 skipped for `tests/test_adopt_check_throwaway_repos.py` (the same under a 3.14-like shim) and 33 passed for `tests/test_adopt_make_reads_first.py`. Main touched both files after the restack, so lane 1's gate ran on the refreshed tree itself, below: the PR's two test files, `tests/test_scaffold_leg_path_collisions.py`, the doc trio, the path-guard and no-auto-maintenance scans, and `tests/test_shape_doctor.py` in 4 shards. At `472944b5`: `tests/test_adopt_check_throwaway_repos.py` 194 passed and 2 skipped (the disk that ignores case), `tests/test_adopt_make_reads_first.py` with `tests/test_adopt_next_make_reads_first.py` 71 passed, `tests/test_adopt_collision_make_reads.py` 28 passed, `tests/test_adopt_single_repository_record.py` with `tests/test_scaffold_leg_path_collisions.py` 143 passed, the two scans 179 passed and 2 skipped, the doc trio 171 passed, and `tests/test_shape_doctor.py` in 4 shards 446 passed and 3 skipped. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). Its H0 `472944b5` is green on Linux and SonarCloud. The branch was never rebased. After H0, the only commit is update-branch's clean merge of main, giving dae7250, which is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: 9 pytest calls over `tests/test_adopt_check_throwaway_repos.py`, `tests/test_adopt_make_reads_first.py`, `tests/test_adopt_next_make_reads_first.py`, `tests/test_adopt_collision_make_reads.py`, `tests/test_adopt_single_repository_record.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_repo_hygiene.py`, `tests/test_path_guard_hygiene.py`, `tests/test_no_auto_maintenance.py` and `tests/test_shape_doctor.py` in 4 shards: 1,233 passed, 7 skipped. Closes #1161 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Closes #1033
Outside v1.2.0 by Brett Heap's ruling of 2026-10-21T10:32:04Z ("leave the follow-ups out of v1.2.0"). This PR lands after the v1.2.0 tag, on a later word.
What
#1033 asked what
refused_pathsdoes with case twins (aandA) whencore.ignorecase=true: does git take both index entries, refuse one, or fold them into one, and is each twin then named or refused by name?Measured on git 2.43.0, Python 3.12.3, Linux ext4. The raw
git update-index -z --index-infoprobe gave the same answers withcore.ignorecaseunset,false,true, andtruein the repository's own config.Aanda;D/xandd/x;F/xandf, and a file and a folder,Eande/x;n/Xandn/x;AB,Abandab;Éandé;git~2/x.Ignoring path <p>once per twin):.Git/Aand.Git/a;.GIT/xand.Git/x;Notes/.git/xandnotes/.git/x;..;GIT~1/x..GITMODULESis refused in any case, while the file.gitmodulesis held (Ignoring path .GITMODULESonce, andls-filesholds.gitmodules). The answer was the same withcore.ignorecaseunset,falseandtrue...,.gitin any case,GIT~1) ignore case, so for those git never holds one twin and refuses the other. Its refusal by mode looks at each twin's own mode, so one twin can be refused while the other is held, andrefused_pathsnames the refused one and no other.End to end,
plangives each twin its own REVIEW entry (Aanda,D/andd/,F/andf) and refuses no twin.checkwithcore.ignorecaseunset answersplan okfor kept twins, andplan-path-git-refusesnames both.Git/Aand.Git/a, and namesnotes/.git/xbut not its kept twinNOTES/x. A globalcore.ignorecase=truegives the same answers, with one exception: folder twinsD/xandd/xgetplan-file-reencoded, from the #654 rehearsal'sgit add -u("will not add file alias 'D/x' ('d/x' already exists in index)"). That comes from the rehearsal, not fromrefused_paths.So #1033's answer is: git never drops a case twin silently,
refused_pathssees each one, and the issue needs tests and no code change. This PR changestests/test_adopt_check_throwaway_repos.pyonly.Why
refused_pathsbuilds its index cannot fold or drop a twin without a test failing. They pin file twins, folder twins, a folder and a file, a file and a folder, three twins, a non-ASCII pair, twins git refuses by name (under a refused folder and as folders themselves), and a pair git refuses by mode.core.ignorecasetrueandfalseinto the repository themselves, and the answer is the same for both.with_paths(..., own_blobs=True), and ablob_ofhelper). A twin that is folded shows as a missing entry, and a twin that is merged into its sibling shows as a shared blob. With one blob for every path, a fold into the sibling would look like a keep.with_paths(..., links=...)writes the path with mode 120000, andwith_twinspasses it through). Git refuses.GITMODULESas a symlink and holds.gitmodulesas a file, so the mixed-mode row has a pair with one twin refused and one held. An answer that folds the index's paths into one case would take the refused twin for a held one.test_on_a_disk_that_ignores_case_each_twin_is_held_or_namedruns only wheregit inititself wrotecore.ignorecase=true, which means a disk that ignores case. Elsewhere it skips and says why, as the issue's direction asked. Its skip text names no per-run path.checkunder a globalcore.ignorecase=trueand asserts the exactplan-path-git-refusesfinding for.GIT/x,.Git/A,.Git/aand.Git/x, so the twins git refuses are named and the twins it holds are not. The row's tree also holdsD/xandd/x, which the rehearsal would refuse asplan-file-reencoded; the row does not see that, because_reencoded_files_findingsasks nothing of a source that holds a path git refuses (if refused: return []), and its docstring says so.Tests
New rows in
tests/test_adopt_check_throwaway_repos.py(20 ids, none of which exist at base038dafba9):test_each_case_twin_is_held_with_its_own_blob_or_named: 8 twin sets (file twins, folder twins, a folder and a file, a file and a folder, three twins, non-ASCII twins, twins under a path git refuses, twins git refuses) timescore.ignorecasetrueandfalse, 16 rows;test_a_twin_git_refuses_by_its_mode_is_named_beside_the_one_it_holds: the pair.GITMODULES(a symlink) and.gitmodules(a file), timescore.ignorecasetrueandfalse, 2 rows;test_on_a_disk_that_ignores_case_each_twin_is_held_or_named: 1 row, skipped on this bench;test_check_names_each_twin_git_refuses_and_no_twin_it_holds: 1 row.On head
0301af570the 20 rows give 19 passed, 1 skipped (the disk row) in 3.38 s, and the whole file gives 48 passed, 1 skipped (49 ids: 29 that exist at base and the 20 new ones).Hand mutants of
refused_paths: 7 of 7 killed. Each mutant replaces the body ofrefused_pathsin a scratch copy of the tree, never the worktree, and the 20 rows run against it, with the disk row forced to run by writing"true"in place ofNonein the scratch test file only. The unmutated scratch copy gives 20 passed.HM4 is killed by the mixed-mode row. It was first taken for equivalent, on the ground that git's path refusals ignore case, but they do not all: git refuses by a path's mode as well as by its name, so it refuses a symlink
.GITMODULESand holds the file.gitmodules. Under HM4 the refused twin is dropped without a word, and the row'snamed == [".GITMODULES"]and fates fail.A second set, written by the reviewer of the first head (M1 to M7, the same kinds of mutant as HM1 to HM7, and M18 to M20, which drop a twin silently), was rerun on the 20 rows the same way:
e/xwhenEsorts before ita-file-and-a-folderrows)three-twinsrows)non-ascii-twinsrows)Every row fails under at least one mutant:
checkrow: HM1, HM3, HM6.M18 to M20 are caught by their own rows alone (
a-file-and-a-folder,three-twins,non-ascii-twins), and M4 and HM4 by the mixed-mode rows alone.Gate, call by call (probe environment: stub
ghfirst on PATH,GH_TOKENbogus, emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset; one basetemp per call; at most two calls at once; 38G to 39G free on /workspace at each call of the fix round, 24G at the first head's calls):tests/test_adopt_check_throwaway_repos.py0301af570tests/test_adopt_check_throwaway_repos.pyandtests/test_adopt_single_repository_record.py0301af570tests/test_no_auto_maintenance.py0301af570tests/test_path_guard_hygiene.py0301af570tests/test_non_utf8_git_failures.py::test_no_test_skips_on_an_assertion_error(scans everytests/*.pyfor a skip on an assertion error)0301af570tests/test_shape_doctor.py, shard 00 of 4 (112 ids)1913e27c4tests/test_shape_doctor.py, shard 01 of 4 (112 ids)1913e27c4tests/test_shape_doctor.py, shard 02 of 4 (112 ids)1913e27c4tests/test_shape_doctor.py, shard 03 of 4 (112 ids)1913e27c4tests/test_scaffold_leg_path_collisions.py1913e27c4The shape-doctor shards come from one collect of 448 ids, dealt round-robin into 4 files, each asserted non-empty and collected at 112 before its run. They and the collisions file ran on the first head,
1913e27c4; the fix round changes the one test file again and no tool, and no other test imports it, so they were not rerun.The 3 skips in the adopt pair are the disk row (no case-insensitive disk on the bench) and two rows in
tests/test_adopt_single_repository_record.pythat needgit filter-repo, which is not on the probe PATH. The 2 skips in the no-auto-maintenance call aretests/test_no_auto_maintenance.py:222("the session began with GIT_CONFIG_GLOBAL set, and its file includes that one"), which the probe environment'sGIT_CONFIG_GLOBAL=/dev/nullcauses. The skips in the shape-doctor calls did not print a reason.Known limits
core.ignorecaseinto the throwaway repository.checkrow reads only the finding's text, so it cannot see a silent drop; the parametrized rows read the index back and do.core.precomposeunicode(NFC and NFD twins of one name) is not measurable on Linux. TheÉ/éprobe covers case twins only, not normalisation twins.Not in this PR
checkpasses a source whose root keeps case twins (Aanda). A clone on a disk that ignores case checks those out as one file.executehas not been measured on such a disk, because none was available, so this PR does not touch it. With a globalcore.ignorecase=trueon Linux, folder twins already getplan-file-reencodedfrom the #654 rehearsal; file twins and folder-and-file twins passcheck.Lane 1 files this as its own issue, with this text:
Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Pin Git case-twin handling in
refused_pathsandcheckso accepted paths remain distinct while refused paths are reported individually.Enhancements:
core.ignorecaseenabled, including conditional validation on case-insensitive filesystems.Tests:
core.ignorecasesettings.