Repository navigation
Description
(lane openRepoShape-5, 2026-10-23)
Goal: update-shape.py asks the shape pin's source_repository: once, whichever way the run reaches the upstream, and refuses a value that is no owner/repo in the pin's name, never in the name of a flag nobody passed.
Problem
update-shape.py's prepare reads the pin's source_repository: as declared (update-shape.py:2400 at main, :2421 at #1166's head). Two things follow from where it is used.
- No
--upstream: the pin's value isopen_upstream'sspec, and the first of its refusals still names the flag. validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 (validate-manifest.py and validate-family.py:PROJECT_ID_RE,DATE_REandQUALIFIED_REend in$, so anid:, a date or arepository:that ends in a line break passes as well formed (#1126 follow-up) #1139) givesopen_upstreamapin_path, so thatupdate-upstream-unresolvableand thechecked_valuerefusal name the pin and its field. The branch above them,update-upstream-not-a-repo(:675at main,:686at validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166's head), is as it was: its message reads--upstream <value> exists but is not a git repository, for a value from the pin. It is reached when the pin's value is a path that exists where the command runs (the lookup isPath(spec).expanduser(), relative to the working directory, not to--root; read, not measured). Found by lane 5's independent review of validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166, finding 3 (validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 issuecomment-6352173084). The body of validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 discloses it. --upstreampassed: the pin's value is never asked.upstream.repository = declared(:2402at main) keeps whatever the pin says. It reachesReadmeShapeLine(root, upstream.repository, target)(:2503,:4998), the commit subject ofapply(:2995),pull_request_words(upstream.repository, ...)(:5099,:5849) and the linescheckandapplyprint (:5153,:5737). validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 does not change this, and its body names it under "Not changed, seen while measuring" (finding 9 of the review). A value that ends in a line feed is kept as it is.
Nothing in the repository writes a path into the shape pin: both pin templates hold source_repository: {{SHAPE_REPOSITORY}} (templates/assembly-root/contracts/shape-pin.yaml:27, templates/family-root/contracts/shape-pin.yaml:29), and tests/test_scaffold_e2e.py:733 reads opensoft/openRepoShape back. So a value that is no owner/repo is a hand edit.
Measured
Main 961640c6 and #1166's head 2593952c, in scratch clones of the shared repository (Python 3.12.3, git 2.43.0, a stub gh, no network). Every run with no --upstream is refused before a clone could start.
Case 1, no --upstream, run from the root (update-shape.py check --root <root>), the pin's source_repository: written as:
| Value | main | #1166's head |
|---|---|---|
"contracts" |
REFUSED update-upstream-not-a-repo: --upstream contracts exists but is not a git repository, exit 2 |
the same |
"scripts/repo_shape.py" |
REFUSED update-upstream-not-a-repo: --upstream scripts/repo_shape.py exists but is not a git repository, exit 2 |
the same |
"contracts/shape-pin.yaml" |
... --upstream contracts/shape-pin.yaml exists but is not a git repository, exit 2 |
the same |
"opensoft/openRepoShape\n" |
REFUSED unsafe-value: --upstream is 'opensoft/openRepoShape\n', exit 2 |
REFUSED update-upstream-unresolvable: <root>/contracts/shape-pin.yaml: source_repository: is 'opensoft/openRepoShape\n', which is neither a path on this machine nor an owner/repo name, exit 2 |
"opensoft/openRepoShape " and "has space/x" |
REFUSED update-upstream-unresolvable: --upstream '...' is neither a path ... |
the pin-named refusal, as above |
Case 2, --upstream <a local clone> passed, the pin's source_repository: written "opensoft/openRepoShape\n":
-
check(at the pinned commit): exit 0,unchanged 11,readme-shape-line: absent,nothing to do, at main and at validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166's head. The fixture's README has noShape:line, so the README verdict was not reached; read atupdate-shape.py:2189,ReadmeShapeLinecompares the line's repository withself.repository, so a README that carries the line readsreadme-shape-line: other-repositoryagainst a pin the line feed made different. Not measured. -
checkagainst an upstream one commit ahead exits 1 and prints itsNEXT ... applyline; thenapply --yes --branch shape/fu-lfexits 0 and makes one commit. At main the message begins:Re-sync the shape copies to opensoft/openRepoShape+ a line feed +@ 281736885633+ a blank line +1 copied file(s) re-copied from the upstream; ...and the same at validate-manifest.py, validate-family.py, family.py and update-shape.py: an
id:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166's head (... @ 2475eb41bcf9). With the pin as scaffolded the subject is one line,Re-sync the shape copies to opensoft/openRepoShape @ 281736885633. -
The
NEXTlineapplyprints,... gh pr create --repo <org>/<project> --base main --head shape/fu-lf --title 'Re-sync the shape copies to opensoft/openRepoShape, then@ <sha>' --body ...on the next line: the pasted command is split in two by the line feed, inside its quotes.
Suggested fix
- Ask
declaredinprepare, once, before it is used by either route:REPOSITORY_RE.fullmatchandchecked_value, refused in the pin's name (<root>/contracts/shape-pin.yaml: source_repository:), with the remedy validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 already gives for the pin (writeowner/repo, or pass--upstreama path). - Where the value is a path and no
--upstreamwas passed, name the pin inupdate-upstream-not-a-repoas validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 does for the other two refusals (pin_pathis in scope inopen_upstream). The remedy can stay: point--upstreamat a clone, or passowner/repo. - Decide, and say in the PR, whether a pin that names a path with
--upstreampassed is refused too. Nothing writes one, so refusing it costs no existing root; it is the stricter reading, and this draft leans to it, because the value is printed into a commit and a pull request. update-shape.pyis not a pinned copy, buttests/test_update_shape_*.pyandtests/test_agents_md_codes.pyread its codes: a refusal that keeps its code (update-upstream-unresolvable,unsafe-value,update-upstream-not-a-repo) changes only its words. Greptests/,README.md,docs/, the handbook mirror andAGENTS.mdfor the text before changing a sentence.
Verify
- Rows for each value above, in both routes (no
--upstream, and--upstream <local clone>): refused, exit 2, naming the pin file andsource_repository:and not--upstream. The case-2 rows fail on main (exit 0 and a commit), and the path rows of case 1 fail on main (--upstream contracts exists ...). applyover a refused pin writes nothing and makes no commit; the pin'scommit:is unchanged.- A pin as scaffolded, with and without
--upstream: every answer unchanged. The existingtests/test_update_shape*.pypass on git 2.43 and 2.47.1. - Mutants: the new question removed from each route, and
fullmatchput back tomatch, are each killed. tests/test_agents_md_codes.py,tests/test_cli_reference.pyandtests/test_path_guard_hygiene.pypass. A path guard added toupdate-shape.pyuses_is_a.
Found by lane 5's independent review of #1166 (#1139), findings 3 and 9 (#1166 issuecomment-6352173084), and re-measured at main 961640c6.
Milestone: none; it lands after the v1.2.0 tag (Brett Heap's 10:32:04Z ruling of 2026-10-21).
Lane: openreposhape-5 (openRepoShape-5)
Activity
brettheap commentedon Nov 8, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-11-08T16:06:47Z, for #1203
Logged in
lanes/log/openRepoShape-5.mdateaa9e43492188ef6474bb86d9b2cf150bfd3d4b3.The three reads (lane-collision-protocol Rule 1):
update-shape.py and shape-doctor.py: a pin's `source_repository:` of …
tests/test_update_shape_pin_source.py: a pin's `~<user>` that `expand…