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
lib/yaml-subset.awk keeps the first duplicate key where the CI parser rejects the file #7331
When a mapping repeats a key, the shared awk YAML reader lib/yaml-subset.awk keeps the first value. The CI config parser rejects the same file. So a local reader and CI can disagree about one config.
Concrete case: babysit_merge_policy.py reads docs/conventions/pr-pipeline.yaml through this reader (via parse-concern-value.sh --strict) to decide the unattended merge rung. If the merge: block contained a key twice, CI would reject the file but the local reader would act on the first value. The CI rejection keeps the bad config off main, so this is latent today.
Expected
--strict mode treats a duplicate key in the same mapping as a parse error, the same as the CI parser.
Scope
Canonical source: lib/yaml-subset.awk.
Copies registered in scripts/shared-copies.txt (16 files on main); propagate with bash scripts/sync-shared-copies.sh.
Check each consumer of the non-strict mode keeps its current behavior, or opt it in.
Thanks for the report. I understand the problem: lib/yaml-subset.awk's non-strict reader silently keeps the first value when a mapping key repeats, while the CI YAML parser rejects the same file as invalid — so a config that CI would reject could still be accepted and acted on by a local --strict reader, as in babysit_merge_policy.py reading docs/conventions/pr-pipeline.yaml. The fix should make --strict mode treat a duplicate key in the same mapping as a parse error, propagate the canonical lib/yaml-subset.awk fix to the 16 registered copies via scripts/sync-shared-copies.sh, and confirm each non-strict consumer either keeps its current behavior or explicitly opts into strict checking.
Scope and related issues (#6699, #6202) are clearly identified. I found no duplicate open issues for this specific --strict duplicate-key gap.
Question: Admit this issue to the issue lane with the brief below, which implements the decision already discussed in this thread? (Premise holds: lib/yaml-subset.awk has no duplicate-key check while lib/yaml-subset.mjs:209 rejects duplicates, and strictness lives in lib/parse-concern-value.sh (--strict, exit 3); the issue states the expected behavior, so an opt-in flag keeps every direct awk consumer unchanged; 4 hand-edited files, 29 generated copies, 14 fragments; no open PR on these files.)
Owner's answer: Yes. The owner was asked "Admit the 7 shared-copy issues and #6888 to the paced queue, recording each one's decision as a 'Decision recorded.' comment, and close #6227? #7373 and #6109 wait for their overlapping PRs." and answered "Yes (Recommended)" in an attended backlog-shaping session on 2026-10-18.
Posted by AI from the owner's answer in that session.
Type: Bug Summary: Make strict parsing report a key repeated in one mapping as a parse error, in the canonical awk YAML reader lib/yaml-subset.awk and the canonical lib/parse-concern-value.sh, then regenerate their copies.
Current behavior:
When a mapping repeats a key, the awk reader emits both records without error and consumers act on the first value. The JS reader lib/yaml-subset.mjs rejects the same file with a duplicate-key error, as CI's config parser does. So parse-concern-value.sh --strict, which the babysit merge policy uses to read the merge rung, accepts a file CI rejects.
Desired behavior:
The awk reader takes a new opt-in variable for strict parsing. With it set, a key repeated in the same mapping (the same full dotted path) is a parse error in the reader's existing error<TAB><line><TAB><message> form, naming the line of the second occurrence.
The same key under two different parents, and keys inside different sequence items, are not duplicates.
Without the variable, output is byte-identical to today, so every direct awk consumer and every non-strict parse-concern-value.sh call behaves as before.
parse-concern-value.sh --strict sets the variable, so it exits 3 on such a file.
Key interfaces:
Awk reader: a new strict variable beside BLOCK; error record format unchanged.
parse-concern-value.sh --strict: exit 3 on a duplicate key; non-strict mode unchanged.
Both files are canonicals in the shared-copy registry.
Acceptance criteria:
A test in lib/yaml-subset-awk.test.sh shows a repeated key fails under the strict variable with the second occurrence's line, and parses as today without it.
A test shows the same key under two parents, and in two sequence items, is not an error under the strict variable.
A test in lib/parse-concern-value.test.sh shows --strict exits 3 on the duplicate-key file and the non-strict call returns what it returns today.
scripts/run-test-file.sh passes on lib/yaml-subset-awk.test.sh and lib/parse-concern-value.test.sh.
After editing the canonicals, the lane ran scripts/sync-shared-copies.sh to regenerate the copies, and scripts/sync-shared-copies.sh --check exits 0.
Each carrying plugin has one new changelog fragment under .changes/<plugin>/ whose bump is not none: discipline, discovery, docs-hygiene, education, harness-memory, harness-ops, multi-agent, planning, review, session-flow, source-control, testing, verification, work-items.
Activity
github-actions commentedon Oct 12, 2026
Thanks for the report. I understand the problem:
lib/yaml-subset.awk's non-strict reader silently keeps the first value when a mapping key repeats, while the CI YAML parser rejects the same file as invalid — so a config that CI would reject could still be accepted and acted on by a local--strictreader, as inbabysit_merge_policy.pyreadingdocs/conventions/pr-pipeline.yaml. The fix should make--strictmode treat a duplicate key in the same mapping as a parse error, propagate the canonicallib/yaml-subset.awkfix to the 16 registered copies viascripts/sync-shared-copies.sh, and confirm each non-strict consumer either keeps its current behavior or explicitly opts into strict checking.Scope and related issues (#6699, #6202) are clearly identified. I found no duplicate open issues for this specific
--strictduplicate-key gap.Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 18, 2026
Decision recorded.
Question: Admit this issue to the issue lane with the brief below, which implements the decision already discussed in this thread? (Premise holds: lib/yaml-subset.awk has no duplicate-key check while lib/yaml-subset.mjs:209 rejects duplicates, and strictness lives in lib/parse-concern-value.sh (--strict, exit 3); the issue states the expected behavior, so an opt-in flag keeps every direct awk consumer unchanged; 4 hand-edited files, 29 generated copies, 14 fragments; no open PR on these files.)
Owner's answer: Yes. The owner was asked "Admit the 7 shared-copy issues and #6888 to the paced queue, recording each one's decision as a 'Decision recorded.' comment, and close #6227? #7373 and #6109 wait for their overlapping PRs." and answered "Yes (Recommended)" in an attended backlog-shaping session on 2026-10-18.
Posted by AI from the owner's answer in that session.
kyle-sexton commentedon Oct 18, 2026
Agent Brief
Type: Bug
Summary: Make strict parsing report a key repeated in one mapping as a parse error, in the canonical awk YAML reader
lib/yaml-subset.awkand the canonicallib/parse-concern-value.sh, then regenerate their copies.Current behavior:
When a mapping repeats a key, the awk reader emits both records without error and consumers act on the first value. The JS reader
lib/yaml-subset.mjsrejects the same file with a duplicate-key error, as CI's config parser does. Soparse-concern-value.sh --strict, which the babysit merge policy uses to read the merge rung, accepts a file CI rejects.Desired behavior:
error<TAB><line><TAB><message>form, naming the line of the second occurrence.parse-concern-value.shcall behaves as before.parse-concern-value.sh --strictsets the variable, so it exits 3 on such a file.Key interfaces:
BLOCK; error record format unchanged.parse-concern-value.sh --strict: exit 3 on a duplicate key; non-strict mode unchanged.Acceptance criteria:
lib/yaml-subset-awk.test.shshows a repeated key fails under the strict variable with the second occurrence's line, and parses as today without it.lib/parse-concern-value.test.shshows--strictexits 3 on the duplicate-key file and the non-strict call returns what it returns today.scripts/run-test-file.shpasses onlib/yaml-subset-awk.test.shandlib/parse-concern-value.test.sh.scripts/sync-shared-copies.shto regenerate the copies, andscripts/sync-shared-copies.sh --checkexits 0..changes/<plugin>/whose bump is notnone: discipline, discovery, docs-hygiene, education, harness-memory, harness-ops, multi-agent, planning, review, session-flow, source-control, testing, verification, work-items.Out of scope:
lib/yaml-subset.mjs.scripts/sync-shared-copies.sh --check-bump, which runs only in CI.This was generated by AI during backlog shaping. The owner approved its admission in an attended backlog-shaping session on 2026-10-18.