Skip to content

scaffold-project.py and family.py init: an empty flag value is read as not given, a passed --id is told to be "explicit lowercase" whatever its fault, and the derived --family remedy leads to naming-not-a-family #911

Closed

Description

@brettheap

Goal: in scaffold-project.py and family.py init, a value passed empty is refused by name, and an id's refusal says what an id may hold, with a refused name refused first.

Filed by lane openRepoShape-3, from its triage of #459 at the v1.1.1 release commit 5017830. It groups #459's lines U156, U157 and U160 (L2-79, L2-80, L2-83), U158 and U159 (L2-81, L2-82) and U162 (L2-85), one pull request's worth. The id sentence is shared with adopt-project.py, whose half is #902.

Empty values read as not given (U156, U157, U160)

State. The values are read by truth, not by is not None:

  • scaffold-project.py:801 is checked_value("--id", args.id or project.lower()), and :802-805 read --name, --elected-on and --reference the same way;
  • scripts/family.py:2226 is args.id or family.lower(), and :2661 and :2668 read --name and --created-on the same way;
  • _elector (scaffold-project.py:762-763) and _creator_name (scripts/family.py:2424-2426) fall back to GIT_AUTHOR_NAME, then git config user.name, when the flag is empty, and _elector_named tests if args.elected_by: (scaffold-project.py:962);
  • the manifest-value label loops test if not given: (scaffold-project.py:747, scripts/family.py:2353 and :3345), so once an empty value is a value the run holds, they would call it "not given".

What happens. Measured at 5017830, from a clone at that commit, with the stub gh, GIT_AUTHOR_NAME=probe, and --local-remote-dir and --work-dir folders added to each command:

scaffold-project.py --org testorg --project NorthWind --id= --dry-run
  exit 0: project      NorthWind (northwind)   topic xf-project-northwind
family.py init --org testorg --family NorthWind --id= --dry-run
  exit 0: family       NorthWind (northwind)
--elected-by ''          exit 0: elected by   probe on 2026-10-18
init --created-by ''     exit 0: created by   probe on 2026-10-18

A script that passes --id "$ID" with ID unset gets a derived id without a word. With no identity at all, the refusal says "no --elected-by" about a flag that was passed. Adopt refuses --id '' since #699, and --tracking-branch '' is already refused by name.

Evidence. The lines and the probe above.

Direction. Read each flag by is not None and refuse an empty passed value by name; move the two if not given: loops with it; one test row per flag.

A passed --id is told "pass an explicit lowercase --id" (U158, U159)

State. PASSED_ID_REMEDIATION = "Remediation: pass an explicit lowercase --id." (scaffold-project.py:834), its twin at scripts/family.py:2096, and adopt's _refuse_bad_id (adopt-project.py:4512). The bad-id check runs before the naming check.

What happens. Measured at 5017830 in the same way:

scaffold-project.py --org testorg --project NorthWind --id foo_bar --dry-run
  REFUSED scaffold-bad-id: --id 'foo_bar' must match ^[a-z0-9][a-z0-9-]*$
  Remediation: pass an explicit lowercase --id.
scaffold-project.py --org testorg --project North_Wind --id north-wind --dry-run
  REFUSED naming-unclassified: 'North_Wind' matches no family in the naming policy. ...

foo_bar is already explicit and lowercase; its fault is the underscore. For --project North_Wind --id north_wind, the remedy's retype then meets naming-unclassified. family.py init prints the same.

Evidence. The lines and the probe above.

Direction. For a passed id, say "lowercase letters, digits and hyphens, starting with a letter or digit", and let the naming refusal speak first when the name itself is refused.

The derived --family remedy and openGlass (U162)

State. DERIVED_FAMILY_ID_REMEDIATION (scripts/family.py:2097-2101) says only "change --family to one CamelCase token with no hyphen, underscore, dot or space"; _classify_family_name refuses any open<Product> or <X>-Install name as naming-not-a-family.

What happens. Measured at 5017830: family.py init --org testorg --family open_glass --dry-run exits 2 with REFUSED family-bad-id: --id (not given, so --family lowercased) is 'open_glass' ... and that remedy. The retype --family openGlass is one CamelCase token and is then refused naming-not-a-family. The second refusal says why, so it costs a run, not a dead end.

Evidence. The line and the probe above.

Direction. Add "and not an open<Product> or <X>-Install name", in naming-not-a-family's words, with one test row at openGlass.

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-18T17:05:06Z, for #911

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

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

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