Skip to content

refactor(setup-apply): pin typed-scalar leaf display and drop the unreachable flow-map branch - #10933

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10130-40852719312-1
Oct 29, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10130-40852719312-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10130

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Removes the is a flow map branch from checkValue() in lib/setup-apply.mjs. It could never run: lib/yaml-subset.awk refuses any plain value opening with {, so validate() returns the parse error first. Adds an extras object key with unchecked leaves to the setup-apply test fixture, plus a --check test. The test pins the leaf display to each typed scalar's source text (1.0, 075, 1e3, True, null, ~, 9007199254740993), shows an empty leaf as absent, and confirms that a flow map on an object key is refused with the parse error. These tests guard the later switch to yaml-subset.mjs (part 4, #10131).

Not verified

  • bash lib/setup-apply.test.sh was not executed: this lane's Bash runs only the named wrappers. The new cases' expected output was traced by hand and by the review subagent. Left to the PR's CI
  • tidy skipped: the change spans 18 files, over the 10-file cutoff, across several areas, and touches the shared path lib/
  • the changelog fragments were written by hand: new-changelog-fragment refused because HEAD is detached (it names fragments after the branch). check-changelog-fragments validated them
  • shellcheck and the node lint were not run on the touched files: no wrapper for them is available in this lane. Left to the PR's CI

Fix

  • lib/setup-apply.mjs: removed the unreachable is a flow map branch in checkValue()
  • lib/setup-apply.test.sh: new extras fixture key (an object with unchecked leaves) and a header note for it; a --check case pinning the typed scalars' source text in the leaf display, with an empty leaf absent; a refusal case for a flow map on an object key that asserts the parse error
  • plugins/{discipline,discovery,docs-hygiene,education,planning,review,session-flow,verification}/lib/setup-apply.mjs: regenerated from lib/setup-apply.mjs by sync-shared-copies
  • .changes/{discipline,discovery,docs-hygiene,education,planning,review,session-flow,verification}/work-resolve-issue-issue-10130-b4e1d7a2.md: one bump: patch fragment per plugin that carries the shared copy

Verification

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

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //github.com/melodic-software/claude-code-plugins/issues /8677: the parent issue. It says the mjs tree loses typed scalars' source text (1.0, 075, 1e3) in --check's leaf display, and that the is a flow map branch never runs because the parse error fires first. Part 3 (#10130) covers th
  • sync-shared-copies: regenerated 8 plugin copies; sync-shared-copies --check afterwards: all 535 registered copies match their canonical sources
  • check-changelog-fragments: all 13 fragments under .changes/ are valid (run before and after the review fix)
  • check-affected: 12 passed, 6 skipped, over 18 changed files (run before and after the review fix)
  • fresh-context review subagent: confirmed the deleted branch cannot run (it traced the awk and blockTree splits), traced both new test cases' expected strings as exact, and found that the extras key breaks no existing assertion. It found one bug: a dropped space at lib/setup-apply.test.sh:371 that
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40852719312

Left out: the items under Not verified.

Related

#10130

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

Copy link
Copy Markdown
Contributor

claude-review reviewed d531e27a14cc6f85b31974acf5e97cc6ce172f4a: 0 finding(s), 0 as inline comments.

No findings. I read the diff and the PR context, and read lib/setup-apply.mjs, lib/yaml-subset.awk and the test helpers in lib/setup-apply.test.sh. I did not run lib/setup-apply.test.sh or any other command; this lane had no shell. Everything below comes from reading the code.

Closing issue #10130 (two criteria)

  • Typed scalars keep their source text in --check's leaf display, with a test. Met.
    • leaves() in lib/setup-apply.mjs builds path=value from the awk records. The awk script emits plain scalars as written, so 1.0, 075, 1e3, True, null, ~ and 9007199254740993 come through unchanged.
    • Nothing is emitted for an empty value, so blank: is absent from the display.
    • The new check_ok case in lib/setup-apply.test.sh pins the exact PASS extras: ratio=1.0, octal=075, ... string, and check_ok also asserts exit 0 and no WARN.
    • The extras fixture key is { "type": "object" }, which isObject accepts, so the leaves are unchecked as the case needs.
  • The unreachable is a flow map branch is removed. Met.
    • lib/yaml-subset.awk fails on a leading { with flow mapping ({...}) is outside the subset; use block style. validate() returns that parse error before checkValue runs, so the deleted branch could never run.
    • The new refused case on session: {uploads: true} asserts the exact message, so it would fail if a flow map on an object key were handled differently.

Shared copies and changelog

  • The eight plugins/*/lib/setup-apply.mjs hunks are identical to the canonical hunk (same index hashes 7ab6afb4..5dc99c36).
  • Each of the eight plugins has a bump: patch fragment. Dead-code removal with no behaviour change is correctly a patch.

Spend: none.

Unverified: the PR's "Verification" claims (the check-affected and sync-shared-copies results, and the review subagent's trace) are the author's and the lane's own. I did not independently confirm them.

Trusted paths: no changed file matches a listed glob.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d531e27a14cc6f85b31974acf5e97cc6ce172f4a: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

The change removes one dead is a flow map branch from checkValue() in lib/setup-apply.mjs. It regenerates that file into 8 plugin copies, adds a test fixture and cases in lib/setup-apply.test.sh, and adds 8 changelog fragments.

  • Validation stays closed. If a value starting with { ever reached the removed branch, the next branch, raw !== "", would still report <path>=<raw> is not a map. The result is the same refusal with a different message.
  • Manifests and trust controls. No plugin.json or marketplace.json is touched, and none of the listed trusted paths is changed. No manifest <field> lines apply.
  • Instruction surfaces. No standing instruction, rule file, or hook list is changed.
  • Tests. The added test inputs are fixed literals with no injection or secret handling.
  • Limits of this review. I had no shell, so I did not run bash lib/setup-apply.test.sh or re-check that yaml-subset.awk refuses a leading {. The PR description says that check was traced by hand and by a review subagent.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head d531e27a14cc6f85b31974acf5e97cc6ce172f4a.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 829b097 Oct 29, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-10130-40852719312-1 branch October 29, 2026 11:40
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.

Converge the awk and mjs YAML grammars before setup-apply uses yaml-subset.mjs - part 3 of 4

0 participants