Skip to content

adopt-project.py execute: each leg repository is asked about only as it is made, so a code leg whose name is taken leaves the spec leg created, on GitHub as under --local-remote-dir, and a --local-remote-dir that is a file or cannot be written ends in a traceback after check said plan ok #798

Closed

Description

@brettheap

Goal: execute asks about both leg repositories, and about where they go, before it makes either, and check asks the same. So a taken name, or a --local-remote-dir that cannot hold them, is refused with nothing made.

Filed by lane openRepoShape-1 from #457's lines L1-72 and L1-73 (#457, comment) on Brett Heap's word of 2026-10-17T10:21:32Z, under lane 3's v1.1.1 rule (#473, issuecomment-6216697223). Each line was measured again on main bf1f099b with a stub gh.

Milestone: v1.1.1. On GitHub, an organisation that already holds <P>-code gets a stray private <P>-spec. Removing it needs the delete_repo scope. #188's N4 gave this case a notice; nothing prevents it.

Lines

  • L1-73, local run: the code leg's bare repository already exists. With <lrd>/Atlas-code.git there, check --local-remote-dir <lrd> says plan ok. execute then gives REFUSED creating the code leg repository. leg-remote-exists: …/Atlas-code.git already exists, exit 2, after Atlas-spec.git was made.
  • L1-73, GitHub run: the code leg's name is taken. This was simulated with a gh stub that logs every call and answers the code create with GitHub's Name already exists on this account (createRepository).
    • The only gh calls were gh repo create acme/Atlas-spec --private …, then gh repo create acme/Atlas-code --private ….
    • The run ended NOTHING has been rolled back: \https://github.com/acme/Atlas-spec.git\` exists`.
  • L1-72: an unusable --local-remote-dir. check --local-remote-dir says plan ok in all three of these cases:
    • a file at the path: execute exits 1 with a FileExistsError traceback at _create_leg_remotes;
    • a path under a parent this user cannot write in: a PermissionError traceback;
    • an existing directory this user cannot write in: REFUSED a git or gh command failed … git init -q --bare … Permission denied, exit 2.

Direction

Tests: extend tests/test_adopt_execute_refusals.py and tests/test_adopt_late_failure.py.

  • With <P>-code.git already there, the run is refused and no <P>-spec.git is made.
  • A file, a path under an unwritable parent, and an unwritable directory as --local-remote-dir each give exit 2 with no traceback.
  • When a gh stub's repo view finds <P>-code, there is no repo create call.
  • check names each case.

Overlaps: #417's check --local-remote-dir, which landed as #718.

Lane: openreposhape-1 (openRepoShape-1)

🤖 Generated with Claude Code

Activity

  1. added this to the v1.1.1 milestone on Oct 17, 2026
  2. brettheap commented on Oct 17, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-17T10:44:35Z, for #798

    Logged in lanes/log/openRepoShape-1.md at 92217f6f4d18823177b38b30dd91961acd9a33e5.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#798:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#798"`, kept where the row or its body names `#798`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `798` 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