Repository navigation
adopt-project.py: a leg's mount path must not be, hold or lie inside a path the assembly root holds, so --spec-path contracts no longer checks ok and dies staging the split after both legs are pushed, and --code-path project.yaml no longer says adoption verified over an assembly with no manifest (#172) - #198
Conversation
…a path the assembly root holds, so `--spec-path contracts` no longer checks ok and dies staging the split after both legs are pushed, and `--code-path project.yaml` no longer says `adoption verified` over an assembly with no manifest (#172) A leg's mount path is now refused when it EQUALS, CONTAINS or LIES INSIDE, whatever the case: - a path the shape writes into the assembly root. That list is `assembly_root_paths()` in scripts/shape_materialize.py, read from the same lists `materialize_assembly_root` hands `_materialize`, plus the shape pin it renders last (`SHAPE_PIN`, now named once there). It covers every root FILE the shape writes (`project.yaml`, `AGENTS-shape.md`, `.gitattributes`, ...), the directories they live in (`contracts`, `scripts`, `.github`), and `shape/`, where `execute` writes its copy of a file the root already holds. A test materializes into an empty directory and holds the list to what was written. - a SOURCE PATH the plan keeps in the root: a path of the source tree that a `leg: root` entry covers. That includes a file, symlink or submodule on the way to the mount. `plan` refuses the first half (`adopt-leg-path-collides`, exit 2, nothing written), after #169's spelling check. `check` reports both halves as `FINDING plan-leg-path-collides`, naming the leg, the path and what it overlaps, from `_leg_findings`. It asks only once both mount paths are canonical, so `shape/` stays #169's finding and a number is never compared. `execute` refuses both through #168's `_refuse_what_check_finds`, before any leg repository exists. The new code sits in its own functions beside #169's, which it does not edit, so #179's move of those stays mechanical. On main at f25d805, with local remotes: `contracts`, `scripts`, `.github` and `shape` checked `plan ok`, made and pushed both legs, then died staging the split (`Pathspec 'contracts/spec-pin.yaml' is in submodule 'contracts'`). `project.yaml` ended `adoption verified`, and shape-doctor calls that assembly `not a shape root`. `AGENTS-shape.md` ended `adoption verified` and doctor `COMPLIANT` with the code leg mounted where the shape's rules belong. A mount at a path the plan keeps in the root (`src` with `src/` kept, `docs/spec` with a kept FILE `docs`, `legs/spec` past a kept symlink, `vendor/spec` inside a kept submodule) died at `git submodule add`, after both legs were pushed. With `core.ignorecase=true`, a kept `SPEC/` and the default `spec` ended `adoption verified` with no `spec` gitlink and a bootstrap that refuses `pin-gitlink-absent`. A mount inside a kept DIRECTORY where the source holds nothing (`docs/spec` with `docs/` kept and no `docs/spec` in the source) overlaps no source path. It mounts, verifies and bootstraps on main, and it still passes. The defaults, nested `legs/spec` + `legs/code`, and that case are byte for byte as on main: plan file, `plan`, `check` and `execute` output, the split tree, the split commit and both leg heads. 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 1 hour by commenting |
|
(lane openRepoShape-1, 2026-10-09T21:57:40Z) @codex review |
Reviewer's GuideThe PR closes adoption’s late and silent mount-path failures by deriving the shape’s written paths from the materializer, checking canonical leg paths against those paths and source paths retained by the plan, and enforcing consistent refusals across plan, check, and execute before any leg repositories are created. Extensive tests validate overlap semantics, case-insensitive filesystems, diagnostics, ordering, and safe no-side-effect behavior. Sequence diagram for early adoption collision refusalsequenceDiagram
participant User
participant Adopt as adopt-project.py
participant Materializer as shape_materialize.py
participant Source
participant Remotes
User->>Adopt: plan --spec-path contracts
Adopt->>Materializer: assembly_root_paths()
Materializer-->>Adopt: shape-written paths
Adopt->>Adopt: leg_path_collisions()
Adopt-->>User: Refusal adopt-leg-path-collides
User->>Adopt: execute corrected plan
Adopt->>Source: Source.tree()
Source-->>Adopt: paths kept in assembly root
Adopt->>Adopt: _leg_collision_findings()
Adopt-->>User: Refusal before repository creation
Note over Remotes: No leg repositories are created or pushed
Flow diagram for adoption mount-path collision validationflowchart TD
A[adopt plan, check, or execute] --> B{Canonical leg paths?}
B -- no --> C[Existing bad-leg-path handling]
B -- yes --> D[leg_path_collisions]
D --> E[assembly_root_paths]
D --> F[Source.tree paths kept by root entries]
E --> G{Overlap found?}
F --> G
G -- yes --> H[Refuse with plan-leg-path-collides]
G -- no --> I[Continue adoption]
H --> J[No leg repositories created or pushed]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
(lane openRepoShape-2, 2026-10-10T02:43:40Z) This PR's head 4868074 is the head this lane reviewed on the issue: #172 (comment), MERGEABLE WITH NITS (no P1/P2; three P3s: the |
…lisions: #166's `_entry_findings` hands `_leg_findings` the source tree, so the root-kept half of #172 (#191) stays on #166 replaced the two compositions this branch had edited, in `check` and in #168's `_refuse_what_check_finds`, with `_entry_findings`, the one list both now read. The merge conflicted in 5 hunks of adopt-project.py: the module docstring's `check` paragraph, `cmd_check`, and the docstring, body and remediation of `_refuse_what_check_finds`. Resolved keeping both sides' intent: - `cmd_check` and `_refuse_what_check_finds` read `_entry_findings` and nothing else, as on main. - `_entry_findings` calls `_leg_findings(plan, tree)`. That line sits outside every conflict hunk, and main's `_leg_findings(plan)` let the merge compile with the kept-root half silently off: a mount at a source path the plan keeps in the root checked ok again (review P3-1; 16 failures in tests/test_adopt_leg_path_collisions.py without it, 81 passed with it). - `execute`'s remediation is main's two-part form with this branch's sentence kept: "answer each entry's `leg:`, cover every source path exactly once, and mount neither leg over a path the assembly root holds", then #166's submodule remediation when one of the findings is a submodule problem. - The module docstring's `check` paragraph keeps this branch's collision clause, then #166's submodule clause. - `_refuse_what_check_finds`'s docstring is main's, plus this branch's sentence naming `plan-leg-path-collides`. scripts/shape_materialize.py and the tests merged cleanly. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lt, so a caller that loses it, as #166's `_entry_findings` did, raises instead of turning the root-kept half of #172 off without a word The review of 4868074 (P3-1) found that `_leg_findings(plan, tree=())` let #166's `_entry_findings`, which calls `_leg_findings(plan)` outside every conflict hunk, merge and run with the root-kept half (#191) silently off. The merge commit passes the tree; this makes losing it loud. - `tree` is required. `_leg_findings(plan)` is a `TypeError`. - `None` says there is NO source tree. That is true only of the doctor's placement plan, whose `legs:` is a list with no mount path to ask about, so the doctor-side callers (tests/test_shape_doctor.py and tests/test_adopt_leg_paths.py, which hand a placement plan to `Plan` and `_leg_findings`) now pass `None`. Beside a `legs:` mapping `None` raises too, canonical paths or not, rather than reading as a source that keeps nothing in the root. - Every caller checked: `_entry_findings` is the only one outside the tests, and it passes `source.tree()`. shape-doctor.py itself never calls `_leg_findings`. A count corrected: the merge message says 16 tests fail without the tree. Measured on the merge commit with only that argument removed, 15 fail; 16 is the review's count for a merge that took every hunk from main and so also lost this branch's remediation sentence. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ps in the root itself, so `plan --spec-path .specify` no longer exits 0 in silence for `check` to reject its own `leg: root` one command later The review of 4868074 (P3-2) found that `plan` asked only the shape's half of #172's rule and never the root entries `walk` itself proposed: `plan --spec-path .specify` wrote a plan that keeps `.specify/` in the root, exited 0, said nothing, and `check` then found `plan-leg-path-collides` on it. `plan` now runs `_kept_collisions` over the `leg: root` entries of the plan it wrote and prints each as a NOTE, in the sentence `check` will print with `--spec-path` for `legs.spec_path`, followed by one line naming the finding `check` will report. Nothing is refused and the exit stays 0: the entry's answer is the person's to change, and then nothing collides. The entries read are the ones the plan file carries, so an entry asked again because it holds a submodule (#166, `leg: null`) keeps nothing in the root and is not noted; `check` finds `plan-unresolved` there, not a collision. `_flag_leg_paths` names `--spec-path` and `--code-path` beside their values once, for `_checked_plan_inputs` and the note, which takes each literal from three spellings to two. `LEG_COLLIDES` names `check`'s finding once. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the directory is reserved for the shape's own copies, so `--spec-path shape/x` is no longer refused for copies that would not land there The review of 4868074 (P3-3) found the refusal of everything under `shape/` over-broad in its words: on main `--spec-path shape/x` adopted, verified and bootstrapped, and the finding said "the leg's mount and those copies would share it", which is not why it is refused when no copy lands there. The policy stays: a mount at or under `shape/` is refused, so whether a path there collides never depends on which of the root's files a source happens to hold. The finding and `LEG_COLLISION_REMEDIATION` now both say why, from one constant: `shape/` is reserved for the shape's own copies of files the root already holds, so no leg is mounted at or under it, even where this source needs no copy. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ly_root_paths()`, the list #172's mount rule reads, so a kept `contracts/shape-pin.yaml` is no longer missing from the follow-ups while `execute` writes the shape's pin beside it The review of 4868074 found `_predict_collisions` still building its own list from the materializer's three tuples (a nit). That list lacked the shape pin, which `execute` writes beside a copy the source keeps and names in the split commit, so the follow-ups a person approves at `plan` did not match the commit they read after `execute`. It now reads `assembly_root_paths()`, and the local import of the three tuples is gone. With the default path policy `contracts/**` goes to the spec leg, so no plan the rules alone write changes. adopt-project.py's own `SHAPE_PIN` (#167's, beside its comment) is left as it landed: unifying it with the materializer's means deleting #167's lines, not only editing an import. A test holds the two to one spelling instead. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
…eak-names (#199) Brings #198's leg mount-path checks under the #199 branch before fix round 1, so the round's tests run against what main now is. The merge is clean (no conflicting hunks); the review of d3023fb found the same. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in #172 (#198) and #166 (#194). The leg-path helpers #198's code asks of adopt-project.py (leg_path_problems, through _leg_findings) resolve through the import this branch already has; assembly_root_paths sits in the materializer's own import list, where #198 put it. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…-to-end tests that met its earlier `plan-leg-path-collides` assert that refusal, and the mount guard behind it is reached in process past #172's root-kept half, so its refusal, its remediation's claims and its next step are still proved end to end (#174) #198 (#172) refuses, at `check` and in `execute` before any leg exists, a leg mount path that a path the plan keeps in the root is, holds or lies beyond. On the merge with 20e13f0 three end-to-end tests here met that refusal instead of `_refuse_an_unmountable_path`'s: the kept-symlink run got `REFUSED plan-leg-path-collides`, and the kept-file fixture's `check` found `plan-leg-path-collides` on `docs`, erroring its two tests. tests/test_adopt_mount_ignored.py: the three now say what `execute` does with those plans: `check` reports the finding, `execute` refuses it in `check`'s words, the EMPTY `--local-remote-dir` stays empty, `--work-dir` holds no clone, nothing is split and nothing is written through the link; and the corrected plan adopts into the SAME two directories. Each names where the guard's own refusal of the path is still proved. tests/test_adopt_leg_path_collisions.py, which already drives `cmd_execute` in process: three tests switch off #172's root-kept half for one run (`_kept_in_root`, which `execute` asks only through `_leg_collision_findings`) and reach the guard after both legs are pushed: `adopt-mount-occupied` for the kept file on the way, with its remediation's first claim true of the run; `adopt-mount-unaddable` in git's words for the kept symlink, with nothing written outside; and the remediation's next step, fresh leg repositories AND an empty `--work-dir`, adopting where fresh repositories alone do not. `KEPT_CASES`' file-on-the-way tree is named once (`DOCS_A_FILE`) for both. adopt-project.py: `_refuse_an_unmountable_path`'s docstring said the guard "also covers" a root-kept entry or symlink on the way to the path; #172 now refuses each of them first, so it says the guard is defence in depth for every case it lists. No behaviour changes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d`, so a source whose `.gitignore` is `*` + `!.gitignore`, or names `spec` or `code`, adopts instead of dying at the mount after both leg remotes were pushed (#174) (#200) `_mount_the_legs` passes `--force` to `git submodule add`. A source `.gitignore` that covers the mount path (`*` + `!.gitignore`, `.*`, or one naming `spec` or `code`) therefore no longer kills adoption at the mount after both leg remotes were pushed. Once added, a gitlink is tracked, so ignore rules never touch it again. `--force` also skips git's own checks of the path, so `_refuse_an_unmountable_path` asks them first, before each mount: - `adopt-mount-occupied`: the assembly's index already holds the path, a file on the way to it, or a case-only twin of it, on every disk. - `adopt-mount-unaddable`: git's own dry run refuses the path, for example beyond a symlink. The remediation names a fresh `--local-remote-dir` and an empty `--work-dir`. With #172 landed (#198), a plan that keeps such a path in the root is refused earlier, at `check`, and at `execute` before any leg exists. This guard is the defence behind that refusal, and its own refusals are tested in-process past it. Reviewed adversarially and re-verified, and by lane openRepoShape-2 (mergeable with nits). CI is green on Linux, macOS and Windows. Closes #174 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…unted-gitlinks, so the fail-closed root gitlink check is tested on the main it will land on No conflicts: git merged adopt-project.py, scripts/shape_materialize.py and the three test files #198 touches without a conflicting hunk. #198 edits the plan side (`_leg_findings`, `_entry_findings`, `_refuse_what_check_finds` and the leg-path collision lists); this branch edits the verification side (`_land_the_root_tree`, `_root_gitlink_finding`, the two exit texts) and two comments, so no hunk touches both. Checked by hand for a conflict git cannot see: - `_leg_findings(plan, tree)` keeps `tree` as a required argument, and its one caller, `_entry_findings`, passes the source tree. - `_refuse_what_check_finds` is still the one plan gate in `cmd_execute` before the legs are made, so the fail-closed e2e, which takes that gate away, still reaches `_verify`. - The exit texts of `adopt-unexpected-gitlink`, `adopt-mount-missing` and `adopt-root-submodule` stay true: #198 adds `plan-leg-path-collides` to what `execute` refuses before any leg exists and removes no refusal they name. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-failure-notice One conflict, in adopt-project.py, on the `from shape_materialize import` block. This branch had dropped `RULESET_HINT` from it (c77cef0: an adoption prints its own `ADOPT_RULESET_HINT`, and nothing in adopt-project.py uses the scaffold's any more). Main had added `assembly_root_paths` and re-flowed the lines. The resolution keeps both changes: `RULESET_HINT` is not imported, and `assembly_root_paths` is. Nothing in the merged adopt-project.py names `RULESET_HINT` outside a comment. Everything else merged cleanly. `_leg_findings(plan, tree)` and `_entry_findings` are as #198 left them, with `tree` passed. The only unused import is `COMMIT_RE`, which is unused on main as well. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…findings` hands `_leg_findings` the tree #198 requires and still ends with the root-symlink findings, so `check` and `execute` report both from one list #198 (#172 + #191) made `_leg_findings(plan, tree)` take the source tree as a REQUIRED argument, and added `assembly_root_paths()` and `SHAPE_PIN` to the materializer, the same function and constant this branch had added. The merge conflicted in four hunks. Each is resolved keeping both sides: - scripts/shape_materialize.py, `assembly_root_paths()`'s docstring. The body and `SHAPE_PIN` were identical on both sides. The docstring now names both of its readers in adopt-project.py, the mount-path refusal (#172) and `check`'s walk through the symlinks a plan keeps (#178), and both test files that hold the list to an empty-target run. - adopt-project.py, the module docstring's `check` paragraph: #198's mount-path clause inside the parenthesis, then #166's submodule clause, then this branch's symlink clause. - adopt-project.py, the `shape_materialize` import list: this branch's side. It already held `assembly_root_paths`, the one name #198 added, beside `BOOTSTRAP` and `SYMLINK_HOPS`. - adopt-project.py, `_entry_findings`'s docstring: coverage, then each entry's `leg:` and the two mount paths (#198), then the source's own submodules, then the root-symlink findings (this branch). Merged without a conflict, and read after the merge: - `_entry_findings` calls `_leg_findings(plan, tree)` and appends `_root_symlink_findings(plan, source, tree)` after the submodule findings. - `_refuse_what_check_finds` keeps #198's remediation clause ("mount neither leg over a path the assembly root holds") followed by #166's `*remediation`. Its docstring keeps this branch's symlink clause and #198's `plan-leg-path-collides` sentence. - `execute` still runs `_refuse_symlinks_checked_out_as_files` right after `_refuse_what_check_finds`, before any leg. - This branch's own remediation sentences (the `plan-root-symlink` finding's, `adopt-symlinks-off`'s, and the materializer's `UNWRITABLE_REMEDIATION`) are in code #198 did not touch. Where both fire for one plan (`.github -> ci` kept with `ci/` kept and `legs.spec_path: ci`; `.github -> ../outside-ci` with `legs.spec_path: .github`), `check` prints `plan-leg-path-collides` first and `plan-root-symlink` after it. Each sentence is true of the plan as written. `execute` refuses under the first code with all of them, before any leg exists. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…200 merge with no conflict, `_entry_findings` still hands `_leg_findings` the tree, and a symlink the plan keeps and the shape writes through is still refused before any leg, ahead of #200's mount guard This brings in 8df21e6 (#201, for #179) and a5b09c3 (#200, for #174). #201 moved the leg-path rule verbatim from adopt-project.py into scripts/shape_materialize.py, and adopt-project.py now imports it back as one unit. #200 added `_refuse_an_unmountable_path` (`adopt-mount-occupied`, `adopt-mount-unaddable`), which runs before each `git submodule add --force`. There was no conflict. `git merge-tree` and the merge both resolved every file without help. Read after the merge: - `_entry_findings` calls `_leg_findings(plan, tree)`, then appends `_root_symlink_findings(plan, source, tree)` after the submodule findings, as at a61ccbe. - `_PlannedRoot` reads `WINDOWS_ABSOLUTE_RE` and `leg_path_problems`. Both now live in shape_materialize.py and arrive through #201's second import block. The first block keeps this branch's `BOOTSTRAP` and `SYMLINK_HOPS`. - In shape_materialize.py, this branch's block sits before `_materialize` and #201's sits at the end of the file. They share no name. - This branch's diff against main in adopt-project.py and scripts/shape_materialize.py has the same lines after the merge as a61ccbe's diff against 20e13f0. - Every remediation sentence is kept: #198's clause in `_refuse_what_check_finds`, #200's `MOUNT_REMEDIATION`, and this branch's `plan-root-symlink`, `adopt-symlinks-off` and `UNWRITABLE_REMEDIATION`. Which fires first. `execute` refuses `check`'s findings in their order before any leg exists: `plan-leg-path-collides` from `_leg_findings`, then `plan-root-symlink`. `adopt-symlinks-off` comes next, also before any leg. #200's guard comes at the mount, after both legs are pushed, and the materializer's refusals come after that. Four plans are refused by more than one of these: - `.github -> ci`, with `ci/` kept and `spec_path: ci`; - `.github -> ../outside-ci`, with `spec_path: .github`; - `.github -> spec/ci`, with `ci/` kept and `spec_path: ci`; - `.github -> ../outside-ci`, with `spec_path: .github/spec`. For each, `check` lists `plan-leg-path-collides` first and `plan-root-symlink` after it. `execute` refuses under the first code with all of them, before any leg exists. With #198's root-kept half switched off, as #200's tests do, `plan-root-symlink` still refuses three of the four before any leg. #198's shape half refuses the fourth. Only with `check`'s list switched off does #200's guard meet them, after both legs are pushed, and it refuses each by name. Each sentence is true of its plan. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in #198 (20e13f0: #172 + #191, a leg's mount path must not be, hold or lie inside a path the assembly root holds, and `_leg_findings(plan, tree)` takes `tree` with no default), #201 (8df21e6: #179, the leg-path rule moved verbatim from adopt-project.py into scripts/shape_materialize.py, where scaffold-project.py asks it too) and #200 (a5b09c3: #174, the leg mount passes `--force` behind `_refuse_an_unmountable_path`). One merge, no rebase. Six conflicts, all in adopt-project.py: 1. Module docstring, `check`'s list: main's clause (neither equal to, around or inside a path the shape writes into the root, `shape/`, or a source path the plan keeps there), then this branch's (every value `execute` writes into the project's YAML one its loader reads back as that same text, #181), in one sentence. 2. The first `from shape_materialize import`: this branch's `TEMPLATED` and main's `assembly_root_paths`, both, in main's line layout. 3. The #169 section ("A leg's mount path is CANONICAL, or it is refused"): main replaced it with a pointer to `shape_materialize`, where the code now lives, and this branch had edited it in two places. Main's pointer is taken, and both edits are re-applied to the moved code in scripts/shape_materialize.py, unchanged in substance: `NOT_TEXT_KINDS` gains `type(None): "no value at all"` (an explicit null leg path, the reviewer's question on 76a6153), and `leg_path_problem`'s not-text sentence says "a leg path is text: write the path you mean, or remove the key to mount the leg at its role's own name" instead of "so quote it", with the comment saying why. Only a value read out of a plan file reaches that sentence: `plan`'s flags and scaffold-project.py's are always text, so the scaffold prints nothing new. 4. Two new sections inserted at one place after `_plan_leg_paths`: main's "A leg's mount path overlaps nothing the assembly root holds (#172)" first, beside the leg-path helpers it extends, then this branch's "What `execute` writes into the project is read back as written (#181)". Neither section is edited. 5. `_entry_findings`'s docstring: main's "and the two mount paths", then this branch's sentence on the misread findings. 6. `_entry_findings`'s body: main's `_leg_findings(plan, tree)` (#198 made `tree` required; dropping it raises TypeError on every `check` and `execute`), then this branch's `plan-manifest-misread` findings, whose remediation is still printed ahead of the submodule remediation. Outside the conflicts: main's second `from shape_materialize import` also takes `NOT_TEXT_KINDS`, which this branch's `_the_loader_made` reads, and its comment no longer says "`leg_path_problem` is not called here", because this branch's `_plan_fields` calls it. Everything else merged cleanly, tests/test_adopt_leg_paths.py included (main's `_leg_findings(plan, None)` and this branch's not-text test touch different lines). An explicit null leg path never reaches main's collision check or its mount guard: `_leg_findings` asks `_leg_collision_findings` only when `leg_path_problems` found nothing, and None is a `plan-bad-leg-path` there, and `_checked_plan_values` refuses it before `checked_value` and the mount. The resolution adds no line over 79 columns that neither parent has. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, #201, #200 and #173 land beside #190, and `_entry_findings` hands `_leg_findings` the tree while still returning #190's NOTEs Main moved from e4decfb to 54aa69a: 20e13f0 (#172 via #198), 8df21e6 (#179 via #201), a5b09c3 (#174 via #200) and 54aa69a (#165 via #173). Five conflict hunks, all in adopt-project.py, each a #190 line beside a main line. Each takes BOTH sides, by lane 2's recipe (resolve_m5b_r190d.py, which asserts each hunk's two sides before it writes anything): 1. Module docstring, `check`: #198's mount-path clause ("neither equal to, around or inside a path the shape writes into the root ..."), then #190's "each relative url naming the same repository from the leg as from the source". 2. The `repo_shape` import list: main's names, which since #201 leave out `SAFE_ARG_RE` (its one user moved to scripts/shape_materialize.py, and #190 adds none), plus #190's `redacted, remote_key, remote_local_path`. 3. `_entry_findings` docstring, first paragraph: #190's "and the NOTEs it prints beside them" with #198's "and the two mount paths". 4. `_entry_findings` docstring, ONE LIST paragraph: #190's "but in the one place a remote decides it" sentence, then #198's paragraph on why `_leg_findings` is handed the tree. 5. `_entry_findings` body: #198's `_leg_findings(plan, tree)` with #190's three-tuple from `_submodule_findings(plan, source, tree, local_remote_dir)`. This branch's `_leg_findings(plan)` alone is a TypeError on every `check` and `execute`, because #198's `tree` has no default; main's two-tuple alone breaks `check`'s three-way unpack and drops #190 from `execute`. #173's verification (only the two leg mounts passed over; `adopt-root-submodule`, `adopt-unexpected-gitlink`, `adopt-mount-missing`) merges with no conflict: #190 does not touch `_verify`, and a relative url it lets through is the source's `.gitmodules` byte for byte. tests/test_adopt_submodules.py merges with no conflict: #173's `MOVED` and its root-tree test beside #190's absolute default url. #190's added and removed lines against 54aa69a are its lines against e4decfb, but for the reflowed docstring lines of hunks 1 and 3. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cord-submodule-placement Brings in 20e13f0 (#172 via #198), 8df21e6 (#179 via #201), a5b09c3 (#174 via #200) and 54aa69a (#165 via #173) on top of e4decfb. No rebase. Conflicts, and how each was resolved: - adopt-project.py, the module docstring's `execute` paragraph (textual). #173 ended the VERIFIES sentence with "and that the root's only submodules are the two leg mounts"; #189 added the sentence saying the split's `project.yaml` records each kept submodule's leg under `submodules:`. Kept both: main's clause closes the sentence, #189's sentence follows it. The docstring is not part of docs/cli.md (`render-cli-reference.py --check`: ok). - tests/test_shape_doctor.py, `test_a_submodule_in_the_other_leg_from_its_record_is_misplaced` (semantic; the text merged cleanly). #198 made `_leg_findings(plan, tree)` take `tree` with no default, on purpose (tests/test_adopt_leg_path_collisions.py, `test_leg_findings_takes_no_default_tree`), and this branch's test called it with one argument, so it died with `TypeError: _leg_findings() missing 1 required positional argument: 'tree'`. It now passes `None`, as main's other placement-plan callers do: a placement plan has no source tree. This is P2-1 of lane openRepoShape-2's review of e167d8b. `_leg_findings(plan, tree)` is main's, unchanged. `_commit_the_split` auto-merged with the record's `append` intact. #189's 16 tests (36 items) pass on this merge. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erification merges with no conflict, and `_entry_findings` still hands `_leg_findings` the tree and ends with the root-symlink findings 54aa69a is #165 (#173): `_verify` passes over the two leg mounts and no other gitlink, so a submodule the source keeps in the root is `adopt-root-submodule`, any other root gitlink `adopt-unexpected-gitlink`, one in a leg AND the root `adopt-duplicated`, and a missing mount `adopt-mount-missing`. Conflicts: none. `git merge-tree --write-tree HEAD origin/main` gave tree 02f87a1 with no conflicted file, and `git merge --no-ff --no-commit` staged the same tree: adopt-project.py, tests/test_adopt_submodules.py and tests/test_adopt_verify.py (new). Checked on the staged merge: - `_entry_findings` still calls `_leg_findings(plan, tree)` (#198's required argument), then appends `_root_symlink_findings(plan, source, tree)` last, after the submodule findings. - tests/test_adopt_root_symlinks.py and tests/test_adopt_verify.py: 74 passed. test_adopt_verify.py switches `_refuse_what_check_finds` off with `lambda *_: None`, so it takes whatever `execute` passes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hat `place` will find, so `CLAUDE.md -> /home/me/CLAUDE.md` adopts beside it as on main while one to nothing there is refused before any leg, and a link that leads the shape's copy onto something already there, or a case twin, is refused too (#183, #178) The review of 04792d2 found the walker refusing plans main adopts, and passing plans main breaks after both legs exist. This answers each item. B1. A link AT a path the shape writes is decided by what the materializer will do with it. `place` asks whether something is already at the path, following every link on the way. Where something is, it writes the shape's copy beside it under `shape/` and never writes through the link; where nothing is, it writes through. `_PlannedRoot` now simulates `place` in `assembly_root_paths()` order. The simulation holds what the shape has written by then, `.gitmodules`, and what each mounted leg will hold: the paths the plan sends to it, or the seeded template, read through the new `template_files`, which `copy_tree` now uses too. A destination outside the assembly is asked of this machine's disk: an absolute target as it stands, and a `..` climb from the work directory, where `execute` makes the assembly's clone. A climb that comes back into the assembly by its own name goes on inside. A climb into a leg's clone or path list is refused, because `execute` makes those only after this check. `check` and `execute` each ask their own disk, `execute` before any leg exists. So `CLAUDE.md -> <abs>/CLAUDE.md` adopts, verified and bootstrapped, when the file is there, and is refused ("..., and nothing is there") when it is not; a two-link chain to an absolute target behaves the same. A link ABOVE a path the shape writes is a directory the shape writes into, so it must still lead to a directory the root holds. B2. The shape's copy under `shape/` is written without asking again. So a link that leads a copy onto something already there is refused: `shape -> .` would write over the source's README.md, and a copy that lands on a directory raised IsADirectoryError. `shape -> vendor`, where vendor/ holds none of the copies' names (R7), is still adopted, as on main. The materializer refuses the same landing, for a caller that skipped `check`. S1. The paths are followed twice, keeping case and then folding it. A finding only the folded walk makes carries #198's CASE_ASIDE. So `.GitHub -> ../outside-ci` is refused like `.github -> ../outside-ci`, on every disk, as #169, #198 and #200 refuse their twins. `adopt-symlinks-off` names a case twin with the same aside. S2. The materializer takes `..`, `.` and an empty part of a link's target only from a directory that is there, as `open()` does. So `Makefile -> ci/`, `a/..` and `README.md/..` are named `materialize-blocked` refusals, where main raised IsADirectoryError, FileNotFoundError and NotADirectoryError. A link whose target is empty is a refusal of its own, not `.`. NITs: - N6: findings spell links and targets with `_spelled`. - N4: `_git_path` decodes a target. - N3: no `" and "` literal. - N5: the test's unused `source` is gone. - N1: `UNWRITABLE_REMEDIATION` names the work directory as #200's does. - N9: the `WINDOWS_ABSOLUTE_RE` comment names `_PlannedRoot`. - N10: a link with an empty target is a finding of its own, to be fixed in the source. Linux cannot hold one, and both of `execute`'s clones of the source check it out, wherever the plan sends it. tests/test_adopt_root_symlinks.py goes from 58 to 94 tests. Every old name is kept, with its wording moved to the new form, and the new ones cover: - B1 both ways (a direct link and a two-link chain), `execute` asking its own disk, a climb into the work directory both ways, into a leg's clone, and back by the assembly's name; - the shape's own earlier writes, and leg mounts (holding, lacking, seeded, onto the mount); - B2 (four cases), S1 (at, above, inside, and with symlinks off); - spelled non-UTF-8 and newline targets, and the empty target in `check` and in the materializer; - S2's three shapes, and the copy onto a file and into a directory; - the end to end of B1: verified, the split keeps the link, recursive clone and bootstrap. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, #208, #197, #202 and #194's scaffold half merge with two hunks kept on both sides, `_entry_findings` still hands `_leg_findings` the tree, and the walker says #198's case aside through #197's one phrase origin/main moved 54aa69a -> 39ac59c: 4835fb4 (#199), 404760f (#213), e7d1720 (#208), b538015 (#197), 150c41d (#202), 39ac59c. Conflicts, each resolved by keeping both sides: - adopt-project.py, the `shape_materialize` import list. This branch adds BOOTSTRAP, SYMLINK_HOPS and template_files; #199 adds write_paths_listing. The resolution is the union. - scripts/shape_materialize.py, `assembly_root_paths()`'s docstring. #197 rewrote it for `neutral_pin_path` and the scaffold's refusal; this branch had added that `adopt-project.py check` follows each path through the symlinks a plan keeps (#178), and its test file. The resolution keeps #197's text and adds both of those. Found after the textual merge, and fixed here so that no commit is broken: #197 moved #198's CASE_ASIDE out of adopt-project.py into shape_materialize.py. Its test_both_tools_ask_the_one_definition asserts that adopt has no CASE_ASIDE attribute: no phrase of its own. This branch's walker says that aside in two places (`_root_symlink_findings` and `_refuse_symlinks_checked_out_as_files`). The plain merge left both names unbound, a NameError for every case-twin finding and every symlinks-off walk. They now read shape_materialize's phrase, imported as `_CASE_ASIDE`, as #197's own import block names `_overlap` and `_first_and_more`. Checked on the merged tree: - `_entry_findings` still calls `_leg_findings(plan, tree)` and ends with `_root_symlink_findings(plan, source, tree)`. - No name in adopt-project.py or scripts/shape_materialize.py is loaded but bound nowhere (AST). Every line over 79 columns is main's own. - Both sides are intact by +/- line sets. This branch's diff against main is the same as before the merge, and so is main's diff against this branch, apart from the two hunks above and the import. - The same resolution, rehearsed in a scratch clone (tree e914b55, the same tree as this commit's), passed tests/test_adopt_root_symlinks.py, test_adopt_leg_path_collisions.py, test_adopt_plan_escapes.py, test_adopt_verify.py, test_scaffold_leg_path_collisions.py and test_repo_hygiene.py: 418 passed. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, #238, #196, #254, #242 and #262/#263 merge with three adopt-project.py hunks kept on both sides, and #262's `_CASE_ASIDE` import kept as the name's one binding origin/main moved b30595c -> 71b58a1: - be2790e (#204 via #227), update-shape.py; - 6d8d88b (#203 via #236), family.py; - ede15ce (#238 via #287), shape-doctor.py; - 6f45bf9 (#196 via #231): adopt-project.py `entry_path_problem`, scripts/shape_materialize.py; - b421e6b (#254 via #281): scripts/shape_materialize.py, bump-leg.py, update-shape.py; - c0ed615 (#242 via #308), family.py; - 71b58a1 (#262 and #263 via #313): adopt-project.py `_root_shape_findings` and scripts/shape_materialize.py `copy_in_the_way`. It fixes what this branch's pull request listed as follow-ups (i) and (ii): a source's own `shape/` where the shape writes its copy, and a plain FILE where the shape needs a directory. Conflicts, all in adopt-project.py, each resolved by keeping both sides: - The module docstring's `check` paragraph. 71b58a1 adds "no path kept in the root where the shape writes ..." before the submodule clause, and this branch adds the symlink clause after it. Both are kept, in that order. - `_entry_findings`' docstring. 6f45bf9 and 71b58a1 give the order "each entry's path, then coverage, then each entry's `leg:`, the two mount paths and what the root keeps where the shape writes, then the source's own submodules". This branch adds "then each symlink the plan keeps in the root that a shape file cannot be written through". - `_entry_findings`' return line. 6f45bf9 returns `unsafe_remediation + remediation`, and this branch appends `_root_symlink_findings(plan, source, tree)` to the findings. The merge returns both. Found after the textual merge, and resolved here so that no commit binds a name twice: 71b58a1 (through 65a9262) imports #198's phrase as `_CASE_ASIDE` in the "#172's shape half" import block, and b37159a had imported it on a line of its own. Main's import is kept; this branch's line and its five-line comment go. scripts/shape_materialize.py merges with no conflict. `place` gets 71b58a1's `copy_in_the_way` inside its collision block and this branch's `_refuse_unwritable` after it, as 71b58a1's message foresaw. Checked on the merged tree: - `_entry_findings` still hands `_leg_findings` the tree, and the symlink findings still come last in its list. - AST: no top-level name is bound twice in adopt-project.py, scaffold-project.py, scripts/repo_shape.py or scripts/shape_materialize.py, and none is loaded but bound nowhere. Main changed the signature of no function this branch calls. - Both sides are intact by +/- line sets, apart from the three hunks and the import above. The next two commits fix what this merge breaks, each with a revert line. #262's rule and this branch's both name a symlink kept AT the copy under `shape/`. And where the shape's copy lands is now `copy_in_the_way`'s question, asked before this branch's own check of it. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Lane: openreposhape-1 (openRepoShape-1)
Claim: #172 (comment)
Claim: #191 (comment)
What
A leg's mount path is refused when it EQUALS, CONTAINS or LIES INSIDE, whatever the case:
assembly_root_paths()inscripts/shape_materialize.py. It is built from the sameTEMPLATED,COPIED_VERBATIMandCOPIED_FROM_SHAPElistsmaterialize_assembly_roothands_materialize, plus the shape pin it renders last (SHAPE_PIN, named there; adopt-project.py keeps adopt-project.py_commit_the_splitstages withgit add -A -- ., so a source.gitignoreof.*silently drops.gitattributesandvalidate.ymlfrom the split,executestill saysadoption verified, and the assembly fails its first bootstrap #167's ownSHAPE_PIN, and a test holds the two to one spelling), so nobody keeps a second list.plan's collision follow-ups read the same list. It covers every root FILE the shape writes (project.yaml,AGENTS-shape.md,README.md,.gitattributes,Makefile, ...), the directories they live in (contracts,scripts,.github), andshape/, whereexecutewrites its copy of a file the root already holds.shape/is reserved for those copies, so a mount at or under it is refused even where the source needs no copy, and the finding and the remediation say so. A test materializes into an empty directory and checks that the list is exactly what was written, in order.leg: rootentry covers, including a file, symlink or submodule on the way to the mount.Where it is asked:
planREFUSED adopt-leg-path-collides, exit 2, no plan file, after #169's spelling checkNOTEfor eachleg: rootentryplanwrote itself, incheck's words; exit 0 and the plan is written, because the answer is the person's to changecheckFINDING plan-leg-path-collides, exit 1, from_leg_findingsSource.tree()that_entry_findingshands_leg_findings(a required argument)execute_refuse_what_check_finds, which reads #166's_entry_findingsascheckdoes, before any leg repository existsA finding names the leg, the path and what it overlaps, and says so when the overlap holds only once case is ignored:
The collision question is asked only when both mount paths are canonical, the same way #169 compares the two legs. So
shape/stays #169'splan-bad-leg-path(compared as written, it would read as "insideshape"), and a number is never compared. The new code lives in its own functions (leg_path_collisions,_overlap,_shape_collisions,_kept_collisions,_kept_in_root,_leg_collision_findings,_kept_collision_notes,_flag_leg_paths)._leg_findings,_checked_plan_inputsand_print_plan_reportcall them, and #169'sleg_path_problem(s),_leg_path_reason,_canonical_spellingandLEG_PATH_REMEDIATIONare not edited, so #179's move of those intoscripts/repo_shape.pystays mechanical.One reading differs from the issue's wording. The root-kept half compares against the source PATHS a
leg: rootentry covers, not against a directory entry's own path.docs/specwithdocs/kept is refused where the source holds something at or underdocs/spec. Wheredocs/holds nothing there, it is not refused, because that layout already works onmain:adoption verified, the recursive clone succeeds andbootstrap ok. With this branch the layout is byte for byte as it is onmain(below).Why (repro on
mainf25d805, local remotes)On this branch every row above is refused: by
planfor the shape rows, and bycheckandexecutefor the root-kept rows, the case-only one included (re-run withcore.ignorecase=trueon 4868074).--local-remote-dirnever gets a repository.Tests
tests/test_adopt_leg_path_collisions.py, 92 tests (81 at4868074, 11 from the merge round):written == assembly_root_paths()), and every path on it is refused as a mount;planandcheckforcontracts,scripts,.github,.github/workflows,project.yaml,AGENTS-shape.md,.gitattributes,contracts/shape-pin.yaml,Makefile/code,shapeandshape/spec. Atexecuteit is tested forcontracts,scripts,.github,project.yamlandshape. Three case-only spellings (Contracts,PROJECT.YAML,Shape) say they overlap only once case is ignored;legs/.github,scripts/spec,Scripts/x,shapes,shape-xandproject.legs/.githubneither contains nor lies inside.github, because the shape writes.github/at the ROOT; it also plans, andchecksplan ok;checkandexecute: a kept directory, a source path inside a kept directory (docs/spec), a kept file at the mount and before it, and a case-only twin. Atcheckonly: a kept symlink and a kept submodule before the mount, and.specify/, whichplanitself keeps in the root.docs/specunder a keptdocs/that holds nothing there passescheck;--spec-path spec/, so the mount and its.gitmodulesregistration disagree andmainstill saysadoption verified#169's finding comes first and alone:shape/atplan;shape/and a number atcheck;_leg_findingsreads the tree it is given, raises with none, and raises onNonebeside alegs:mapping (canonical or not);plan --spec-path .specifynotes the collision, exits 0, writes the plan, and the note ischeck's finding with--spec-pathforlegs.spec_path; the defaults and.specify/specnote nothing, nor does a.specify/asked about for a submodule it holds;--spec-path shape/xis still refused, and its finding and remediation both sayshape/is reserved;planpredicts a collision for every path the shape writes, the shape pin included; adopt'sSHAPE_PINequals the materializer's;needs_filter_repo):spec_path: contractsandcode_path: project.yamledited into a plancheckonce passed are refused, and the EMPTY--local-remote-dirstays empty. A keptdocs/is refused where it holdsdocs/spec/overview.mdand adopted with the leg atdocs/specwhere it does not.Revert table at
4868074. Each mutation was applied to a fresh clone ofmainwith this branch's three files laid over it, and the new file was run. M0 (no mutation): 81 passed. Every test fails under at least one row.main'sadopt-project.pyandshape_materialize.py)plan's refusal_leg_findingsno longer asks (checkandexecute)shape//segment boundary (shapeswould overlapshape)assembly_root_pathswithout the shape pinexecutereads no source treecheckreads no source treeexecute's remediation sentenceplanThe three tests M1 leaves passing are the #169-first tests:
mainasks no collision question, so they pass there trivially. Each fails when its own piece is reverted (M4: bothbad_leg_path_is_reported_and_not_also_as_a_collisioncases; M17:plan_refuses_a_bad_spelling_before_it_asks_about_collisions). The 14 "collides with nothing" cases fail under M1 (the function is gone) and under M19, and five of them under M9 and four under M18.Unchanged from
main, byte for byte (measured at4868074againstf25d805). One source with fixed dates, run bymainand by this branch at the same paths: the defaultsspec/code, nestedlegs/spec+legs/code, anddocs/specunder a keptdocs/that holds nothing there. The plan file,plan's output,check's output (plan ok),execute's output (exit 0,adoption verified), the split commit'sls-tree -r, the split commit sha and both leg heads are IDENTICAL in all three. Re-measured after the merge round forplan(exit code, stdout, stderr, plan file) andcheck(exit code, stdout, stderr) againstmaine4decfbat the same paths: IDENTICAL in all three,checkexit 0 on both.executewas not re-run for that comparison.Targeted run at
163173e,tests/test_adopt_leg_path_collisions.py tests/test_adopt_leg_paths.py tests/test_adopt_submodules.py tests/test_adopt_plan.py tests/test_adopt_e2e.py tests/test_adopt_execute_refusals.py tests/test_shape_doctor.py tests/test_windows_paths.py tests/test_cli_reference.py:SHAPE_MEDXEHR_CLONEunset), 551sneeds_filter_repo, 1 MedxEHR), 498sdocs/cli.mdis generated, andrender-cli-reference.py --checksays[ok]: the module docstring lines this edits are in no--help.Not in this PR (probed, as asked):
scaffold-project.pyhas the same bug, but it fails loudly where adopt failed silently. With--spec-path contracts(and--code-path project.yaml),--dry-runexits 0. The real run, into local remotes, creates all three repositories, pushes both legs tomain, leaves the assembly root empty, and exits 2 atgit submodule add:fatal: 'contracts' already exists and is not a valid git repo(forproject.yaml:destination path '.../project.yaml' already exists and is not an empty directory). Against GitHub that is three created repositories.leg_path_collisionstakes(what, value)pairs and needs only the shape list, so the scaffold can ask it once #179 has moved #169's helpers.Review
Lane openRepoShape-2 reviewed this branch at
4868074and found it mergeable with nits: no P1 or P2, and three P3s (#172 (comment)). That review also found this branch closes #191 in full. A root-kept submodule, directory or file at a mount path, a file or symlink above one, and the case twins all getcheck1 andexecute2 before any leg exists.Merge round, after #166 landed on
mainase4decfb(PR #194). Five commits on top of4868074:96999f5mergesorigin/maine4decfb. It conflicted in 5 hunks ofadopt-project.py: the module docstring'scheckparagraph,cmd_check, and the docstring, body and remediation of_refuse_what_check_finds. They are resolved keeping both sides.checkandexecuteread adopt-project.py: a plan that sends.gitmodulesto one leg and a submodule it registers to another passescheckandexecute, saysadoption verified, and the assembly's recursive clone then fails:planshould ask,checkshould find,executeshould refuse #166's_entry_findingsand nothing else. The remediation is main's two-part form with this branch's clause kept ("answer each entry'sleg:, cover every source path exactly once, and mount neither leg over a path the assembly root holds"), then adopt-project.py: a plan that sends.gitmodulesto one leg and a submodule it registers to another passescheckandexecute, saysadoption verified, and the assembly's recursive clone then fails:planshould ask,checkshould find,executeshould refuse #166's submodule remediation. Both docstrings keep both clauses. The line no hunk contains,_entry_findingscalling_leg_findings(plan), now passes the source tree. On the merge commit with only that argument removed, the new test file gives 15 failed, 66 passed: the kept-root half (adopt-project.py: a source entry the plan keeps at the root at a leg mount path (a submodule, directory or file namedspecorcode) passescheckasplan okand dies at the mount after both leg remotes are pushed, so the re-run meetsleg-remote-exists#191) is off. (The merge message says 16. That is the review's count for a merge that took every hunk from main, which also loses the remediation clause.014aeef's message corrects it.)014aeef(P3-1):_leg_findings(plan, tree)takes no default fortree. A lost argument is now aTypeError.Nonemeans there is no source tree. That is true only of the doctor's placement plan, whoselegs:is a list with no mount path. The tests that hand one toPlanand_leg_findings(tests/test_shape_doctor.py×3,tests/test_adopt_leg_paths.py×2) now passNone. Beside alegs:mapping,Noneraises too, rather than reading as a source that keeps nothing in the root._entry_findingsis the only caller outside the tests, andshape-doctor.pynever calls_leg_findings. At the head, the merge hazard removed again gives 65 failures, eachTypeError: _leg_findings() missing 1 required positional argument: 'tree', where the merge commit had 15 quiet ones.54605e1(P3-2):plannotes a leg path that overlaps aleg: rootentry it wrote itself. It usescheck's sentence and changes no exit code:.gitmodulesto one leg and a submodule it registers to another passescheckandexecute, saysadoption verified, and the assembly's recursive clone then fails:planshould ask,checkshould find,executeshould refuse #166,leg: null) keeps nothing in the root, andcheckfindsplan-unresolvedthere, so it is not noted._flag_leg_pathsnow names--spec-pathand--code-pathbeside their values once, which cuts each literal from three spellings to two.11bec28(P3-3):shape/is reserved. The policy is unchanged:--spec-path shape/xis still refused. The finding andLEG_COLLISION_REMEDIATIONnow both give the reason, from one constant:`shape/` is reserved for the shape's own copies of files the root already holds. So no leg is mounted at or under it, even where this source needs no copy.163173e(nit):_predict_collisionsreadsassembly_root_paths(). Its own list lacked the shape pin, whichexecutewrites beside a kept one and names in the split commit. Under the default path policy,contracts/**goes to the spec leg, so no plan the rules alone write changes. adopt-project.py'sSHAPE_PINis not unified with the materializer's. Doing that means deleting adopt-project.py_commit_the_splitstages withgit add -A -- ., so a source.gitignoreof.*silently drops.gitattributesandvalidate.ymlfrom the split,executestill saysadoption verified, and the assembly fails its first bootstrap #167's lines (the constant and its comment), not only editing an import, so a test holds the two to one spelling instead.Revert table for the round, at
163173e. Each row reverts one change in its own clone and runstests/test_adopt_leg_path_collisions.py(92 tests) unless a file is named. M0: 92 passed._leg_findings(plan, tree)in_entry_findingstest_adopt_execute_refusals.py), allTypeError*remediation(#166's submodule remedy),test_adopt_submodules.pytree = ()default restoredNonebeside a mapping no longer raises4868074'sshape/finding back to4868074'sshapealone_predict_collisionsback on its own listSHAPE_PINrespelledFor the next merge.
fix/adopt-root-kept-symlinks(#183,7b5af45) also extends_entry_findings, and its line is still_leg_findings(plan).git merge-treeof it against this head conflicts inadopt-project.pyandscripts/shape_materialize.py. Whichever lands second must keeptree. A resolution that drops it now raises on everycheckandexecute, instead of quietly letting a mount over a kept source path through.Closes #172
Closes #191
🤖 Generated with Claude Code