Repository navigation
adopt-project.py plan: an empty --id or --elected-by is read as not passed, and a derived id's refusal sends the person to an --id the naming policy then refuses #658
Description
plan should refuse an empty passed --id or --elected-by by name, as --tracking-branch '' is since #479, and the derived-id refusal should say what to change, --project.
From the checklist triage of 2026-10-15, batch 3; Brett Heap approved its recommendations at 2026-10-16T12:14:51Z. One pull request covers the lines below.
Lands after: #620.
Decision applied: DB2 (option A) and DB3 (option 1).
Lines
Line numbers are at the commits named; main has moved since.
- L2-53:
plan --id ''andplan --elected-by ''are read as not passed. Where: adopt-project.py_checked_plan_inputs,flags_given(:3273),args.id = args.id or args.project.lower()(:3309),args.elected_by = args.elected_by or _elector()(:3332); the contrast isgiven = args.tracking_branch is not None(:3279). Effort S; all. On main396c0ff4:--id ''plansid: atlasand exits 0;--elected-by ''records the configureduser.nameand exits 0 though--helpsays "not blank"; with nouser.namethe refusal reads "--elected-by (not given, sogit config user.name) is ''", naming "not given" for a flag that was passed;--tracking-branch ''is refusedunsafe-value(probel2-53-54.log). - L2-54: for a derived id, "pass an explicit lowercase --id" leads to another refusal. Where: adopt-project.py:3309-3313 (derived at :3309,
adopt-bad-idraised at :3311),_check_namesat :3348,_refuse_another_repositorycalled at :3321 and defined at :10166. Effort S; all. On main396c0ff4:--project North_WindgivesREFUSED adopt-bad-id: --id 'north_wind' must match ...; adding--id north-windgivesREFUSED naming-unclassified: 'North_Wind' matches no family in the naming policy; for a source adopted in place (origintestorg/North_Wind) the second refusal says it cannot be adopted in place under that name and to rename it first (probel2-54-inplace.log).
Rides along (backlog; tick it here if the same change covers it)
- L1-39, lane 1's line on Tracking: adopt-project.py, converting an existing repository in place #457, sent here from adopt-project.py:
adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620 by lane 1's D7 (D7 sent it to adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620's next round, #601, comment, and adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620 lands without one). In lane 1's words: "adopt-manifest-invalidnames a filled-in--orgas a flag (an org from a url thatchecked_valueaccepts butvalidate-manifest.pyrefuses, such as~x), the mechanism lane 3's adopt-project.pyplan: with no--elected-byand nouser.name, the refusal reads--elected-by is '', naming a flag that was never passed #529 fixed for--elected-by(landed as adopt-project.py:plannames an elector it took fromgit config user.nameby where it came from, so with no--elected-byand nogit config user.namethe refusal reads--elected-by (not given, sogit config user.name) is ''and no longer--elected-by is '', a flag nobody passed (#529) #567); anorgentry inFLAG_DEFAULTSis the cheap fix. Measured on 182389e. (Found in adopt-project.py and shape-doctor.py: one reading oforigin, so a local clone's right--orgis no longer refused, a url ending/names its repository, and the doctor's adoption line asks for--orgwhereverplanreads none (#521, #427) #591's writer and review.)" Where: adopt-project.pyFLAG_DEFAULTS(:2663on main7ba64f01, as lane 1's D7 read it), the same table L2-54's derived-id label is built from. This line is lane 1's: lane 2 does not edit lane 1's comment, so lane 1 may mark it→this issue on Tracking: adopt-project.py, converting an existing repository in place #457 and tick it there when this closes. (source)
Notes for whoever takes it. #620's _refuse_bad_id (4c049a8, :3050-3065) builds the derived sentence by hand and, per rv601's probe P4, says "(--id was not given)" for --project North_Wind --id ''; the fix replaces that with FLAG_DEFAULTS["id"] (:2623) through _flag_named (:2819), as L2-54's direction says. L2-53 moves flags_given, which also labels the elector (:3331) and _flag_fields (:2831), so those labels' tests move with it. The mutant id_passed = args.id is not None survives every test of #620 because nothing tests --id ''; the fix adds that row. Not a duplicate of #261 (a blank ' '), #529 (the elector's label) or #420 (the branch alphabet).
Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.
The lines as written on the tracking issues
L2-53 (P3; adopt-project.py, #601 review):
plan --id ''andplan --elected-by ''are read as not passed, so an empty value silently becomes the derived id orgit config user.name.
- At 55faad2
flags_givenis built by truthiness (adopt-project.py:3178), and the two values are filled in withor(:3214args.id = args.id or args.project.lower(),:3236-3237args.elected_by = args.elected_by or _elector()).--tracking-branch ''is the contrast: it is read byis not None(:3184) and refused by name since adopt-project.py: a source whose default branch is notmainis adopted with both legs pushed, then its pull request is refused (--base main), and the printed way out repeats--base main#479.- Measured on a scratch export of main:
--id ''plansid: atlasand exits 0.--elected-by ''records the configureduser.nameand exits 0, although--helpsays "not blank" (:10208-10210). With nouser.nameset, the refusal reads--elected-by (not given, sogit config user.name) is '', naming "not given" for a flag the person did pass. On adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620's head the new derived-id sentence also says "(--id was not given)" for--project North_Wind --id ''(rv601 probe P4); main's sentence for that input was false as well.- Direction: read both by
is not Noneand refuse an empty passed value by name, as--tracking-branch ''is. That movesflags_given, which also labels the elector (:3236) and_flag_fields(:2736), so those labels' tests move with it. In adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620 the mutantid_passed = args.id is not Nonesurvives every test because nothing tests--id ''; the fix adds that row.
L2-54 (P3; adopt-project.py, #601 review): for a derived id the remedy "pass an explicit lowercase --id" leads to another refusal.
adopt-project.py:3214-3218at 55faad2. Every assembly pattern incontracts/repository-naming.yaml(:125,:182,:202,:336,:345,:376) uses only ASCII letters, digits and hyphens, so any--projectthe naming policy accepts lowercases into a valid id. A derivedadopt-bad-idtherefore fires only for a--projectthat_check_names(:3255) refuses next. When the source is adopted in place,--projectcannot be retyped at all (_refuse_another_repository, called at:3226, defined at:10034).- Measured on a scratch export of main:
--project North_WindgivesREFUSED adopt-bad-id: --id 'north_wind' must match ..., and adding the remedy's--id north-windgivesREFUSED naming-unclassified: 'North_Wind' matches no family in the naming policy. rv601 saw the same forWind.Mill --id wind-millandOrg/North --id org-northon the predicted merge (rv601-probe2-merged.log, Q1 to Q3). This predates adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620.- Direction: a design choice, so it is not adopt-project.py
plan: an id derived from--projectis refused as--id '…' must match, naming a flag nobody passed #601's line. Either word the derived case's remedy around--project(or the source's name), or let the naming refusal speak first when the id was derived. L2-56 on Tracking: setup, scaffold, family and the shared helpers, creating projects and families #459 is the scaffold and family half. When this is done, build adopt-project.py:adopt-bad-idnames an id derived from--projectas derived, so--project North_Windno longer says--id 'north_wind' must matchover a flag nobody passed (#601) #620's derived label fromFLAG_DEFAULTS["id"](:2528) as_flag_nameddoes (:2724-2733), not by hand as_refuse_bad_iddoes (adopt-project.py:3050-3065at 4c049a8): an edit to that table does not reach the hand-written sentence (rv601's nit).
[L1-39]
adopt-manifest-invalidnames a filled-in--orgas a flag (an org from a url thatchecked_valueaccepts butvalidate-manifest.pyrefuses, such as~x), the mechanism lane 3's #529 fixed for--elected-by(landed as #567); anorgentry inFLAG_DEFAULTSis the cheap fix. Measured on 182389e. (Found in #591's writer and review.)
— #457, comment
Activity
brettheap commentedon Oct 16, 2026
CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-16T12:42:41Z, for #658
Logged in
lanes/log/openRepoShape-2.mdat93ceab4ef89c34a5e7bda33a6b89e4597f12b23c.The three reads (lane-collision-protocol Rule 1):
scaffold-project.py and family.py: a derived id's remedy names the ru…
adopt-project.py: a derived id's remedy names the rule `naming-unclas…
scaffold-project.py and family.py: `scaffold-bad-id` and `family-bad-…
family.py: `add`'s refusal of a member's own gitlink held only under …