Repository navigation
tests/conftest.py: one helper builds the url.<base>.insteadOf rewrite that clone_just_pushed and read_through_git each build, and the plain-path git submodule update --init sites of #554's review use it (#440) #662
Description
Goal: every test that has git clone a just-pushed local remote reads it through git, and the rule that makes it so is written once.
Filed by lane openRepoShape-5 on Brett Heap's word of 2026-10-16T12:17:02Z ("#461's test/CI/doc lines (~27)"), from three lines on #461: its body (the two "Tests (#554's review)" lines, body) and lane 2's L2-40 (comment).
Lands after: #645's pull request (branch fix/645-fixture-copy-maintenance-race, no pull request yet). It edits tests/conftest.py (the docstring of clone_just_pushed at :85, and a new block after cloned_just_pushed at :137) and turns git's automatic maintenance off for every git the suite starts, the receive-pack of a push included. That may close at its root the race these lines guard against. Read what it landed first, then decide whether the sites below still want the rewrite as a second guard.
Lines (path:line at main 879d8047)
- L2-40, one rule in two places.
clone_just_pushed(tests/conftest.py:71-125; the rewrite is built at :112-116 from the RESOLVED remotes directory) andread_through_git(:1395-1415; typed and resolved, asGIT_CONFIG_COUNTentries) each build theurl.<file URI>.insteadOfrewrite for a just-pushed local remote. No test fails; a change to one will miss the other. Direction: one helper that returns the prefix list (resolved, and typed on request);clone_just_pushedpasses it as-carguments andread_through_gitasGIT_CONFIG_*entries. - A plain-path
git submodule update --initis still git's local clone of a just-pushed remote (Tracking: the test suite, CI and the docs #461 body, "Tests (tests: every test that clones a just-pushed local remote by its plain path now clones it withclone_just_pushed, so the macOSfailed to copy filerace of #440 cannot reach it;load_without_bytecodekeeps the doctor's and the Windows-path tests' loads of the family root's scripts from writing.pycinto the templates; the not-a-list doctor cases hold INVALID, exit 1; andGOOD_KEYSholds th #554's review, 2026-10-14)"). Sites:tests/test_family_bump_remove_rollback.py:337and:908;tests/test_doctor_legs_members_next.py:631and:987(the line says :630 and :981; they moved) and:1054, andtests/test_doctor_gitlink_repairs.py:343, which the line does not list. Direction: give each the helper's-carguments, or asubmodule_update_through_gitwrapper besideclone_just_pushed. Check each site first: anupdateover a submodule whose store already exists fetches (upload-pack reads the object store); only an--initof an empty mount is a local clone that walks the remote's files.tests/test_doctor_legs_members_next.py:607is a deliberate failure probe and stays as it is. - A hygiene test that refuses a plain-path recursive
git cloneof a just-pushed remote in tests/ outside conftest.py (optional; same body section). Direction: an AST test, if a rule can separate a clone of the session's remotes (scaffolded["remotes"],remotes / f"{PROJECT}.git") from a clone of a test's ownsourcerepository: plain clones of the latter remain, for exampletests/test_adopt_submodules.py:150,:263,:272andtests/test_adopt_ignored_shape_files.py:166,:246. If no rule is that precise, say so on this issue and close the line as not worth a noisy test. After tests: theholderfixtures copy the family fixture withshutil.copytreewhile git's background gc or maintenance can still be packing it, so a test errors at setup when a loose object vanishes mid-copy (#440's race, through a file copy) #645, auto maintenance is off in every repository the suite makes, so this test would guard a layer the fixture already covers.
Verify: the suites that hold the sites (tests/test_family_bump_remove_rollback.py, tests/test_doctor_legs_members_next.py, tests/test_doctor_gitlink_repairs.py, tests/test_clone_just_pushed.py) and tests/test_bump_leg_paste_lines.py plus the other read_through_git users, on Linux. A test of the helper: the prefix list for a typed and a resolved directory, with a trailing separator and without (tests/test_clone_just_pushed.py is the file for it).
Overlaps. Open PRs: none of the seven open PRs (#621, #627, #628, #630, #634, #639, #656) touches these files. Lane 5's in-flight branches: fix/645-fixture-copy-maintenance-race edits tests/conftest.py and adds tests/test_no_auto_maintenance.py (distinct hunks, :85 and :137, but the same file). Lane 4 holds none of these lines.
Mark each line → this issue on #461, and tick it there when this closes.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 16, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-16T12:56:04Z, for #662
Logged in
lanes/log/openRepoShape-5.mdat810399f409356afb98c1d9bee76d2b8281eed29b.The three reads (lane-collision-protocol Rule 1):
tests/test_clone_just_pushed.py and tests/conftest.py: `read_through_…
tests/conftest.py: the session turns git's automatic maintenance off,…
tests/conftest.py: one helper builds the `url.<file URI>.insteadOf` r…
Merge origin/main (bad05d2) into l3-563-docs
docs/release-notes/v1.1.0.md: entries for #748, #731, #810, #809, #816,
tests: three more hand-worked `GIT_CONFIG_COUNT` appends go through `…
setup-project.py: a project name typed at the prompt is checked as `-…