Repository navigation
Description
The reader scripts/repo_shape.py should keep the Unicode spaces YAML keeps in the text its new refusals quote and in the entries they test, refuse the one empty block key the fuzz still draws, and say what it does in words that are true. The riders in the same reader and its callers ride with it.
From lane 4's checklist triage of 2026-10-16 (T5b), approved by Brett Heap at 2026-10-16T13:36:07Z ("approve all triage recommendations"). One pull request covers the lines below. This is the part of lane 4's #635 review (R392) that is NOT a regression: the regressions are #708.
Parent: #459. 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:
- v1.1.0 regressions:
adopt-project.py checkexits 2 with no line and no remedy on a hand-writtenresolution:that opens with a backtick (#635),plan --org @xno longer names--org(#635), andchecknames one badtracking_branchtwice (#644) #708 (the same reader, the same pinnedscripts/repo_shape.py, andshape_materialize.py). - lane 2's Pinned shape copies: one bump, so AGENTS-shape.md is true of every root, the scaffold's chain WARNING offers only its own sources and spells
--pin-source, the root's not-used note spells it too, and THE LOCKSTEP RULE'sbumpruns (#610) #634 (ready): it editsscripts/repo_shape.pyandscripts/shape_materialize.py. - lane 2's scaffold-project.py and family.py:
scaffold-bad-idandfamily-bad-idname an id derived from--projector--familyas derived and say to change that flag, so--project North_Windno longer says--id 'north_wind' must matchand sends the person to an--idthe naming policy then refuses (#659) #671 (ready;scaffold-project.pyandscripts/family.py): L4-154 is a docstring inscaffold-project.py.
Effort: M: a narrower strip, an empty-key refusal, one guard, three texts. Platform: all.
Files: scripts/repo_shape.py (a pinned shape copy, re-pinned), scripts/shape_materialize.py (_misread_reason's docstring and _read_back), scaffold-project.py (a docstring), and tests/test_yaml_indicator_openers.py. The pull request re-pins repo_shape.py once more, after #708's bump; it can ride on the next re-pin if Brett Heap prefers.
Lane openRepoShape-4 claims it at filing; see its CLAIMED comment.
Why this is filed. Not a regression: each line was already so before #635, or is a gap in #635's new code. None is met by an ordinary plan or manifest: they are exotic YAML (- :, k: {?: 1}, a no-break space opening a value) or words and docstrings. Line numbers are at c6122e8 (#639); main has moved since.
Lines
- L4-150 (P3: a gap in repo_shape.py: a plain scalar opening with an indicator, an empty flow entry and a single pair in a flow sequence are refused, so
k: ]is not the text],pins: [,a]not['a']andk: [a: b]not the string'a: b'(#392, #393) #635's code):str.strip()takes Unicode spaces that YAML keeps, so the new refusals can quote text the file does not hold.k: ],k: @aandk: \xa0%awere misread on main as],@aand%a. They are refused now, where PyYAML reads the whole value (' ]'and so on), and the refusal quotes the stripped text (']').k: [a, ,b]is refused as an empty entry, where PyYAML reads['a', ' ', 'b']. This is the one direction in which repo_shape.py: a plain scalar opening with an indicator, an empty flow entry and a single pair in a flow sequence are refused, sok: ]is not the text],pins: [,a]not['a']andk: [a: b]not the string'a: b'(#392, #393) #635 refuses valid YAML outside its by-design kinds (R392 O3). Where:scripts/repo_shape.py:336-342quotestext[:i].strip(). Probed for this issue:parse_yaml("k: ]\n")gives{'k': ']'}on v1.0.1 andda48256^(a misread, not the whole value) and raisesYamlErroronda48256. (source) - L4-148 (P3: a gap repo_shape.py: a plain scalar opening with an indicator, an empty flow entry and a single pair in a flow sequence are refused, so
k: ]is not the text],pins: [,a]not['a']andk: [a: b]not the string'a: b'(#392, #393) #635 left): the empty block key still reads.- :reads[{'': None}]and: areads{'': 'a'}. PyYAML refuses both: R392 said it reads: awith aNonekey, W392 measured the refusal, and a re-run onda48256givesParserErrorfor each. It is the one gap inside the fuzz's alphabet:tests/test_yaml_indicator_openers.pydrops- :after the draw (EMPTY_BLOCK_KEY,:465onc6122e8), and its module docstring names it as not in these issues (R392 O1). (source)
Rides along (backlog; tick it here if the same change covers it)
- L4-149:
k: {?: 1}reads the key'?'on this reader, where PyYAML readsNone. Meanwhilek: [?],k: {a: ?}andk: {?}are refused as explicit keys (R392 O2). Where:scripts/repo_shape.pyparse_yaml, unchanged since repo_shape.py: a plain scalar opening with an indicator, an empty flow entry and a single pair in a flow sequence are refused, sok: ]is not the text],pins: [,a]not['a']andk: [a: b]not the string'a: b'(#392, #393) #635 (da48256). (source) - L4-153:
_misread_reason's docstring is false for@, and_read_backhas noYamlErrorguard.scripts/shape_materialize.py:3546-3558(atda48256) sayschecked_value's alphabet "holds no space, quote, backslash, bracket, brace,#,:,&,*or!, so each line parses, bare or quoted, and a bare value is a plain scalar".checked_valueadmits@, which a bare line can no longer open with._read_back(:3514atda48256;:3738-3742onc6122e8) callsparse_yaml(rendered + "\n")unguarded, so a future bare leg-path template line plus--spec-path @xwould be a traceback. Today all four leg-path lines are quoted (templates/assembly-root/project.yaml and the two leg pins write eight text placeholders bare (id,elected_on,visibility,tracking_branch, the two legpaths andsubmodule_paths), so a checked value YAML reads as another type (007,2026,true,null) is misread by the project or refused by the tool; quoting them reads every one back exactly and lets numeric branch names adopt #259), so it is latent (R392 O6). (source) - L4-154:
scaffold-project.py's_neutral_pin_entrydocstring usesid: -as "the text" a bare line reads, and the reader now refusesid: -. It isscaffold-project.py:1518-1519atda48256(:1631onc6122e8; "- -is a list of its own, whereid: -is the text"), in a file repo_shape.py: a plain scalar opening with an indicator, an empty flow entry and a single pair in a flow sequence are refused, sok: ]is not the text],pins: [,a]not['a']andk: [a: b]not the string'a: b'(#392, #393) #635 does not touch. The point it makes (ask the list entry) still holds; the example is one word out of date. W392 named it too (R392 O7). (source) - L4-155:
k: [a: b: c]is refused with the single-pair words, though PyYAML refuses it as invalid. The reader saysa single-pair mapping in a flow sequence is not supported: 'a: b: c'. Both readers refuse; only the words are off (R392 O8). Where:scripts/repo_shape.py:630. (source)
What is expected
- The refusals quote the text the file holds, and the empty-entry test does not take a Unicode space for nothing: a narrower strip (the spaces YAML itself strips), with a test row for each of
,and\xa0. - :and: aare refused, andEMPTY_BLOCK_KEYno longer drops them from the fuzz.k: {?: 1}is refused like its siblings, or the pull request says it stays by design (scripts/repo_shape.py reads? a: bin a flow mapping as the literal key? a, where the block reader refuses explicit keys, and refuses{a: }and{a:}asnot a flow collection: ''instead of reading{'a': None}#252 keeps the flow?a)._misread_reason's docstring is true of@,_read_backturns aYamlErrorinto a refusal,_neutral_pin_entry's docstring uses an example the reader still reads, and the[a: b: c]refusal says the entry is invalid.
Stays out of this issue: L4-156, the YAML subset the reader reads by design (it stays a known limit for the v1.1.0 notes, #630), and L4-151, L4-152 and L4-127 (#708).
Not a duplicate: #392 and #393 are what #635 closed; neither claims these lines. No issue numbered #650 to #700 cites any of them (read at 13:17Z).
Each line above is a line of #459's checklist comment (issuecomment-6214812326). 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:02:44Z, for #715
Logged in
lanes/log/openRepoShape-4.mdat781e1d4853d7d1883f18b7bb14855d03820bf11b.The three reads (lane-collision-protocol Rule 1):
brettheap commentedon Oct 17, 2026
(lane openRepoShape-4, 2026-10-17T16:20:53Z) Scope extended for #823's fix round, on RV823's MUST-1 (#823 issuecomment-6236502554), option (B), which needs no ruling.
tracking_branch: main\xa0, reaches the branch readers as'main\xa0':refs/heads/main\xa0;Main read it as
main.templates/family-root/scripts/siblings.pyalready refuses, a branch holding a characterstr.isprintable()rejects orstr.isspace()matches:validate-manifest.py's_branch_findingreportsmanifest-tracking-branchandmanifest-leg-branchwith the value spelled;bootstrap.py's_argument_faultrefuses it, so no ref is made;Project.trackingreads the value throughchecked_value, asfamily.pydoes, sobump-leg.pyrefuses rather than compares.k: {?: 1}still read, and three texts about the reader are one word out of date (what #635 left) #715's files now includetemplates/assembly-root/scripts/validate-manifest.py,templates/assembly-root/scripts/bootstrap.pyand theProject.trackingreader.make bootstrapend in a UnicodeDecodeError, and a character the filesystem encoding lacks still ends step (a) in a traceback #710) also changesbootstrap.py's_argument_fault. Whichever of repo_shape.py strips only YAML's space and tab, so a value a Unicode space opens reads as PyYAML reads it, and validate-manifest, bootstrap, bump-leg and update-shape refuse a branch holding a character that does not print or is white space (#715) #823 and bootstrap.py: step (a) decodes git's output as the system decodes a name it is given, so a branch whose upstream is not UTF-8 is moved back, and a good branch this system's encoding cannot write gets a line of its own, not a traceback (#710) #824 lands second takes that merge round, after the v1.1.0 tag.validate-manifest.py, bootstrap.py, bump-leg.py and update-shape.py: …
tests: the #715 rows push their own advanced spec commit, so `test_bu…
bump-leg.py and update-shape.py: a tracking branch is refused only fo…
bump-leg.py: `readable_branch` is imported on a line of its own, so t…
Merge main 0dee22b (#824, #710) into fix/715-yaml-reader-spaces: `_ar…
shape_materialize.py: `readable_branch` and `UNSEEN` move out of the …
Merge main ca47b71 into fix/715-yaml-reader-spaces: `tests/test_boots…
tests: under a Latin-1 locale 12 of the 13 rows of #1259 skip on thei…
templates/assembly-root/scripts/bootstrap.py: the comment on its `DEF…