Skip to content

fix: Simplify the yaml-subset.awk and yaml-subset.mjs shared lib sources - #14583

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-14343-42570678561-1
Nov 9, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-14343-42570678561-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #14343

Summary

Opened by the work-resolve-issue lane from work-resolve-issue/issue-14343-42570678561-1, which an earlier run left with commits and no report. The model did not run again, and the earlier run's outcome could not be read, so this body carries none of its text.

Fix

The diff shows the changes.

Files the branch changes, from the compare listing; a denied path, which the merge lane refuses, is marked and listed first:

  • .changes/adhd/work-resolve-issue-issue-14343-42570678561-1-8a252b44.md
  • .changes/ai-briefing/work-resolve-issue-issue-14343-42570678561-1-90255c32.md
  • .changes/ai-slop/work-resolve-issue-issue-14343-42570678561-1-8f6a6074.md
  • .changes/architecture/work-resolve-issue-issue-14343-42570678561-1-75a68e36.md
  • .changes/attribution/work-resolve-issue-issue-14343-42570678561-1-4d5460c5.md
  • .changes/autonomy/work-resolve-issue-issue-14343-42570678561-1-b1e71c4e.md
  • .changes/bugs/work-resolve-issue-issue-14343-42570678561-1-d866a790.md
  • .changes/code-tidying/work-resolve-issue-issue-14343-42570678561-1-d97c6032.md
  • .changes/codebase-health/work-resolve-issue-issue-14343-42570678561-1-c8b14544.md
  • .changes/corrections/work-resolve-issue-issue-14343-42570678561-1-11a7f93d.md
  • .changes/debugging/work-resolve-issue-issue-14343-42570678561-1-5c8c2c14.md
  • .changes/developer-experience/work-resolve-issue-issue-14343-42570678561-1-90d18653.md
  • .changes/discipline/work-resolve-issue-issue-14343-42570678561-1-604c4c88.md
  • .changes/discovery/work-resolve-issue-issue-14343-42570678561-1-b73c6f99.md
  • .changes/docs-hygiene/work-resolve-issue-issue-14343-42570678561-1-5f6d8873.md
  • .changes/docs-naming/work-resolve-issue-issue-14343-42570678561-1-1d7506c8.md
  • .changes/domain-driven-design/work-resolve-issue-issue-14343-42570678561-1-7769e32e.md
  • .changes/education/work-resolve-issue-issue-14343-42570678561-1-3686c116.md
  • .changes/event-storming/work-resolve-issue-issue-14343-42570678561-1-4a1f4395.md
  • .changes/explainer-video/work-resolve-issue-issue-14343-42570678561-1-841c7e1e.md
  • .changes/guardrails/work-resolve-issue-issue-14343-42570678561-1-800e2d8e.md
  • .changes/harness-config/work-resolve-issue-issue-14343-42570678561-1-c94f0873.md
  • .changes/harness-memory/work-resolve-issue-issue-14343-42570678561-1-0b222417.md
  • .changes/harness-ops/work-resolve-issue-issue-14343-42570678561-1-07273477.md
  • .changes/implementation/work-resolve-issue-issue-14343-42570678561-1-a977264e.md
  • .changes/knowledge/work-resolve-issue-issue-14343-42570678561-1-f0053c12.md
  • .changes/multi-agent/work-resolve-issue-issue-14343-42570678561-1-e13c54a8.md
  • .changes/mutation-testing/work-resolve-issue-issue-14343-42570678561-1-12d29f46.md
  • .changes/overengineering/work-resolve-issue-issue-14343-42570678561-1-a08b023a.md
  • .changes/planning/work-resolve-issue-issue-14343-42570678561-1-288b5529.md
  • .changes/playwright/work-resolve-issue-issue-14343-42570678561-1-a7c022e9.md
  • .changes/prototype/work-resolve-issue-issue-14343-42570678561-1-a2023571.md
  • .changes/review/work-resolve-issue-issue-14343-42570678561-1-b291d9f6.md
  • .changes/session-flow/work-resolve-issue-issue-14343-42570678561-1-36c79738.md
  • .changes/skill-quality/work-resolve-issue-issue-14343-42570678561-1-54a6c588.md
  • .changes/source-control/work-resolve-issue-issue-14343-42570678561-1-c216006f.md
  • .changes/testing/work-resolve-issue-issue-14343-42570678561-1-215e6509.md
  • .changes/user-experience/work-resolve-issue-issue-14343-42570678561-1-1c8b88a8.md
  • .changes/user-interface/work-resolve-issue-issue-14343-42570678561-1-97f63646.md
  • .changes/verification/work-resolve-issue-issue-14343-42570678561-1-b3d76475.md
  • .changes/visualization/work-resolve-issue-issue-14343-42570678561-1-b7a384d8.md
  • .changes/wizard/work-resolve-issue-issue-14343-42570678561-1-f8f58a04.md
  • .changes/work-items/work-resolve-issue-issue-14343-42570678561-1-0e6e3d00.md
  • .changes/writing/work-resolve-issue-issue-14343-42570678561-1-433e2a4b.md
  • lib/yaml-subset.awk
  • lib/yaml-subset.mjs
  • plugins/adhd/lib/yaml-subset.mjs
  • plugins/ai-briefing/lib/yaml-subset.mjs
  • plugins/ai-slop/lib/yaml-subset.awk
  • plugins/architecture/lib/yaml-subset.mjs
  • and 63 more

