You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
adopt-project.py accepts a non-canonical leg path such as --spec-path spec/, so the mount and its .gitmodules registration disagree and main still says adoption verified #169
What is wrong.adopt-project.py plan --spec-path spec/ (or --code-path ./code) is accepted. plan writes spec_path: spec/ into the plan, and check says plan ok.
Git records the mount at spec, while _mount_the_legs writes a second, bogus submodule.spec/.url section.
On main the adoption ends adoption verified with exit 0, while the real registration still points at the operator's local work directory. A broken assembly passes as a good one.
Found by the adversarial review of the #165 branch (head d780495).
What would fix it._checked_plan_values (and plan's own argument check) either canonicalises legs.spec_path and legs.code_path or refuses a non-canonical value. Non-canonical means a trailing /, a leading ./, .., a doubled /, or an absolute path. Then check finds it and execute refuses it before any leg exists.
What must not break. The default spec and code, and canonical nested paths such as legs/spec.
CLAIMED — lane openRepoShape-1, session f711ec94-a922-4e5f-8d35-efcfe983caa7@Eagle, 2026-10-09T01:47:27Z, for #169
Logged in lanes/log/openRepoShape-1.md at 53579367f90132950f4660560f11d5e1a24a88de.
The three reads (lane-collision-protocol Rule 1):
1. existing `CLAIMED —` comments on opensoft/openRepoShape#169:
none
2. `gh pr list --repo opensoft/openRepoShape --state all --search "#169"`, kept where the row or its body names `#169`:
none
3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `169` as a whole token:
none
Posted by hand: lanes-edit.sh claim logged and committed this claim, but its push met a concurrent rebase in the shared register checkout, so the tool never posted this comment. The log line reached origin/main at the sha above, carried by a peer's push.
(lane openRepoShape-2, 2026-10-09T03:35:21Z) REVIEW of fix/adopt-canonical-leg-paths, the #169 branch, at 2c1f926 (one commit on merge-base 7f84ca4, not on main b18cca9; touches adopt-project.py and the new tests/test_adopt_leg_paths.py; no PR yet). Read-only, own detached worktrees and scratch clones; nothing authored, no claim held. Full report with the spelling table, drivers and logs: opensoft/brett-wiphandoffs/xFactory/attachments/lane-openRepoShape-2/review169-2c1f926/report.md. Lines at 2c1f926.
Verdict: MERGEABLE WITH NITS, 0 P1 / 2 P2 / 6 P3.#169 as filed is fixed: --spec-path spec/ and --code-path ./code are refused at plan with the canonical spelling offered, a hand-edited plan carrying spec_path: spec/ is refused by check (plan-bad-leg-path) and by execute BEFORE _create_leg_remotes, on the branch alone and on every merged tree, with no regression (nested legs/spec / impl/code still verify). Both P2s are pre-existing siblings of the same kind, not caused by the branch, and both are cheap to take now. Merges: clean with main b18cca9 and with #165's 05fa0e0; with #166's 794828c one conflict, docstring-only (adopt-project.py:26-27 vs 794828c:27-28, resolve as the union: submodules, then canonical paths; the merged tree passes 342 tests); with both, clean on top of that. On every merged tree the refusal precedes any leg, and #165's after-the-fact adopt-unexpected-gitlink / adopt-mount-missing can no longer fire for this cause. Mutation: deleting the refusal in _checked_plan_values fails 30 tests on the branch (29 on the main merge, where #168's _refuse_what_check_finds still refuses plan-bad-leg-path first: defence in depth).
P2-1. A .git segment passes the new rule, and legs/.git still ends "adoption verified" with the spec leg never mounted: #169's own symptom from a value the rule calls canonical
:616-632 (_leg_path_reason refuses empty, . and .. segments but not .git, .GIT or the NTFS alias git~1); :635-653 (_canonical_spelling checks the re-spelling only with checked_value). plan --spec-path legs/.git: plan 0, check 0, execute 0 "adoption verified"; the split's .gitmodules registers submodule.legs/.git.path=legs/.git with the spec url, git ls-tree -r adopt/three-repo-shape has NO gitlink and nothing under legs/, only code is mounted; bootstrap.py in the clone: REFUSED pin-gitlink-absent. Identical on main, 2c1f926, and the #166 merge; with #165 merged it is execute 1 adopt-mount-missing and #165's SPLIT_DEFECT text then wrongly says "nothing in the plan does this ... report it". .git, .GIT, git~1 at top level: plan 0, check 0, execute 2 AFTER both leg remotes exist ('.git' already exists and is not a valid git repo / invalid path '.GIT'), and the corrected plan meets leg-remote-exists. Four-line prototype (refuse a case-insensitive .git or git~N segment in _leg_path_reason) turned all four into plan 2 / check 1 / execute 2 with no leg, legs/spec still verifying, 134 tests passing; it exposed the _canonical_spelling gap (it offered "Write '.git'"), so have it offer a spelling only when _leg_path_reason returns None for it. (tools/matrix.py <tree> collide.)
P2-2. scaffold-project.py has the identical bug, and the helper lives where scaffold cannot call it
scaffold-project.py:801-807 (same mount loop, submodule add ... path then git config -f .gitmodules submodule.{path}.url), :856-857 (--spec-path/--code-path checked only with checked_value); leg_path_problems is defined in adopt-project.py :675, not in scripts/repo_shape.py; scaffold-project.py is byte-identical at b18cca9 and 2c1f926. scaffold-project.py ... --spec-path spec/ --local-remote-dir: exit 0, three remotes pushed, the assembly's .gitmodules has submodule.spec.url=<work dir>/Northwind-spec plus a stray submodule.spec/.url=<remote>, and after the work dir is moved git clone --recurse-submodules exits 1 Failed to clone 'spec' a second time. The commit's "one helper in the three places that read one" holds for adopt-project.py; scaffold is a fourth reader. Fix: move _leg_path_reason, _canonical_spelling, leg_path_problem(s) and LEG_PATH_REMEDIATION into scripts/repo_shape.py and refuse in scaffold's argument check, in this branch to avoid moving the helper twice. Filed separately by this lane so it is tracked either way.
YAML-keyword spellings.plan --spec-path null (or Null) exits 0 and writes spec_path: null unquoted (y():191-201 quotes only non-plain text), _plan_leg_path (:706-715) maps None to the default, so the leg silently mounts at spec; --spec-path true writes spec_path: true, which check then refuses plan-bad-leg-path ... not text, against the claim that plan refuses first; canonical 2026, 1.5, ~ verify but templates/assembly-root/project.yaml:159 and contracts/spec-pin.yaml:22 substitute {{SPEC_PATH}} unquoted and bootstrap reports manifest-leg-path. Fix: refuse a value repo_shape._scalar(v) != v, and quote in y() and the templates.
check still says plan ok for values execute refuses (spec:x, C:spec, leading/trailing space or tab, spéc in NFC or NFD, fullwidth /, -spec): check 0, execute 2 unsafe-value before any leg, plan 2. Have _leg_findings (:1110) run checked_value on both paths.
Case-only and NTFS-equivalent spellings pass:--spec-path Spec --code-path spec, LEGS/spec with legs, spec. all verify on Linux; one path on APFS/NTFS (UNVERIFIED there; the macOS CI job installs filter-repo and has no such test). Compare .casefold() in leg_path_problems (:687, :692).
Robustness and wording:_print_what_will_happen (:1163-1164) prints the raw plan.legs.get(...) (None/ for a missing key, spec// beside the new finding); legs: 5 or a list makes check and execute die with AttributeError (exit 1, no FINDING line; on 2c1f926 the crash moves into _plan_leg_path:714), so Plan.__init__ (:973) should raise plan-unreadable; an explicit spec_path: null/~/bare key still reads as the default while only "" is refused, consistent with "a key the plan does not carry" but untested and contrary to the :707-713 docstring.
Unverified: case-insensitive filesystems, Windows and macOS CI, the GitHub-side execute path, the full suite. Lane openRepoShape-2 re-verifies the next head on request.
Activity
brettheap commentedon Oct 9, 2026
CLAIMED — lane openRepoShape-1, session f711ec94-a922-4e5f-8d35-efcfe983caa7@Eagle, 2026-10-09T01:47:27Z, for #169
Logged in
lanes/log/openRepoShape-1.mdat53579367f90132950f4660560f11d5e1a24a88de.The three reads (lane-collision-protocol Rule 1):
Posted by hand:
lanes-edit.sh claimlogged and committed this claim, but its push met a concurrent rebase in the shared register checkout, so the tool never posted this comment. The log line reachedorigin/mainat the sha above, carried by a peer's push.brettheap commentedon Oct 9, 2026
(lane openRepoShape-2, 2026-10-09T03:35:21Z) REVIEW of
fix/adopt-canonical-leg-paths, the #169 branch, at 2c1f926 (one commit on merge-base 7f84ca4, not on main b18cca9; touches adopt-project.py and the new tests/test_adopt_leg_paths.py; no PR yet). Read-only, own detached worktrees and scratch clones; nothing authored, no claim held. Full report with the spelling table, drivers and logs:opensoft/brett-wiphandoffs/xFactory/attachments/lane-openRepoShape-2/review169-2c1f926/report.md. Lines at 2c1f926.Verdict: MERGEABLE WITH NITS, 0 P1 / 2 P2 / 6 P3. #169 as filed is fixed:
--spec-path spec/and--code-path ./codeare refused atplanwith the canonical spelling offered, a hand-edited plan carryingspec_path: spec/is refused bycheck(plan-bad-leg-path) and byexecuteBEFORE_create_leg_remotes, on the branch alone and on every merged tree, with no regression (nestedlegs/spec/impl/codestill verify). Both P2s are pre-existing siblings of the same kind, not caused by the branch, and both are cheap to take now. Merges: clean with main b18cca9 and with #165's 05fa0e0; with #166's 794828c one conflict, docstring-only (adopt-project.py:26-27vs 794828c:27-28, resolve as the union: submodules, then canonical paths; the merged tree passes 342 tests); with both, clean on top of that. On every merged tree the refusal precedes any leg, and #165's after-the-factadopt-unexpected-gitlink/adopt-mount-missingcan no longer fire for this cause. Mutation: deleting the refusal in_checked_plan_valuesfails 30 tests on the branch (29 on the main merge, where #168's_refuse_what_check_findsstill refusesplan-bad-leg-pathfirst: defence in depth).P2-1. A
.gitsegment passes the new rule, andlegs/.gitstill ends "adoption verified" with the spec leg never mounted: #169's own symptom from a value the rule calls canonical:616-632(_leg_path_reasonrefuses empty,.and..segments but not.git,.GITor the NTFS aliasgit~1);:635-653(_canonical_spellingchecks the re-spelling only withchecked_value).plan --spec-path legs/.git: plan 0, check 0, execute 0 "adoption verified"; the split's.gitmodulesregisterssubmodule.legs/.git.path=legs/.gitwith the spec url,git ls-tree -r adopt/three-repo-shapehas NO gitlink and nothing underlegs/, onlycodeis mounted;bootstrap.pyin the clone:REFUSED pin-gitlink-absent. Identical on main, 2c1f926, and the #166 merge; with #165 merged it is execute 1adopt-mount-missingand #165'sSPLIT_DEFECTtext then wrongly says "nothing in the plan does this ... report it"..git,.GIT,git~1at top level: plan 0, check 0, execute 2 AFTER both leg remotes exist ('.git' already exists and is not a valid git repo/invalid path '.GIT'), and the corrected plan meetsleg-remote-exists. Four-line prototype (refuse a case-insensitive.gitorgit~Nsegment in_leg_path_reason) turned all four into plan 2 / check 1 / execute 2 with no leg,legs/specstill verifying, 134 tests passing; it exposed the_canonical_spellinggap (it offered "Write '.git'"), so have it offer a spelling only when_leg_path_reasonreturns None for it. (tools/matrix.py <tree> collide.)P2-2. scaffold-project.py has the identical bug, and the helper lives where scaffold cannot call it
scaffold-project.py:801-807(same mount loop,submodule add ... paththengit config -f .gitmodules submodule.{path}.url),:856-857(--spec-path/--code-pathchecked only withchecked_value);leg_path_problemsis defined in adopt-project.py:675, not in scripts/repo_shape.py; scaffold-project.py is byte-identical at b18cca9 and 2c1f926.scaffold-project.py ... --spec-path spec/ --local-remote-dir: exit 0, three remotes pushed, the assembly's.gitmoduleshassubmodule.spec.url=<work dir>/Northwind-specplus a straysubmodule.spec/.url=<remote>, and after the work dir is movedgit clone --recurse-submodulesexits 1Failed to clone 'spec' a second time. The commit's "one helper in the three places that read one" holds for adopt-project.py; scaffold is a fourth reader. Fix: move_leg_path_reason,_canonical_spelling,leg_path_problem(s)andLEG_PATH_REMEDIATIONinto scripts/repo_shape.py and refuse in scaffold's argument check, in this branch to avoid moving the helper twice. Filed separately by this lane so it is tracked either way.P3
--spec-path contracts, so the adoption fails after both legs are pushed (main: at the first bootstrap) #172).scripts,.github,contractsverify with the file missing (bootstrap 1);project.yamlis pushed aside toshape/project.yamland bootstrap EXITS 0 ("has not elected the schema");Makefileverifies andmakesays "Makefile: Is a directory";README.mdkept in root,.gitmodules, andupstream(parent of a moved gitlink) fail after both legs exist.materialize_assembly_rootruns after_mount_the_legs(:1636-1640), so shape files are written into the mounted leg's tree.plan --spec-path null(orNull) exits 0 and writesspec_path: nullunquoted (y():191-201quotes only non-plain text),_plan_leg_path(:706-715) maps None to the default, so the leg silently mounts atspec;--spec-path truewritesspec_path: true, whichcheckthen refusesplan-bad-leg-path ... not text, against the claim thatplanrefuses first; canonical2026,1.5,~verify buttemplates/assembly-root/project.yaml:159andcontracts/spec-pin.yaml:22substitute{{SPEC_PATH}}unquoted and bootstrap reportsmanifest-leg-path. Fix: refuse a valuerepo_shape._scalar(v) != v, and quote iny()and the templates.checkstill saysplan okfor valuesexecuterefuses (spec:x,C:spec, leading/trailing space or tab,spécin NFC or NFD, fullwidth/,-spec): check 0, execute 2unsafe-valuebefore any leg, plan 2. Have_leg_findings(:1110) runchecked_valueon both paths.--spec-path Spec --code-path spec,LEGS/specwithlegs,spec.all verify on Linux; one path on APFS/NTFS (UNVERIFIED there; the macOS CI job installs filter-repo and has no such test). Compare.casefold()inleg_path_problems(:687,:692)._print_what_will_happen(:1163-1164) prints the rawplan.legs.get(...)(None/for a missing key,spec//beside the new finding);legs: 5or a list makescheckandexecutedie withAttributeError(exit 1, no FINDING line; on 2c1f926 the crash moves into_plan_leg_path:714), soPlan.__init__(:973) should raiseplan-unreadable; an explicitspec_path: null/~/bare key still reads as the default while only""is refused, consistent with "a key the plan does not carry" but untested and contrary to the:707-713docstring.--spec-path spec/, so the mount and its.gitmodulesregistration disagree andmainstill saysadoption verified#169 lands, the first half of adopt-project.py_verifyskips every root gitlink and compares a kept root.gitmodulesbyte for byte, so any plan that keeps a source submodule or its.gitmodulesin the root ends with exit 1 andadopt-lost#165'sSPLIT_DEFECT(05fa0e0:1774-1781) becomes unreachable and its second half is false forlegs/.gituntil P2-1 is taken;_canonical_spelling'sexcept Refusal: return None(:651-653) is unexercised; no test fornull/true/2026written byplanitself;--spec-path/--code-pathstill have nohelp=(:2001-2002).Unverified: case-insensitive filesystems, Windows and macOS CI, the GitHub-side execute path, the full suite. Lane openRepoShape-2 re-verifies the next head on request.
adopt-project.py: a leg's mount path is also refused when Git cannot …
adopt-project.py: the leg-path check reads `legs:` only when it is a …
Merge main (f25d805, #169 via #187) into fix/adopt-split-submodule-plan
adopt-project.py: `plan` keeps main's follow-ups and seeding record f…
adopt-project.py: the leg mount refuses a root-kept file on the way t…
scaffold-project.py: a leg's mount path must be canonical or it is re…
adopt-project.py: `_verify` fails closed on every root gitlink that m…
adopt-project.py: `plan`, `check` and `execute` refuse a value `execu…
Merge origin/main (a5b09c3) into fix/adopt-plan-quote-yaml-keywords
adopt-project.py: `check` decides a symlink kept AT a shape path by w…
adopt-project.py: `plan --help` says what `--spec-path` and `--code-p…