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
repo_shape.py's YAML reader: a key written twice keeps the last without a word, and a block-scalar line indented less than its block loses its first characters #917
Goal: scripts/repo_shape.py's YAML reader refuses, by line, a key written twice and a block-scalar line indented less than its block, instead of reading either silently.
Filed by lane openRepoShape-3, from its triage of #459 at the v1.1.1 release commit 5017830. It groups #459's lines U021 (L2-4) and U181 (RV823's SHOULD-2), with U123 and U155 (L4-156, posted twice) as a section that is a documented limit, one pull request's worth. scripts/repo_shape.py is a pinned copy, so the change re-pins every project once.
A key written twice keeps the last (U021)
State. The block mapping builder assigns out[key] = ... at scripts/repo_shape.py:1052, :1061 and :1063, and the flow builder at :724, with no check for a key already there. Brett Heap ruled on 2026-10-14: refuse a duplicated key (backlog). v1.0.0's notes list it as a known limit (docs/release-notes/v1.0.0.md:468).
A nested block reads the same. So a shape pin holding a valid files: list and then files: 5 reads as files: 5, and a doubled commit: or members: in any contract file passes.
Evidence. The lines and the probe above.
Direction. In the block and flow mapping builders, raise YamlError with "line N: key 'k' is written twice" when the key is already in out. Test rows for block, flow and nested.
An under-indented block-scalar line loses text (U181)
State._block_scalar_body appends nxt[block_indent:] for each body line (scripts/repo_shape.py:910-914), with no check for a line indented less than block_indent.
bc is dropped without a word. PyYAML refuses the document.
Evidence. The line and the probe above; RV823 measured it on #823's head 153bab90.
Direction. Refuse a non-blank body line indented less than the block, by line, as the reader's other refusals do, with a row in tests/test_yaml_reader_spaces.py.
Documented limit (v1.1.0.md:749-751), needs a ruling to reopen (U123, U155)
State. The reader is a subset by design, and v1.1.0's notes keep this list as a known limit (docs/release-notes/v1.1.0.md:749-751, #459's L4-156). #715's body: "Stays out of this issue: L4-156".
What happens. Measured in process at 5017830, each of these reads where PyYAML refuses it or reads another thing:
Direction (needs a ruling). Per construct, refuse it in the reader's existing words, or keep it and leave it documented. Nothing here is to be done without that ruling.
Size: S (the first two sections; M if the third is ruled in).
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T16:11:24Z, for #917
Logged in lanes/log/openRepoShape-3.md at 3f97b55e890e10c3e564a4108cc98d87de769adb.
The three reads (lane-collision-protocol Rule 1):
1. existing `CLAIMED —` comments on opensoft/openRepoShape#917:
none
2. `gh pr list --repo opensoft/openRepoShape --state all --search "#917"`, kept where the row or its body names `#917`:
none
3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `917` as a whole token:
none
(lane openRepoShape-3, 2026-10-22T12:08:46Z) Ruling: U123 and U155 stay a documented limit, so #917 is done.
Brett Heap, 2026-10-22T12:01:22Z: "take your recommendations on #979, #917 and #921".
The recommendation taken was (A): the YAML reader stays a subset by design, with the constructs measured above (k: - a, k: [?a], @a: 1 and the rest) kept as the documented limit that v1.1.0's notes already give (docs/release-notes/v1.1.0.md:749-751). scripts/repo_shape.py does not change, since changing it would re-pin every project once.
RELEASED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-22T12:15:22Z, for #917 — done: U021 and U181 landed in #974; U123 and U155 stay documented on Brett Heap's ruling of 2026-10-22T12:01:22Z; #917 closed as completed
Activity
brettheap commentedon Oct 18, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T16:11:24Z, for #917
Logged in
lanes/log/openRepoShape-3.mdat3f97b55e890e10c3e564a4108cc98d87de769adb.The three reads (lane-collision-protocol Rule 1):
validate-pins.py and repo_shape.py: `--root` and gh's stderr are spel…
update-shape.py: its refusal of a manifest with two `shape:` blocks n…
scripts/repo_shape.py: the YAML reader refuses a key written twice in…
brettheap commentedon Oct 22, 2026
(lane openRepoShape-3, 2026-10-22T12:08:46Z) Ruling: U123 and U155 stay a documented limit, so #917 is done.
Brett Heap, 2026-10-22T12:01:22Z: "take your recommendations on #979, #917 and #921".
k: - a,k: [?a],@a: 1and the rest) kept as the documented limit that v1.1.0's notes already give (docs/release-notes/v1.1.0.md:749-751).scripts/repo_shape.pydoes not change, since changing it would re-pin every project once.#ends the block as a comment (#917) #974 (scripts/repo_shape.py: a key written twice is refused, block or flow), merged 2026-10-19.Lane: openreposhape-3 (openRepoShape-3)
brettheap commentedon Oct 22, 2026
RELEASED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-22T12:15:22Z, for #917 — done: U021 and U181 landed in #974; U123 and U155 stay documented on Brett Heap's ruling of 2026-10-22T12:01:22Z; #917 closed as completed
docs/release-notes/v1.2.0.md: the v1.2.0 release notes: what changed …