Repository navigation
adopt-project.py check: a plan in a name the policy refuses gets no rename-first remedy, and a source that names no repository is never compared with the plan's recorded source.repository #716
Description
adopt-project.py check should say, for a plan in the source's own refused name, what execute says on the same plan: rename the source first. And a plan whose recorded source: repository: was hand-edited should not check plan ok where the live source names no repository. The comment rider ties the two together.
From lane 4's checklist triage of 2026-10-16 (T6), approved by Brett Heap at 2026-10-16T13:36:07Z ("approve all triage recommendations"). One pull request covers the lines below.
Parent: #457. Milestone: v1.1.1 (a follow-up filed after Brett Heap's v1.1.1 word of 2026-10-16T13:35:28Z).
Authored after the v1.1.0 work; lands after the v1.1.0 tag unless the release owner (lane 3) says otherwise.
Lands after: every open change to adopt-project.py, because the file moves under it. Lane 4 merge-trees at each push, and the one that lands second re-gates:
- lane 2's adopt-project.py
plan: an empty--idor--elected-byis read as not passed, and a derived id's refusal sends the person to an--idthe naming policy then refuses #658 (filed, v1.1.0), whose pull request is adopt-project.py:planrefuses--id ''and--elected-by ''by name, a derived id's refusal says to change--project, or in place to rename the source first, and an org read from a url is named as not given (#658) #699; - lane 3's README, AGENTS.md, docs/cli.md and the handbook:
pipx install openreposhapeis the second way in and the first on native Windows, git-filter-repo is installed in install.sh's order and never with a barepip install, and a first draft of the v1.1.0 release notes (#563) #630 (a draft pull request;adopt-project.py'sfilter-repo-missing); - lane 1's claimed adopt-project.py: a
--work-dirthat is a file or cannot be made endsplan,checkandexecutein a traceback, and--helpsays nothing of--work-diror of where--orgcomes from #650, adopt-project.py and scaffold-project.py: a--pinnaming an annotated tag's object id is written as the pin'scommit:, under the pin file's "A COMMIT, NEVER A TAG" #651, adopt-project.py:--source <org/repo>reads a directory of that name under the current one, a trailing/clones intosource-readonly/itself, and a recorded clone that is gone or emptied is refused for the wrong reason #652, adopt-project.py underLC_ALL=C PYTHONUTF8=0: the--descriptionem dash,plan'sgit grepandcheck's submodule url still end in a UnicodeEncodeError before any leg #653, adopt-project.pycheck: a kept or moved file other than.gitattributeswhose blobgit addwould re-encode passes, andexecuteendsadopt-lostor dies mounting the legs after both legs are pushed #654, adopt-project.py and shape-doctor.py: a plan answer that overrides a confident rule passescheckandexecute, then the doctor's first run says MISPLACED, and an emptied.gitmodulesis asked on every run #655, adopt-project.pycheckpasses a source whose tree holds a symlink whose target begins with a NUL byte (\0spec.md, a120000blob of size 8), so with symlinks onexecutecreates both leg repositories and then fails cloning the source, exit 2 with nothing on stderr, and #303'splan-empty-symlink, which tests the blob's size, does not find it #388, adopt-project.py_verifynever asks whether the split's rootproject.yamlis the shape's manifest, so the one refusal #305 added before any leg exists is all that keeps the source's own file out of the root, and a plan that gets past it endsadoption verifiedover an assembly shape-doctor.py calls NOT A SHAPE ROOT, where #165's gitlink checks in the same function fail closed #389, adopt-project.pychecktakes no--local-remote-dirand resolves a relative submodule url from GitHub's remotes, whileexecute --local-remote-dirresolves it from the bare repositories it creates, so under that test pathcheckrefuses an adoptionexecuteverifies and passes oneexecuterefuses #417 and adopt-project.py_default_branchreads the source's branch name throughgit_out, which decodes strictly, so a source whose HEAD (ororigin/HEAD) names a branch that is not UTF-8 endsplan,checkandexecutein a UnicodeDecodeError traceback, exit 1, fromSource.open, with no plan written and no refusal naming the branch #425 (no pull request open yet), alladopt-project.py; - lane 2's adopt-project.py and scaffold-project.py: the Free-plan secrets hint goes by the assembly root's own visibility on GitHub and names the root as its reason, so a public source adopted with private legs is no longer told its organisation secrets resolve to EMPTY (#602) #621 has landed (
4ce9045) and is not waited for.
Effort: S. Platform: all.
Files: adopt-project.py only; not a pinned shape copy, so no re-pin.
Lane openRepoShape-4 claims it at filing; see its CLAIMED comment.
Why this is filed. Both lines are pre-existing and exotic: a hand-edited plan in a name the policy refuses, and a hand-edited source: repository: on a source with no origin. execute refuses both, so nothing is lost; check is the command that tells a person before the legs exist. Line numbers are at c6122e8 (#639) unless a line says another commit; main has moved since (#621 and #627 landed).
Lines
- L4-38 (P3):
adopt-project.py checkgives no remediation for a plan in the source's own refused name: it calls_check_nameswithout the source and prints only the detail, so a hand-editedbilling-serviceplan whoseoriginis acme/billing-service getsnaming-unclassifiedwith no rename-first text (executeon the same plan does say it). Pre-existing:checkprints no naming remediation at all. Where:adopt-project.py:8337incmd_check(:8276) calls_check_names(naming, names, pins)with no source, so no rename-first text (:8338on8062810d). (source) - L4-40 (P3): when the live source names no repository, the plan's own recorded
source: repository:is not consulted: a plan for acme/Atlas hand-edited toAtlsa, thengit remote remove originon the source, checksplan okandexecutereadshttps://github.com/acme/Atlsa.git. The same withexecute --source <a copy with no origin>. Where:adopt-project.py:11477-11479,_not_the_sourcereturns None where the live source names no repository (def _not_the_sourceis at:11531on8062810d);open_source(:4177) opens an existinglocal_pathand never readssource.repository. (source)
Rides along (backlog; tick it here if the same change covers it)
- L4-48:
adopt-project.py's comments on adopt-project.pyplannever compares--project(or--org) with the repository it adopts in place, so a source namedbilling-serviceis refused with a remediation that steers to--project BillingService, which plans and checksplan okagainstacme/billing-service, andexecutethen acts onacme/BillingService: a rawgit ls-remotefailure when no such repository exists, and, when a different repository of that name does, both legs, the split branch, the pull request and the topic on that repository #499'sorg:read overstate (adopt-project.py:7791"a hand edit is caught too, whateverorg:then holds, because it is read asexecutereads it", and_not_the_source's docstring at:7920"whatever the file holds"). Anorg:thatchecked_valueitself refuses (a list, a mapping, an empty value, a space, a leading-, non-ASCII) is refused asunsafe-valuebycheck, as on main, and is never compared as a repository. Comment wording only: the edit is still caught. Onc6122e8they are:11335("whateverorg:then holds") and_not_the_source's docstring (:11463-11476, "whatever the file holds"); on8062810d,:11403and:11531. (From W513b's re-read of adopt-project.py:--organd--projectmust name the repository the source names, compared without case, soplanrefuses--project BillingServiceforacme/billing-serviceasadopt-not-the-sourceinstead of writing a plan whoseexecuteacts onacme/BillingService,checkfinds andexecuterefuses a plan edited to name another asplan-not-the-source, and a source whose own name the naming policy refuses is told to rename it first, never to retype--project(#499) #513's body at 6b622c9.) (source)
What is expected
checkprints the rename-first text for a plan in the source's own refused name, asexecutedoes: the source is handed to_check_namesat thecmd_checksite, and a test pins thatcheckandexecutesay the same remedy on the same plan.- A recorded
source: repository:is compared with the source whenever the live source names none, so a hand edit of it isplan-not-the-source, incheckand inexecute. A test hand-edits a plan toAtlsaand removesorigin, as the line measures it. - L4-48: the two comments say what
checkdoes with anorg:thatchecked_valuerefuses.
Not a duplicate: lane 2's #658 and #620 are the derived-id label; lane 1's #650 to #655 are other adopt-project.py lines. No issue numbered #650 to #700 cites L4-38, L4-40 or L4-48 (read at 13:17Z). L4-127, which sat with these lines in the first draft, is in #708: it is a regression from #644.
Each line above is a line of #457's checklist comment (issuecomment-6157842287). Tick it there too when this closes.
Lane: openreposhape-4 (openRepoShape-4)
Activity
brettheap commentedon Oct 16, 2026
CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-16T14:03:49Z, for #716
Logged in
lanes/log/openRepoShape-4.mdat130870dde234bdacae60631a9f1ffaabea602920.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: a plan's record that is a path `origin`'s last two …
adopt-project.py: a path `origin`'s record is read as v1.0.1 read it,…
tests/test_adopt_check_plan_name.py: the another-case row keeps a rec…
Merge main d8b8eb3 into fix/798-adopt-legs-asked-first: `folder_in_th…
Merge main 3341992 into fix/798-adopt-legs-asked-first: `check` keeps #…
adopt-project.py: `check` and `execute` ask a plan's `org:` and `id:`…