You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scripts/repo_shape.py _split_flow ignores a backslash inside a double-quoted flow item, so pins: ["x\",y"] reads back as two items x\ and y" where the same text as a block sequence item reads as the one item x",y #213
Found by this lane while fixing #199, whose writer saw it and left it out of that fix. Pre-existing on main e4decfb. Latent: nothing this repository writes or ships can hold such an item today (see the last paragraph), so this is a reader that disagrees with itself, not a live failure.
What is wrong. The YAML subset reader's _split_flow (scripts/repo_shape.py:339-360) ends a quoted flow item at the next matching quote character and never looks at a backslash. So an escaped quote \" inside a double-quoted item ends the quote early, the comma after it splits the item, and a ] or , that was inside the quotes is read as structure. _split_key_flow (:322-336) has the same omission. _strip_comment (:200) and _split_key (:224) already skip the character after a backslash inside a double-quoted scalar, and _scalar / _unescape resolve \", so a double-quoted scalar is read one way everywhere except where it is a flow item.
Row 1 is the report: one item x",y reads as two, x\ and y", and nothing refuses it. Row 3 is worse: two items a"] and b read as one garbled item, because the quote state is inverted from the escaped quote on, so the comma between the two items falls inside a "quote" and is not split. Rows 4 and 5 are refusals of a valid document, and row 6 is a wrong key and value from _split_key_flow. The reader's own header says it "raises rather than guessing", because a validator that silently mis-reads its own contract file is worse than one that will not start.
Expected. The same text reads the same in a flow and in a block: pins: ["x\",y"] is ['x",y'], ["a\"]", "b"] is ['a"]', 'b'], and {"a\": b": 1} is {'a": b': 1}. Inside a double-quoted item, _split_flow and _split_key_flow skip the character after a backslash, as _strip_comment and _split_key do. A single-quoted item has no backslash escape and keeps its toggle. A test pins these cases.
Reach. The four writers of a flow sequence write bare words: adopt-project.py:868 (pins, each checked by PIN_NAME_RE, [A-Za-z0-9_.-] and one /), :894-896 (allow_empty_legs, choices=EXTRACTED_LEGS), scripts/shape_materialize.py:986 (also_matches) and :1006-1007 (referent_chain). None quotes an item, and none of the 14 tracked YAML files holds a flow item with a double quote in it. So the defect shows only on a file a person edits or another tool writes: the adoption plan is "meant to be edited", and json.dumps of a list is valid flow YAML with exactly this escape. A writer added later that put y()'s output in a flow would meet it.
CLAIMED — lane openRepoShape-5, session aed6225f-5615-4442-8a05-1652232a24d9@Eagle, 2026-10-11T17:14:52Z, for #213
Logged in lanes/log/openRepoShape-5.md at a8a82ba38c8fc6ea0ec4ca771e4426a75022cb4d.
The three reads (lane-collision-protocol Rule 1):
1. existing `CLAIMED —` comments on opensoft/openRepoShape#213:
none
2. `gh pr list --repo opensoft/openRepoShape --state all --search "#213"`, kept where the row or its body names `#213`:
none
3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `213` as a whole token:
none
Activity
brettheap commentedon Oct 11, 2026
CLAIMED — lane openRepoShape-5, session aed6225f-5615-4442-8a05-1652232a24d9@Eagle, 2026-10-11T17:14:52Z, for #213
Logged in
lanes/log/openRepoShape-5.mdata8a82ba38c8fc6ea0ec4ca771e4426a75022cb4d.The three reads (lane-collision-protocol Rule 1):
fix round 1 (#213): a backslash that is the last character of a doubl…
Merge origin/main (4835fb4: #199 via #247, #213 via #244, #208) into …
Merge origin/main (4835fb4) into fix/adopt-relative-submodule-url: #208…
Merge origin/main (4835fb4: #208 via #224, #213 via #244, #199 via #247…
repo_shape.py: a flow-mapping entry opening `? ` is refused as an exp…
repo_shape.py: a quote opens a quoted scalar only where one begins an…
Merge origin/main 39ac59c into fix/adopt-root-kept-symlinks: #199, #213…
Merge origin/main (39ac59c, #229 via #235) into fix/adopt-late-failur…
Merge origin/main (4835fb4) into fix/adopt-plan-quote-yaml-keywords