Verification

The earlier run reported no checks here.

The runner ran each check from the base copy against ea4523d:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The runner's leak scan read everything the branch changes since its merge base with the default branch and found nothing credential-shaped.

Left out: every check; ci-status, pr-verify and the security review lane check the head before it merges.

Related

#14343

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed ea4523d97fa4e7cb6db06bf046fa0580fe1f4f97: read 113 of 113 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR simplifies lib/yaml-subset.awk and lib/yaml-subset.mjs and adds the regenerated plugin copies. It also adds one patch changelog fragment for each of the 44 plugins whose copy changed. The identical-files list shows three groups of copies: the fragments, the .mjs copies and the .awk copies. I read the first file of each group and both sources in full; all 113 listed files are covered.

Behavior equivalence (checked by reading the code; I ran nothing):

  • awk flow() / value(): neither function used the end local that was removed. Joining the rtrim(substr(...)) calls into one line gives the same result.
  • awk BEGIN: removing the n = 0; based = 0; pending = 0; seen = 0 setup is safe:
    • An unset awk variable compares equal to 0, so n == 0 still holds.
    • n is set to 1 before paths[n] or cnt[n] is first used (lib/yaml-subset.awk#L242-L245).
    • based, pending and seen are only tested as true/false.
    • inblock = (BLOCK != 1) is the exact negation of the old ternary for every value of BLOCK.
  • awk sequence item: sub(/^ +/, "", item) strips the same leading spaces as the old match + substr pair. No code reads the RLENGTH that match used to leave behind before keyat() resets it.
  • mjs: isQuote matches the old inline checks exactly, including undefined for an empty string. It doesn't clash with any other name. The early return in nested() keeps the same control flow and the same depth bookkeeping. The exported names (YamlSubsetError, parse) are unchanged.

Closing issue #14343 acceptance criteria:

  • Behavior unchanged, nothing renamed: met, judged by reading the code. Existing tests (lib/yaml-subset.test.mjs, lib/yaml-subset-awk.test.sh, lib/yaml-subset-parity.test.mjs/.sh) cover both parsers and would catch a regression.
  • Only the listed files, generated copies and fragments are edited: met.
  • Within 400 changed lines and 15 hand-edited files: met (2 hand-edited files).
  • scripts/sync-shared-copies.sh was run and the copies committed: the copies are in the diff and each group is byte-identical. I didn't run the sync script, so whether they match its output is unverified.
  • ci-status green: not something this lane can check.

The PR body says check-changelog-fragments.sh and check-changed-skills.sh passed. That is reported by the runner and I did not verify it.

No paved-path or .claude/rules criteria apply to these files, and no plugin manifests changed. There is no prior review from this lane on this PR.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ea4523d97fa4e7cb6db06bf046fa0580fe1f4f97: read 113 of 113 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14583 (simplify yaml-subset.awk / yaml-subset.mjs)

I found no security issues.

Scope read. I read the whole change of lib/yaml-subset.awk and lib/yaml-subset.mjs. For each group in the identical-files list I read the first path: .changes/adhd/...-8a252b44.md (the 44 changelog fragments), plugins/adhd/lib/yaml-subset.mjs (24 plugin .mjs copies) and plugins/ai-slop/lib/yaml-subset.awk (43 plugin .awk copies). The plugin copies' hunks match the root sources line for line. Only the header offset differs.

What changed and why it is behavior-preserving

  • awk, BEGIN block. BEGIN { n = 0; based = 0; pending = 0; inblock = ...; seen = 0 } became BEGIN { inblock = (BLOCK != 1) }. I checked the one place this could matter, the subscript paths[n] (uninitialized n would index "", not "0"). At head, if (n == 0) { ...; n = 1; ... paths[1] = "" } (lib/yaml-subset.awk#L242-L245) runs before any paths[n] read. An uninitialized n == 0 compares numerically as true, so n is always set first. !based, pending and seen are boolean tests, and uninitialized behaves as 0 in each. inblock: with -v BLOCK=1 (a strnum) the value is 0, otherwise 1, the same as the old ternary.
  • awk, other edits. Unused locals end were dropped from flow() and value(). rtrim(substr(...)) was inlined. match(/^ */) plus substr became sub(/^ +/, "", item). All three give the same result.
  • mjs. The new isQuote helper replaces the inline '/" checks, and isQuote(undefined) is still false. nested() was flattened to an early return. The MAX_DEPTH nesting cap (lib/yaml-subset.mjs#L690) and the depth bookkeeping in try/finally are kept exactly.

Copies at sensitive paths. One copy lives at a hook path: plugins/guardrails/hooks/yaml-subset.awk. Its content is identical to the root source, and the parsing behavior is unchanged. Because the parser fails closed in the same places and emits the same records, no guardrail that reads it changes what it allows.

Trust controls, manifests and instructions. The change touches no trust control, workflow, token or broker file, kill switch, merge hold, plugin manifest or standing instruction. None of the 113 changed files matches a TRUSTED PATHS: glob. The changelog fragments are data-only bump: patch notes.

PR context. The PR context contains no embedded directives aimed at the review lane.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 89b6151 Nov 9, 2026
62 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-14343-42570678561-1 branch November 9, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify the yaml-subset.awk and yaml-subset.mjs shared lib sources

1 participant