Repository navigation
Description
Goal: a -- --dry-run of setup-project.py either offers nothing that changes this machine or says that it may, and --shape-ref's rule refuses the names its docstring says it refuses, or stops saying so.
Filed by lane openRepoShape-5, from the checklist candidates of #777's PR (#811, writer f811: "A passed-through --dry-run still makes the preflight's offers", in its fix round 1, and "checked_ref passes a.lock/b", in its fix round 2). The first is a design question that f811 names as one. The second line is measured here; the first is read from source and from #811's own CI run, and was not run here.
Lands after: lane 5's #777 (PR #811, fix/777-typed-name-edges, head 050abea6, stacked on #729's PR #756, fix/729-typed-project-name, head b3c77cc2), which rewords checked_ref's refusals (WHY_RANGE, WHY_LOCK) and adds the tests that ran into the offer. path:line is at main fc867207; #811's head differs where said.
Lines
- A passed-through
-- --dry-runstill makes the preflight's offers._check_credential_helper(setup-project.py:1052-1086;:1147-1180at setup-project.py: a refused value names the check it failed, a project name over 95 characters is refused before step (4), and the prompt takes the spaces off a typed name, soAtlasno longer hides in step (4) (#777) #811's head) runs frompreflight_checks(:1116) for a run that is not--local-remote-dir(if opts.local_mode: return,:1073). Where git has no credential helper for github.com it warns and callsoffer("gh auth setup-git")(:845-877), which asks "Rungh auth setup-gitnow? Type yes to continue:" of a terminal.passes_a_dry_run(opts.passthrough)(:2086) never reaches it: it is read only in the plan step (:2348-2352), which then says "--dry-run was passed through to the scaffold, so this run ends at the plan above: nothing was created and nothing was cloned", and--helpsays "A--dry-runthere ends this run at the plan, creating nothing" (:179-180). On a typed exactyes, gh writes the credential helper into the person's global git config (f811's words; not run here). The login (_offer_login,:1016) and the installs (offer_missing,:923) are offered the same way. Seen on CI: five of setup-project.py: a refused value names the check it failed, a project name over 95 characters is refused before step (4), and the prompt takes the spaces off a typed name, soAtlasno longer hides in step (4) (#777) #811's own tests type only at the project prompt, and on run 39027235147 (git 2.55.0) each waited at this question until the test killed it (setup-project.py: a refused value names the check it failed, a project name over 95 characters is refused before step (4), and the prompt takes the spaces off a typed name, soAtlasno longer hides in step (4) (#777) #811's fix round 1,b5def3f0; the tests now sign in aghstub that also gives git a helper). Direction: decide first, as f811 says it is a design question. The preflight offers on a typedyesby design (The preflight offers to install what is missing and starts the login: a guided first run, --doctor (after #50) #59;--preflightexists to make the offers), so one reading is that a dry run reaches them and the person types the answer: then--helpand the plan step's sentence say that the preflight may still offer to change this machine. The other is that with a passed-through--dry-runthe offers print the command they would run and ask nothing, asofferalready does wherecan_ask()is false (its docstring, "NO TERMINAL, NO OFFER").--helpis generated intodocs/cli.md(scripts/render-cli-reference.py), so a wording change regenerates it. -
checked_refpassesa.lock/band other names git refuses.setup-project.py:391-402(:477-490at setup-project.py: a refused value names the check it failed, a project name over 95 characters is refused before step (4), and the prompt takes the spaces off a typed name, soAtlasno longer hides in step (4) (#777) #811's head), withREF_REat:337. Measured here at main by loadingsetup-project.pyand callingchecked_ref("--shape-ref", <name>)besidegit check-ref-format --branch <name>(git 2.43.0). The tool refusesa.lockanda/b.lock. It passesa.lock/b,x/y.lock/z,release.lock/v1,a/.b,a//b,a/b/anda.lock/, and git exits 128 for each of those seven; fortopic.locked, which the tool also passes, git exits 0. The check istext.endswith(".lock")(:400) where git's rule is per component: no component ends in.lockor begins with., and//and a trailing/are refused. What the person meets is the failure of any name that is no ref: in a scratch repositorygit checkout --quiet a.lock/bsayserror: pathspec 'a.lock/b' did not match any file(s) known to git, exit 1, as it does forv9.9.9. In self-bootstrap mode that comes after the clone of the standard (:672-684), which is the cost. The docstring says..and.lockare refused "rather than discovered as a confusing failure inside the temporary checkout", andREF_RE's comment calls the alphabet "the subset of [git check-ref-format] that a person types". Direction: decide first whether the rule is worth finishing. Either make it per component in the same function as..(a.lockending on any/-separated part, a part that begins with.,//, a trailing/or.), or drop the.lockrule and its sentence (WHY_LOCK,:378at setup-project.py: a refused value names the check it failed, a project name over 95 characters is refused before step (4), and the prompt takes the spaces off a typed name, soAtlasno longer hides in step (4) (#777) #811's head) and let git answer, since no ref git refuses can exist and the checkout's error is the same. Asking git is not a way:checked_value's docstring says this entry point cannot importshape_materialize.py'sbranch_problem, because it runs before there is a checkout to import it from.
Verify: tests/test_setup_project_py.py, tests/test_setup_project_name_edges.py (new in #811), tests/test_cli_reference.py and tests/test_repo_hygiene.py pass on Linux. For the first line, a pty test (POSIX only, as #811's own are: PTY_SKIP) of setup-project.py <name> --org <org> -- --dry-run under a signed-in gh stub and a git whose config holds no helper: under the offering reading the help and the plan sentence say so; under the silent one the run ends at the plan with no question, and the file GIT_CONFIG_GLOBAL names is unchanged. For the second, a table test that feeds each of the ten names above to checked_ref and to git check-ref-format --branch and holds the two to one answer (and topic.locked to pass), with a mutant that puts endswith(".lock") back, caught. No Windows or macOS run: CI is Linux only (#597).
Overlaps. #811 and #756 edit setup-project.py (checked_ref is #811's); #821 (fix/711-git-bash-dialect) edits it too, in the paste-line quoting. Any change to --help regenerates docs/cli.md, which other branches regenerate as well. setup-project.py is not a pinned copy.
Parent: #459.
Milestone: v1.1.1. The first line needs a terminal and a typed yes the person is shown the command for; the second ends in git's own error after the clone. Neither is a regression, and neither blocks v1.1.0.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 18, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-18T02:18:27Z, for #857
Logged in
lanes/log/openRepoShape-5.mdat24f06b03c89e3c2443b175fcb4f1adf30c91ce88.The three reads (lane-collision-protocol Rule 1):
tests/test_setup_project_ref_parts.py and tests/test_setup_project_dr…
setup.sh, install.sh, openRepoShape and tests/conftest.py: the ref ru…
setup-project.py: a passed-through `--dry-run` makes none of the pref…
setup.sh, install.sh and openRepoShape: a ref git refuses part by par…
docs/release-notes/v1.1.1.md: the v1.1.1 notes take RV883's NIT list …
setup-project.py: a `store` credential helper holding no login for gi…