Skip to content

adopt-project.py: plan and check take a Windows device name (--project NUL, Con) that the scaffold and family.py init now refuse #1014

Closed

Description

@brettheap

Goal: adopt-project.py plan refuses a --project that no Windows disk can make a folder of (NUL, Con, com1, Lpt9 and the rest, in any case) and check finds it in a plan's project:, each by the one function family.py init and the scaffold already ask, and the two small leftovers of #1010's review (one test row, two words) are closed with it.

Filed by lane openRepoShape-3, from RV1010's review of #1010 (SHOULD-1, NIT-1, NIT-2).

State. Read at #1010's head 37b0fc43 (open, a draft; it closes #989). #1010 does not touch adopt-project.py, and the file is the same blob (792a0f56) at that head and at origin/main 7fa60a571, so every adopt line below is the same on main. The function is #1010's: refuse_an_unholdable_name(refusal, flag, name, *, names, remediation) is at scripts/shape_materialize.py:4621 at the head and is not on main yet, so write this against #1010 once it lands.

  • The question. The function asks _unmountable_reason (scripts/shape_materialize.py:4601) of one name: a Windows device name with or without an extension, in any case (CON, Nul, com1, NUL.git), a name ending in a dot or a space, or one of Git's own names. family.py init asks it of --family as family-bad-holder-name (scripts/family.py:1040), and the scaffold asks it of --project as scaffold-bad-project-name (scaffold-project.py:1064, called at :2319 and in _refuse_bad_id's passed-id branch at :993). Each tool gives its own code, its flag, what the name names, and its remedy.
  • plan never asks it of --project. The value goes through checked_value("--project", ...) (adopt-project.py:4901), and the names it makes are judged by the naming policy alone, after the source is read (_check_names, :4839). The one Windows question plan asks is of the two leg PATHS (_refuse_bad_leg_paths("adopt-bad-leg-path", ...), :4921), which reaches _unmountable_reason.
  • check has no --project; it reads the plan's project:. It asks _check_names (:11399) and _held_findings (:12313), the list of what the disk or GitHub will not hold, which execute reads too (family.py init, adopt-project.py check and the --org of all four tools: init sets the xf-project-<id> topic last and asks no GitHub limit, check passes a name execute refuses, and --org my_org.x passes every plan #863): lengths, the organisation, the topic. A name no Windows disk can make is not on it. RENAMES_THE_LEGS (:12309) is the set of codes whose fix renames the legs; after one of them check asks gh nothing about the legs (:11438).

What happens. Measured at 37b0fc43 with a stub gh (exit 97) first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR and GIT_SSH_COMMAND=false, on a one-commit local repository <dir>/src:

adopt-project.py plan --source <dir>/src --project NUL --org acme --elected-by X --out <dir>/plan-NUL.yaml
plan written to <dir>/plan-NUL.yaml
project    NUL (nul) in acme, mode in-place                                     exit 0
--project Con, com1 and Lpt9       the same, exit 0 each, a plan written for each
--project Nullable, Console, Auxo  exit 0 each (the controls: a device name is the whole name)
                                   the stub gh was never called by `plan`, in any of the seven

adopt-project.py check --plan <dir>/plan-NUL.yaml --source <dir>/src --work-dir <dir>/work
  assembly  NUL                          project-leg/assembly
  spec      NUL-spec                     project-leg/spec
  code      NUL-code                     project-leg/code
...
plan ok                                                                         exit 0
                                   the plans of Con, com1 and Lpt9: the same, exit 0 each
                                   the stub gh logged `repo view acme/NUL-spec` and `repo view acme/NUL-code`, the legs

Evidence.

Direction.

Verify.

  • adopt-project.py plan --project with NUL, Con, com1 and Lpt9 each exit 2 with the new code and write no plan; check of a plan whose project: is each of them finds it under the same code (exit 1). Neither makes a gh call, and nothing is made: no plan file, no leg, no clone (check creates a missing --work-dir, empty, before it reads the plan, as at the head). Nullable, Console and Auxo still plan and check (exit 0, plan ok), as at the head.
  • Rows for plan and for check, for each of the seven names, under a stub gh that exits 97 and logs its calls: the four refused with nothing made and an empty log, the three controls taken.
  • The NIT-1 row kills mutant C: it fails with the device question after checked_value("--id"), and passes at the head.
  • tests/test_adopt_leg_paths.py, tests/test_scaffold_device_names.py, tests/test_derived_id_refusals.py, the docs guards (tests/test_agents_md_codes.py, tests/test_cli_reference.py, tests/test_update_add_codes_documented.py, tests/test_repo_hygiene.py), tests/test_shape_doctor.py, tests/test_scaffold_leg_path_collisions.py and tests/test_no_auto_maintenance.py pass, one file at a time under a stub gh.

Size. S: one call in plan, one in check's list, one code, rows for both tools, one test row and two comment wordings.

Lane: openreposhape-3 (openRepoShape-3)

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-20T05:04:30Z, for #1014

    Logged in lanes/log/openRepoShape-3.md at 7cfa23953d077cc00badf0955814820d85859c5c.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1014:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1014"`, kept where the row or its body names `#1014`:
    1010	scaffold-project.py, family.py and shape_materialize.py: the scaffold refuses a --project no Windows disk can make a folder of, by the one question init asks of --family, and the five folder flags' --help say what an empty value and . mean (#989, part of #999)	l3-989-999-scaffold-names-folder-help	MERGED
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1014` 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