Skip to content

adopt-project.py: a --work-dir that is a file or cannot be made ends plan, check and execute in a traceback, and --help says nothing of --work-dir or of where --org comes from #650

Closed

Description

@brettheap

Lane: openreposhape-1 (openRepoShape-1)

plan, check and execute should refuse a --work-dir that is a file, or that cannot be made, by name and in one place, not end in a traceback. --help should say what --work-dir is and where --org comes from.

From lane 1's triage of 2026-10-15, D2, approved by Brett Heap at 2026-10-16T11:21:17Z ("Approve all (Recommended)"). One pull request covers the lines below.

Parent: #457. Milestone: v1.1.0.

Lands after: #594, which rewrites _work_root and main.

Effort: S. Platform: all.

Lane openRepoShape-1 claims it at filing; see its CLAIMED comment.

Why this is P2. Probed on 396c0ff, before any leg exists:

Read on 7ba64f0: _work_root still ends in a bare mkdir, and cmd_plan, cmd_check and cmd_execute each call it with no handler. #524 (#581) made check and execute refuse an unwritable directory by name. What is left is plan, and a directory that cannot be made.

One pull request covers it:

  • one refusal by name, in all three commands;
  • except (OSError, Refusal) in cmd_check (L1-21);
  • the work-dir question asked before the "is cloned again" NOTE (L1-28);
  • help text for --work-dir and --org (L1-25, L1-49), so docs/cli.md is regenerated once.

Lane 2's L2-55 on #457 (issuecomment-6202569293) sits in the same lines: flag-only refusals asked before _work_root. It could join this issue.

Lines

  • L1-19 (P2): a --work-dir that cannot be made, or is a file, gives a PermissionError or FileExistsError traceback from _work_root's mkdir in plan, check and execute, before any leg. Where: _work_root. On 396c0ff, probed: plan --work-dir <a file> ends in FileExistsError, exit 1. Read again on 7ba64f0: the mkdir is bare, and the three commands call _work_root with no handler. The line measured it on 17dd55c. (source)
  • L1-20 (P2): plan --source <org/repo> with an unwritable --work-dir ends in a PermissionError traceback at source-readonly; check and execute now refuse the same case. On 396c0ff, probed: plan --source acme/Atlas ends in PermissionError, exit 1. The line measured it on 17dd55c. (source)
  • L1-25 (P2): --work-dir has no help text on plan, check or execute, and docs/cli.md does not say where the default lands or that it is removed when empty. On 396c0ff, read: no help=. Read again on 7ba64f0: --work-dir and --org still have no help=. The line saw it on 652b686. (source)

Rides along (backlog; tick it here if the same change covers it)

Each line above is a line of #457's checklist comment (issuecomment-6200110061). Tick it there too when this closes.

The lines as written on the tracking issue

[L1-19] A --work-dir that cannot be made, or is a file, gives a PermissionError or FileExistsError traceback from _work_root's mkdir in plan, check and execute, before any leg. Measured on 17dd55c (repro kept by lane 1). (Found in #581's writer.)

— #457, comment

[L1-20] plan --source <org/repo> with an unwritable --work-dir ends in a PermissionError traceback at source-readonly; check and execute now refuse the same case. Measured on 17dd55c. (Found in #581's writer and review.)

— #457, comment

[L1-25] --work-dir has no help text on plan, check or execute, and docs/cli.md does not say where the default lands or that it is removed when empty. Seen on 652b686. (Found in #594's writer and review.)

— #457, comment

[L1-21] With an unwritable --work-dir and an unopenable --source, check refuses source-unresolvable and execute refuses adopt-work-dir-unwritable. cmd_check converts only OSError, so except (OSError, Refusal): would align them. Measured on 17dd55c (repro kept by lane 1). (Found in #581's review.)

— #457, comment

[L1-28] With #581 merged, an unwritable --work-dir plus a gone recorded clone makes check print the "is cloned again" NOTE and then refuse adopt-work-dir-unwritable, while execute refuses with no NOTE. Probed on 652b686 merged with #581's head edaaae4. (Found in #594's review.)

— #457, comment

[L1-49] AGENTS.md's adoption step and plan --help's --org never say that --org defaults to the organisation of a url origin, or that a path origin needs it. Read at 182389e. (Found in #591's review.)

— #457, comment

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-16T11:37:28Z, for #650

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

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

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