Skip to content

adopt-project.py plan and check: an empty flag or a bare plan value is taken without a word, and the id refusals name what the person did not type #902

Closed

Description

@brettheap

Goal: plan and check refuse an empty or misread value by name or write it as typed, and each id refusal's label and remedy is true for what the person typed.

Filed by lane openRepoShape-3, from its triage of #457 at the v1.1.1 release commit 5017830. It groups #457's lines L1-K3, L2-86, L2-87, L2-88, L2-89, L2-90 and L1-49, one pull request's worth.

State at 5017830.

  • checked_value writes text = str(value) (scripts/repo_shape.py:2394). So a hand-edited id: 007, tracking_branch: true or adopt_branch: 007, which the plan's reader reads as a number or a boolean, is written as "7" or "True" with no finding. id: 007 is measured below; the branch cases are L1-K3's measurements on 8beb3d92.
  • --org '' is counted as passed for its label, but org_given = bool(args.org) (adopt-project.py:4626) reads it as not given.
  • args.elected_on = args.elected_on or ... (:4633) and args.reference = args.reference or ... (:4638) take an empty value as not passed.
  • The plan's plan-bad-id names id: whether or not the plan holds one (:5817).
  • _refuse_bad_id (:4485) still says "pass an explicit lowercase --id." for a passed id (:4512), lowercase or not.
  • AGENTS.md's adoption step (AGENTS.md:119-130) never says that --org defaults to the organisation of a url origin, or that a path origin needs it. AGENTS.md is at 494 lines, at its cap.

What happens. Measured on a detached clone at 5017830, with a stub gh (exit 97), GH_TOKEN=bogus, an empty GH_CONFIG_DIR and local remotes.

# L1-K3: id: 007 in the plan
check exit 0
plan ok
execute exit 0
adoption verified: every source path is in exactly one place
project.yaml on the split branch: id: "7"

# L2-86: origin https://example.invalid/~x/Northwind.git
plan --project Northwind:
REFUSED adopt-manifest-invalid: --org (not given, so the organisation of the source's `origin`) is '~x', which the project's own validate-manifest.py refuses: ...
plan --project Northwind --org '':
REFUSED adopt-manifest-invalid: --org is '~x', which the project's own validate-manifest.py refuses: ...

# L2-87
plan --elected-on ''  -> exit 0, elected_on: "2026-10-18"
plan --reference ''   -> exit 0, reference: "openxFactory docs/project-repo-schema.md"

# L2-88: the plan's id: line deleted, legs.assembly: North_Wind
check exit 2
REFUSED plan-bad-id: <plan>: `id:` is 'north_wind' and must match ^[a-z0-9][a-z0-9-]*$
Remediation: fix `id:` in the plan, or re-run `plan` with an explicit lowercase --id. The GitHub topic is derived from it.

# L2-89: in place, origin https://github.com/testorg/North_Wind.git
plan --project North_Wind --id north-wind:
REFUSED naming-unclassified: 'North_Wind' matches no family in the naming policy
Remediation: testorg/North_Wind cannot be adopted in place under that name: ... with its new name as `--project`.
plan --project North_Wind --id north_wind:
REFUSED adopt-bad-id: --id 'north_wind' must match ^[a-z0-9][a-z0-9-]*$
Remediation: pass an explicit lowercase --id.

# L2-90: not in place, the remedy typed as printed
plan --project North_Wind --id north_wind --org testorg:
REFUSED adopt-bad-id: --id 'north_wind' must match ^[a-z0-9][a-z0-9-]*$
Remediation: pass an explicit lowercase --id.
plan --project North_Wind --id north-wind --org testorg:
REFUSED naming-unclassified: 'North_Wind' matches no family in the naming policy
Remediation: --project takes one CamelCase token with no hyphen, underscore, dot or space.

In place, the remedy gives no rule for the new name.

Direction.

  • Have check refuse a number or a boolean where the manifest wants text, saying how it was read; or have execute write what was typed.
  • Read --org, --elected-on and --reference by is not None, and refuse an empty passed value by name, as --tracking-branch '' is refused.
  • Name a missing id: as DERIVED_ID does, and point the remedy at legs.assembly.
  • Hand _rename_first the naming rule from _check_names and from adopt-not-the-source.
  • Let the naming refusal speak before a passed id's. Decide this with Tracking: setup, scaffold, family and the shared helpers, creating projects and families #459's L2-81 and L2-82, which hold the same sentence in the other tools.
  • Say the --org default in AGENTS.md's adoption step, within its line cap.

Size: M.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. added this to the v1.2.0 milestone on Oct 18, 2026
  2. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T19:56:37Z, for #902

    Logged in lanes/log/openRepoShape-3.md at c24b8bc23ba3d345d7b1bc58b18a4786b2ccd2e9.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#902:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#902"`, kept where the row or its body names `#902`:
    972	scaffold-project.py and family.py init: a flag passed empty is refused by name, a passed --id is told what an id may hold once the name passes, and an empty folder this user cannot list is told the permission (#911, #930)	l3-911-930-scaffold-init-flags	OPEN
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `902` 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