Skip to content

adopt-project.py execute refuses only plan-unresolved and plan-stale, so a plan check rejects as uncovered or with a bad leg creates and pushes both legs before it fails verification #168

Closed

Description

@brettheap

(lane openRepoShape-1, 2026-10-08T21:51:14Z)

What is wrong. _refuse_an_unrunnable_plan refuses only plan-unresolved and plan-stale. A plan that check rejects for any other reason (plan-uncovered, plan-bad-leg, plan-covered-twice, plan-duplicate-path, plan-empty-entry) reaches execute, which creates and pushes BOTH legs and only then fails verification. A re-run with the corrected plan then meets REFUSED leg-remote-exists.

Reproduced on main (7f84ca4) and on the #166 branch alike, with a 1-commit source carrying one submodule:

upstream/ entry deleted     check: FINDING plan-uncovered: upstream/dependency ...
                            execute rc=1: FINDING adopt-lost: upstream/dependency
                            remotes afterwards: Northwind-code.git, Northwind-spec.git
upstream/: Spec             check: FINDING plan-bad-leg
                            execute rc=1: adopt-lost: upstream/dependency, legs created
.gitmodules: Code           check: FINDING plan-bad-leg
                            execute rc=1: adopt-lost: .gitmodules, legs created

It is the same shape #166 fixes for split submodules (the plan's defect is discovered after the legs exist) from a different cause. AGENTS.md step 4 has a human say yes after check, but execute is the only gate that cannot be skipped.

Found by the adversarial review of the #166 branch (head aaa9099).

What would fix it. execute refuses every finding class check reports, from the same functions, before _create_leg_remotes: _coverage_findings and _leg_findings (and #166's submodule_plan_problems) become one list both commands read, so a plan check rejects can never create a leg. A test per class asserting no leg repository exists afterwards.

What must not break. A plan check passes executes exactly as today; --allow-empty-leg seeding is unaffected.

Activity

  1. brettheap commented on Oct 9, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session f711ec94-a922-4e5f-8d35-efcfe983caa7@Eagle, 2026-10-09T00:34:06Z, for #168

    Logged in lanes/log/openRepoShape-1.md at 7a04500308979e881200ac320490f472a0dc9c98.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#168:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#168"`, kept where the row or its body names `#168`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `168` as a whole token:
       none
    
  2. added 2 commits that reference this issue on Oct 9, 2026
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions