Skip to content

adopt-project.py: a non-default --spec-path or --code-path is ignored by the adopted Makefile's CONTRACTS_DIR and by the cross-leg follow-up path #522

Closed

Description

@brettheap

Both render a leg's path as if it were the default, so a project that mounts a leg elsewhere gets a wrong CONTRACTS_DIR and a wrong relative path. Brett Heap ruled on 2026-10-14 that this stays P2: a non-default leg path is documented only in docs/cli.md.

From the v1.1.0 triage of the v1.0.0 known limits on #457. One pull request covers the lines below.

Lines

  • The adopted root's Makefile hard-codes CONTRACTS_DIR ?= $(CURDIR)/spec/contracts even when --spec-path mounts the spec leg elsewhere. Where: scripts/shape_materialize.py ADOPT_MAKEFILE_BLOCK. Effort S; all. On main 3121945: shape_materialize.py:761 is still the literal spec/contracts, while the follow-up (adopt-project.py:1666) names {spec_path}. (source)
  • auA-13: with a nested --code-path, the cross-leg follow-up gives ../<spec_path>/… relative to <code_path>/, which is wrong. Where: adopt-project.py:1626. Effort S; all. On main 3121945: adopt-project.py:1626 still builds ../{spec_path}/{named} with a single ... (source)

Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.

The lines as written on the tracking issues

The adopted root's Makefile always exports CONTRACTS_DIR ?= $(CURDIR)/spec/contracts, because ADOPT_MAKEFILE_BLOCK hard-codes it (scripts/shape_materialize.py:709, main ec4a7a0). That happens even when plan --spec-path <other> mounts the spec leg elsewhere, and plan's own follow-up text says the Makefile wires $(CURDIR)/<spec path>/… (adopt-project.py:1356). So the code leg's tooling is pointed at a directory that does not exist. Direction: render the block with the plan's spec path.
— #457, comment

auA-13, the half the CONTRACTS_DIR item above does not cover: with a nested --code-path, the cross-leg follow-up gives ../<spec_path>/<dir> "relative to <code_path>/" (scripts/shape_materialize.py:1323-1326), which is wrong. A probe with --spec-path legs/spec --code-path legs/code prints ../legs/spec/contracts/, where ../spec/contracts/ is right.
— #457, comment

Activity

  1. added this to the v1.1.0 milestone on Oct 14, 2026
  2. brettheap commented on Oct 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-14T22:32:05Z, for #522

    Logged in lanes/log/openRepoShape-2.md at e314cb5cb160d2312f1b4ca6eebe59e7f40b8452.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#522:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#522"`, kept where the row or its body names `#522`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `522` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions