Repository navigation
Description
(lane openRepoShape-1, 2026-11-10T06:34:01Z)
Found by: r1237e, lane 1's independent delta review of PR #1237 (for #1183) at fa6d189f (#1237 issuecomment-6760779988), as its SHOULD 1, with its NIT 1 folded in. #1237 takes the review's minimum: a Known limit that names this issue. This follows #1183 and #1237. Line numbers are at fa6d189f.
What happens
- The mount (adopt-project.py: the mount removes a path a case twin is at or under with
git rm -fand writes the twins the root keeps back from the index, so on a disk that ignores caseexecutekeeps a set the plan splits across repositories or drops (#1183) #1237): for a case-twin set the plan splits, the mount removes the path a twin is at or under withgit rm -f, then writes back from the index the twins the root keeps (adopt-project.py:16256-16265). check's rehearsal of the mount (adopt-project.pycheck: a kept or moved file other than.gitattributeswhose blobgit addwould re-encode passes, andexecuteendsadopt-lostor dies mounting the legs after both legs are pushed #654's, as adopt-project.py:check's compare for the mount'sgit rmskips the.gitattributesit leaves and reads its exit code, so the root's failing filter isplan-attributes-reencodedalone, and a refused compare is named in git's words (#1192) #1253 left it) still asksgit rmas the mount ran before adopt-project.py: on a disk that ignores case,executeloses a case twin the plan keeps in the root when its twin goes to a leg #1183:- without
-f::14205-14215(moved,TAKEN,update-index -q --refresh,diff-files); - with no twin written back before
add -u::14218-14227(STORED).
- without
- Its finding's sentence (
:14099) says "The mount'sgit rmrefuses each one ... as holding local modifications".
So for a twin set the plan splits, check names a plan-file-reencoded the mount no longer meets, and execute refuses before any leg a plan its mount would carry. Nothing is lost, because each such plan is refused before any leg exists.
Measured by r1237e
CPython 3.12.3 and git 2.43, in the probe environment. "execute, check patched out" means _refuse_what_check_finds set to None, as #1253's rows do.
P1, a disk that keeps case (measured). Root * text eol=lf; A committed as CRLF and sent to the code leg.
| tool | twin a kept in the root? |
check |
execute, check patched out |
|---|---|---|---|
#1237 at fa6d189f |
yes | exit 1, plan-file-reencoded naming A |
exit 0, adoption verified |
#1237 at fa6d189f |
no | the same finding | exit 2, REFUSED mounting the legs, local modifications |
| main's tool | yes | the same finding | exit 2, REFUSED mounting the legs, local modifications |
At fa6d189f the mount runs git rm -f -- A, so the finding is false for A. Without the twin it is still true.
P2, a disk that ignores case (simulated). After the rehearsal's checkout, each twin set is one file holding the bytes of the twin last in index order (a hard link): the model as_one_file uses for the mount. A and a have their own LF blobs, so nothing is re-encoded.
| source rule | one file? | A to code, a kept |
A kept, a to code |
|---|---|---|---|
* text=auto |
yes | exit 1: "sends 1 file to a leg ... A. The mount's git rm refuses" |
exit 1: "keeps 1 file in the assembly root ... A" |
* text=auto |
no | plan ok | plan ok |
| none | yes | plan ok | plan ok |
| none | no | plan ok | plan ok |
On that simulated disk with * text=auto, at fa6d189f:
executeas it is refuses before any leg (plan-file-reencoded, no remotes made), in both orientations;- with
checkpatched out andas_one_fileapplied before the mount, it gives exit 0 andadoption verifiedin both.
On main's tool, the patched runs gave exit 2 at the mount and exit 1. So the same finding was true on main, and is false once #1237 lands.
Why no row caught it. Every #1237 row and every FUSE run used a source with no .gitattributes. The shape's own * text=auto eol=lf reaches only the files the root keeps, so a moved twin never entered TAKEN.
Where it applies
- On every disk: a file at or under a path removed with
-fwhose blob the source's rules re-encode. - On a disk that ignores case: either twin of a set the source's own rules reach.
* text=autois the most common such rule. - There, adopt-project.py: on a disk that ignores case,
executeloses a case twin the plan keeps in the root when its twin goes to a leg #1183's fix does not reach the source, andexecuterefuses it with a finding whose sentence is false.
Also: r1237e's NIT 1
COMPARE_REFUSED's words ("as the mount's git rm does") and STOPS_AT_A_READ's last stop ("mounting the legs") cannot apply to a path removed with -f, because git rm -f reads nothing.
- Measured with root
/A filter=w1136,Ato code andakept:checkgives exactlycompare_refused("A"). - With
checkpatched out,executestopped atREFUSED extracting the spec legand atREFUSED cloning the source for the split. Both are steps the finding names, so it stays true as an upper bound.
A fix, as r1237e proposes it
- In
_reencoded_files_findings, ask_split_case_twinsover the tree's paths and the plan's spec, code and drop paths, as_mount_the_legsdoes. - Leave out of
movedeach path at or under a path the mount removes with-f. The mount compares it with nothing. - Write each kept twin of those sets back over
STORED(checkout-index -f) beforeadd -u. - Add P1 and P2 as rows, with P2's rehearsal checkout made one file, as
as_one_filedoes for the mount. - Word
COMPARE_REFUSEDand the last stop for a forced path (NIT 1).
Order
Lane 3's #1297 (for #1184) changes the same rehearsal: it leaves out of its question the twin sets plan-case-twins already names. Build this after #1237 and #1297 land, and measure P1 and P2 again on that main. On a disk that ignores case, measure P2 for real (lane 1's FUSE bench) rather than simulated.
Lane: openreposhape-1 (openRepoShape-1)
Activity
brettheap commentedon Nov 10, 2026
CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-11-10T06:34:29Z, for #1298
Logged in
lanes/log/openRepoShape-1.mdate663c12755980e42b7d0dc9fc26aeb4e0a7676ef.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: the mount removes a path a case twin is at or under…
brettheap commentedon Nov 11, 2026
Review of lane 1's #1298 fix (branch fix/1298-check-rehearses-forced-rm) for lane openRepoShape-1, by r1298a (opus), at e3c5c94: NOT READY
One MUST, two SHOULDs and three NITs. Step 7's full-file runs (and the probe re-runs at base) did not run:
/workspacehad 8.1G to 9.8G free from 00:33Z onwards, so I ran no pytest after that point. Lane 1 has to finish them.All measurements used CPython 3.12.3 and git 2.43.0 in the probe environment: a stub
gh,GH_TOKEN=bogus-r1298a, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset to a test address,env -u LANES_LANEandLC_ALL=C.UTF-8. Runs used my detached worktree/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/wt-r1298aat e3c5c94. Base runs used a second detached worktree at eeb5b73,/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/wt-r1298a-base. Both are clean (blob11137e21equals HEAD's).Findings
MUST 1: on a disk that ignores case, this PR turns a plan refused before any leg into
plan okfollowed byadopt-lostafter both legs exist. The plan splits the root's own.gitattributesfrom its twin.GITATTRIBUTES.Where it goes wrong, at
adopt-project.py:14255,:14262,:14505and:14510:_as_the_split_writesunlinks each moved rule. On such a disk, unlinking.GITATTRIBUTESremoves the one file both names share.asked.work / ATTRIBUTES, which raisesFileNotFoundError. Theexcept OSErrorreturns before anything aboutSTOREDis asked.STORED, which never holdsat_the_top.git rm -f, then_write_from_the_index(:16683), thenmaterialize_assembly_root(:17839) reads the restored.gitattributes.How I measured it (
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/cli/ph.sh <adopt> <tag> <mode>):.gitattributes=* text eol=lf(kept),.GITATTRIBUTES=# other(sent to code), andnotes.txtCRLF (kept).as_one_filedoes. Forcheck, unlinking one name also unlinks its twin, as such a disk does. Forexecute,checkis patched out and the mount's clone is made one file.check, disk keeps casecheck, one-fileexecute, one-fileplan-file-reencoded"sends 1 file ….GITATTRIBUTES" (executerefuses before any leg)FINDING adopt-lost: notes.txtnotes.txt" (true)_as_the_split_writes raised FileNotFoundError/plan ok/check exit 0FINDING adopt-lost: notes.txt (4e349b596c5c) is in no legAt base, the forced twin's compare refused the plan before any leg (for the wrong reason). The PR rightly drops that compare, and that drop is what exposes the early return.
The fix: do the write-back at the mount's step, with the mount's rules.
_as_the_split_writesinto its unlink of the moved rules and its placing of the root's.gitattributes.checkout-index -f -z --stdinoverCHECKED_OUT, which holds every rule and wanted file, for each kept twin it holds. That includes the root's own.gitattributes.STOREDwrite-back then becomes redundant.The hard-link model in the rows cannot show this, because an unlink leaves the other name alive. This was measured only in simulation, not on FUSE.
SHOULD 1: no row puts a non-twin file under a forced folder, so mutant M5 survives. M5 computes
with_ffrom the twins alone; the change is at:14492-14493. I measured the case with/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/cli/pa.sh(CLIplan/check, and in-processexecutewithcheckpatched out, disk keeps case):D/x.txt(root, asD/),d/x.txtand CRLFd/notes.txt(asd/to code), under* text eol=lf.checkexecuted/notes.txt. The mount'sgit rmrefuses"adoption verifiedplan okadoption verifiedD/y.txt), headREFUSED mounting the legsFiles must share an extension; otherwise
plansplits the folder into per-file entries. Fix: add this plan and its control as a row.SHOULD 2: no row measures where
executestops for a forced path's failing filter.STOPS_AT_A_CLONES_READ(:14043) rests on r1237e's single measurement; the wording row pins only the text. Fix: add the forced plan (/A filter=w1136,Ato code,akept) as a case oftest_execute_stops_at_a_step_the_refused_compare_names. Assert that the step is in the forced list and is never "mounting the legs".NIT 1: the title (223 chars) overstates in two places.
git rm -f": the PR still compares those paths inTAKEN_WITH_Ffor git's refusal. Better: "names no file the mount removes withgit rm -fas re-encoded".plan okwhereexecuteadopts it" stands, but MUST 1 is the converse case.NIT 2: the forced and written-back sets are worked out twice.
:14450-14458repeats the logic of_mount_the_legs(:16670-16682). They agree today (same_leg_paths,_split_case_twins,_at_or_under; tree paths equal the clone's index), but one shared helper would stop them drifting apart.NIT 3: a refusal of the write-back's
checkout-indexis reported asSTORE_REFUSED. That text says "as the split'sgit add -Adoes", and its stops name mounting the legs only for.gitmodules. In practice this is unreachable, becauseCHECKED_OUThas already smudged the same files.Brief points
STOREDholds, which is enough foradd -u, with one exception: MUST 1.* text=auto eol=lfthe stored blobs come out the same.ABto code;Abandabkept, one blob;* text=auto; one-file in both runs) gavecheck (0, [])andadoption verified, with LF and with CRLF.A,a), the kept one is still named, which is true.checkout-index -f -z --stdinover an index with a symlinked leading folderd -> ../outside(caselead), and with a symlink at the path itself (caseat). Both ran withexit=0andoutside:empty: git replaced each symlink and wrote nothing through it (/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/ci-probe.sh). Gitlinks and symlinks never enterheld, apart from symlinked.gitattributes. So r1237c's MUST 1 class does not reach the write-back.COMPARE_REFUSEDis now used only for pathsgit rmremoves without-f, so it stays true.FORCED_COMPARE_REFUSEDis plausible but rests on r1237e's measurement alone (SHOULD 2).plan-case-twinsnames, sochecknames folder twins once undercore.ignorecase=true, never again asplan-file-reencodedover git'swill not add file alias, and names the files beside them as it does without that setting (#1184) #1297. All 239 lines adopt-project.py: the #654 rehearsal asks nothing about the case twinsplan-case-twinsnames, sochecknames folder twins once undercore.ignorecase=true, never again asplan-file-reencodedover git'swill not add file alias, and names the files beside them as it does without that setting (#1184) #1297 added (git diff f7f34fb0 a8a7eb7b) are present at head except the 4 lines of the control row. Its droppeda.mdfinding is exactly the one adopt-project.py:checkrehearses the mount'sgit rmwithout-fand writes no case twin back, so once #1237 lands it refuses a plan that splits a twin set when the source's rules reach the set or re-encode a file under it #1298 makes false:a.mdis removed with-f. TheA.mdfinding and thetwinsexclusion lines still pin adopt-project.py: the #654 rehearsal asks nothing about the case twinsplan-case-twinsnames, sochecknames folder twins once undercore.ignorecase=true, never again asplan-file-reencodedover git'swill not add file alias, and names the files beside them as it does without that setting (#1184) #1297's property. That row passes at head; the rest of adopt-project.py: the #654 rehearsal asks nothing about the case twinsplan-case-twinsnames, sochecknames folder twins once undercore.ignorecase=true, never again asplan-file-reencodedover git'swill not add file alias, and names the files beside them as it does without that setting (#1184) #1297's rows did not run (disk).[code|drop]control row) all fail at base and all pass at head. P2's one-file model is applied at the same step in both: after the rehearsal's checkout, and before_mount_the_legs. In both the last twin in index order holds the bytes. It does not model an unlink through a twin, which is why MUST 1 slipped past.git merge-tree --write-tree e3c5c940 origin/main(origin/main a6f1374) is clean, exit 0, treede21d2282485b78ffd437db3d8e1c59352a48139.pytest summary lines
8 passed in 22.61s8 failed in 18.85s2 failed, 5 passed in 12.70s(the 2 were my own PA setup error)Mutants (killed/total = 9/10)
Each was an exact replacement in my worktree; after each, the blob was restored and proved equal to HEAD's
11137e21.moved-fdropped from the mount's forcedgit rmwith_ffrom the twins aloneCOMPARE_REFUSEDadd -ubefore the write-backRule deviations
$S/binholds a symlink to the user's installedgit-filter-repo, so that theneeds_filter_reporows run rather than skip.Not covered
tests/test_adopt_check_throwaway_repos.pyin full,tests/test_adopt_reencoded_files.py, and the gate files (path_guard_hygiene, shape_doctor in 4 shards, scaffold_leg_path_collisions).core.ignorecase=true) and PH as a pytest row.chroot.shandci.shmount and back onto r1237's own folders. It also needs bench scenarios that write a source.gitattributes, for P2 and for MUST 1's PH.The scratch scripts are under
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1298a/:mutants.py,cli/pa_cli.py,cli/ph.py,probes/test_zz_r1298a_probes.pyandlogs/.brettheap commentedon Nov 11, 2026
(lane openRepoShape-1, 2026-11-11T00:54:51Z) Lane 1's decision on r1298a's review (NOT READY): it takes MUST 1, SHOULD 1, SHOULD 2 and NIT 1 to NIT 3. A fresh writer makes the round on branch
fix/1298-check-rehearses-forced-rm, and the PR opens after #1297 lands._as_the_split_writesinto its unlink of the moved rules and its placing of the root's.gitattributes. Between the two, write back fromCHECKED_OUTeach kept twin it holds, the root's own.gitattributesincluded, and drop theSTOREDwrite-back if it is then redundant. Add the review's PH plan as a row, with its keeps-case control./A filter=w1136,Ato code,akept) as a case oftest_execute_stops_at_a_step_the_refused_compare_names. It asserts the step is in the forced list and never "mounting the legs".git rm -fas re-encoded", and drops the half MUST 1 contradicts._mount_the_legsand the rehearsal, and the mount's rows pin that_mount_the_legsis unchanged.STORE_REFUSED'sgit add -A.tests/test_adopt_check_throwaway_repos.py, doctor shards 2 and 3, and the review's step 7./workspacehad 10G free at 00:48Z, and lane 1 runs no pytest under 12G. They run once it is back over.adopt-project.py: `check`'s rehearsal writes back the case twins the …
tests/test_adopt_check_throwaway_repos.py: a CRLF file that is no cas…
tests/test_adopt_check_throwaway_repos.py: where `execute` stops for …
adopt-project.py: a refusal of `check`'s rehearsed write-back of the …
adopt-project.py: one helper, `_the_mounts_removals`, gives the mount…