Repository navigation
Closed
Milestone
Description
Goal: update-shape.py apply refuses, before any write, every run that would leave a copy importing a name from a copy that does not define it, wherever the kept copy came from: this run's --accept-local, or an earlier run's.
State
_refuse_kept_copies_missing_names(update-shape.pyapply --accept-local scripts/repo_shape.pycan keep an old helper that a newly copied file imports from, andmake bootstrapthen fails with ImportError #536, update-shape.pyapply --accept-local: a kept.pycopy that imports a name the run's newrepo_shape.pydropped passes, andmake bootstrapthen dies on an ImportError #604) builds itskeptset from the rowsrow.state in (BOTH, LOCALLY_MODIFIED) and row.path in accepted(update-shape.py:4288-4289on main4a6b9afd). So it asks only the copies this run's--accept-localnames.- A copy an earlier apply kept reads
unchangedin the nextcheck. The next apply never asks it, and writes a new importer beside it. - Its docstring calls it "the general guard" (
:4210).
What happens (measured)
rv1075, lane 5's independent reviewer of #1075 (#1055), measured this offline.
- Setup: a holder cut at main
6476c170, whosescripts/bootstrap.pyhas nountraced, with its own edit toscripts/bootstrap.pycommitted. - First apply:
update-shape.py apply --at 00f6d7f7 --accept-local scripts/bootstrap.pyexits 0. That target'ssiblings.pyimports nountraced, so nothing is refused. - Second apply:
update-shape.py apply --at c3cf5154(the family root's siblings.py: with a token in use, the clone and the fetch that carry it run in bootstrap.py'suntraced()environment, somake siblingsandfamily.py siblingswrite the token to no trace the caller asks git for (#1055) #1075's head), with no--accept-local.checkreadsunchanged scripts/bootstrap.pyandupstream-changed scripts/siblings.py.- The apply exits 0 and prints
copied scripts/siblings.py. The validators pass, and it commits. - Then
scripts/siblings.py --helpfails withImportError: cannot import name 'untraced' from 'bootstrap'. So wouldmake siblings,parkandresume.
- The one-step run is refused, as update-shape.py
apply --accept-local scripts/repo_shape.pycan keep an old helper that a newly copied file imports from, andmake bootstrapthen fails with ImportError #536 says.apply --at c3cf5154 --accept-local scripts/bootstrap.pyexits 2 withscripts/bootstrap.py (kept) lacks untraced, which scripts/siblings.py imports from it. The holder's files, HEAD and status are unchanged. - On main already (by the same reading, not measured): the family root's bootstrap.py and siblings.py: under GNU make 4.4's named-pipe jobserver, a member's make that says it is 4.4 or later is handed the holder's
MAKEFLAGSas it is, so it runs its jobs together again; every other make still gets no jobserver and no-j(#987) #1023'smember_make_environmenthas the same gap. A holder that kept, by an earlier apply, abootstrap.pyfrom before the family root's bootstrap.py and siblings.py: under GNU make 4.4's named-pipe jobserver, a member's make that says it is 4.4 or later is handed the holder'sMAKEFLAGSas it is, so it runs its jobs together again; every other make still gets no jobserver and no-j(#987) #1023 is written main'ssiblings.py, which imports that name.
Direction
- Ask every copy this run writes against the copy it imports from, as the run leaves that copy, not only against the copies this run's
--accept-localnames. The copy it imports from may be:- written by this run;
- kept by this run's
--accept-local; - left on disk as an earlier run kept it.
- Keep the refusal's code,
update-accept-local-missing-name. - Where the kept copy reads
unchanged, the line could say an earlier run kept it. That is the writer's call.
Verify
- The two applies above: the second is refused before any write, naming
scripts/bootstrap.pyanduntraced. The holder's files, HEAD and status are unchanged. - The one-step refusal is unchanged.
- The same for
member_make_environment, with a holder cut before the family root's bootstrap.py and siblings.py: under GNU make 4.4's named-pipe jobserver, a member's make that says it is 4.4 or later is handed the holder'sMAKEFLAGSas it is, so it runs its jobs together again; every other make still gets no jobserver and no-j(#987) #1023.
Found by lane 5's independent review of #1075 (#1055), rv1075 (#1075 issuecomment-6302090874).
Milestone: v1.2.0 (placement is lane 3's call).
Lane: openreposhape-5 (openRepoShape-5)
Metadata
Metadata
Assignees
Labels
No labels
Activity
the family root's siblings.py and its test: a row with a member whose…
brettheap commentedon Oct 21, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-21T10:34:45Z, for #1082
Logged in
lanes/log/openRepoShape-5.mdatef6ad56f468fdf0099531c6a1f60412ce3526def.The three reads (lane-collision-protocol Rule 1):
the family root's siblings.py: with a token in use, the clone and the…
update-shape.py: `update-accept-local-missing-name` asks a copy an ea…
docs/release-notes/v1.2.0.md: the fix round on #1155's four section r…
tests/test_update_shape_kept_helper.py: the both-directions row asser…