Repository navigation
setup-project.py: a refused project name gets one sentence that explains only a leading -, a trailing space passes where a leading one is refused and hides in step (4)'s report, and a name of 101 to 255 characters passes the prompt, to end at step (5) or at GitHub #777
Description
Goal: a project name the prompt or --project refuses is refused in words that name the check it failed, a name no repository can carry is refused before step (4) explains three names it will not use, and a stray trailing space is either taken off or shown.
Filed by lane openRepoShape-5, from the writer's and the reviewer's checklist candidates on #729's PR (#756, head b3c77cc2: w729's "Left out" and rv729's candidates). #729 itself (setup-project.py checks the typed name as --project is) is not reopened; these are what it left. Lines marked "measured" were run here against the validator the tool runs at step (4); the others are read from source, or were measured by the writer or reviewer named.
Lands after: lane 5's #729 (PR #756, fix/729-typed-project-name). It adds ask_for_the_project_name (setup-project.py:1475-1492 at b3c77cc2) and tests/test_setup_project_typed_name.py. Line numbers are at main e3137010 for code #756 does not touch, and at b3c77cc2 for its own.
Lines
-
refuse_valuegives every refusal the same sentence, and the sentence explains only a leading-.setup-project.py:352-364: "<what>is<ascii(value)>, which is not a value this tool will put on agitorghcommand line. git reads its own arguments: a value that starts with-is an option to git, not a name to us; the rest must be spellable as a name, a ref or a path."checked_value(:367-388) refuses four things: an empty value, a leading-, a control character and a value outsideNAME_RE,REF_REorPATH_RE; all four callrefuse_value. So../x,a/band..(the first character must be a letter or a digit, then letters, digits, space and._'()&,+@-, at most 255;NAME_RE,:332), andAtlas,Atlas/and a name with an accented letter, are told about a leading-that none of them has, and are not told what a name holds (w729's first candidate, rv729's second). The sentence is shared by--project, the positional (:531), the prompt (:1492),--org,--elected-by, the refs and the paths (:399,:407,:420,:654). The sibling copy inscripts/repo_shape.py:2243-2249(checked_value, used byscaffold-project.pyandadopt-project.py) prints the pattern: "the rest must match<pattern>". Direction:refuse_valuetakes the reason, and says it: empty; starts with-, which keeps its "git reads its own arguments" sentence; holds a control character; or is outside the pattern, saying the pattern as the sibling does and, for a name, in words (a letter or a digit first, then letters, digits, spaces and._'()&,+@-, at most 255). Keepascii(). Decide whetherrepo_shape.checked_valuechanges with it:tests/test_setup_project_py.py:787saysscaffold-project.py"refuses the same shape in the same words", andrepo_shape.pyis pinned in every project, so a change there is a re-pin. - A name of 101 to 255 characters passes the prompt, and nothing refuses it before step (5) or GitHub.
NAME_REallows 255 ({0,254}after the first character,:332); w729 measured a 101-character name reaching the confirmation in local mode. Step (5) refuses a name whose<Project>-specis more than 255 bytes asscaffold-name-too-long(scripts/shape_materialize.py:4826-4857,NAME_MAX; the bare repository's.gitis added under--local-remote-dir), so from 247 characters under--local-remote-dirand from 251 otherwise: that is a disk's limit. GitHub's own limit on a repository name is 100 characters, so with-specand-codeadded a project name over 95 cannot be created. That limit is from GitHub's documentation, not measured here: no lane 5 run creates a real repository, and a probe against a real organisation is lane 1's. Nothing in the estate states a 100 (git grepof README.md, AGENTS.md, the handbook,scaffold-project.py,setup-project.pyandcontracts/finds none). rv729 reproduced a 255-character name ending at step (5) "after printing the family wall three times"; measured here withscripts/validate-repository-naming.py --explainon 255x, then 255A, and the two-specand-codenames: exit 0, 21 lines, noNO FAMILY: it is--explain's ordinary answer for three names it accepts, the full name repeated in each, which step (4) prints before step (5) refuses all three. Direction: a bound for a name whose repositories GitHub will hold, asked before step (4): at the prompt and for--project(NAME_REis shared with the organisation, the id and the display name, so a project-only bound is its own pattern inchecked_value, or a check in the scaffold's plan besidescaffold-name-too-long), and only where a GitHub repository will be made, not under--local-remote-dir. First confirm the number against a realgh(lane 1). - A trailing space passes the check where a leading one is refused, and step (4) hides it. rv729's candidate, measured here:
NAME_REmatchesAtlasand notAtlas(a space is allowed after the first character on purpose, soa bgoes to step (4)). Step (4) then getsAtlas,Atlas -specandAtlas -code:validate-repository-naming.py --explainexits 1 withFINDING naming-unclassified: Atlas , Atlas -spec, Atlas -code, threeNO FAMILYblocks, 27 lines, and the trailing space is nowhere visible. The run ends atdie(...)(setup-project.py:2134-2137at main, exit 1), whileAtlasis refused at once, exit 2. Direction: rv729 and w729 call it a design choice. Eitherask_for_the_project_namestrips what the person typed (typed.strip(), prompt only: an argv value is deliberate, and a prompt answer is where stray spaces come from; it changes setup-project.py: a project name typed at the prompt is checked as--projectis and an empty line says no name was typed, so../x,a/b,..and--helpare refused by name, not by an--idhint, a help page or a probe write (#729) #756's three-spaces test, which expects a refusal), or the finding quotes each name withascii()so the space shows. Pick one and say why.
Not here: a mistyped name ends the run, with no second ask (rv729; unchanged by #756). No prompt of this tool re-asks (ask has three call sites: the offers' yes, the confirmation, and this one), and a re-ask would change the exit codes #756 pins, so it is not a defect and is not a line.
Verify: tests/test_setup_project_typed_name.py (new in #756; its refusal assertion is project name is <ascii(value)>, which is not a value, :108), tests/test_setup_project_py.py (:803 asserts "git reads its own arguments" for --org -evil, which keeps its sentence), tests/test_setup_sh.py, tests/test_scaffold_pin_and_reuse.py (:502, :517: the sibling's words) and tests/test_repo_hygiene.py pass on Linux. One new case per refusal reason through the pseudo-terminal, as #756's file does: the sentence names the empty value, the leading -, the control character and the pattern, and the pattern case for each of ../x, a/b, Atlas, Atlas/ and a name with an accented letter does not say "starts with -". For the bound: names of N and N+1 characters either side of the number, at the prompt and through --project, local and not, asserting exit 2 before (4) naming policy prints. For the space: Atlas typed at the prompt gives the decision above. No real gh run here; the bound's number needs one.
Overlaps. fix/729-typed-project-name (#756) edits setup-project.py and adds the test file; fix/696-setup-family-folder (4054ffde, #696) edits setup-project.py in family_folder_here, far from :332-388 and :1475; fix/692-raw-folder-paths (#731) and fix/693-local-remote-dir edit scaffold-project.py, which a plan-time bound would also edit. Nothing on origin edits tests/test_setup_project_py.py or tests/test_setup_sh.py. setup-project.py is not a pinned copy; scripts/repo_shape.py is, if the sibling wording changes with it.
Parent: #459.
Milestone: v1.1.1. None is a regression and none blocks v1.1.0: each is a name the person typed, and each ends in a refusal before anything is created, only in the wrong words, at the wrong step, or late.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 17, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T10:30:03Z, for #777
Logged in
lanes/log/openRepoShape-5.mdat0d613a36fd5332bfef78bfd6d0638b398ac00b64.The three reads (lane-collision-protocol Rule 1):
tests/test_setup_project_name_edges.py: the typed runs give git a cre…
setup-project.py: the prompt takes only the space off a typed name, a…
tests/test_setup_project_name_edges.py: the credential helper's entry…
setup.sh, install.sh, openRepoShape and tests/conftest.py: the ref ru…
docs/release-notes/v1.1.1.md and release.yml: the v1.1.1 notes answer…