Skip to content

refactor(planning): simplify check-open-questions.sh and build-view.mjs - #15075

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14673-42795318451-1
Nov 10, 2026
Merged

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

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14673

Summary

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

check-open-questions.sh now has one awk squash() helper in place of three copies of whitespace normalization, and one headings_or_die helper in place of three copies of the heading read and its refusal on an unterminated fence or an unreadable file. Its row loop also reuses the existing trim_into and proc_problem helpers instead of inlining them. build-view.mjs states its CI test as !env.CI || env.CI === "false" and reads the --out value into one constant. check-plan-citations.sh is unchanged: it has no duplicated logic inside the file that could go without changing output, and every line of its header comment is its printed --help text. Every message, exit code, flag and exported name stays the same.

Not verified

  • The planning test suites (check-open-questions.test.sh, check-plan-citations.test.sh, build-view.test.sh, deliver-view.test.mjs) were not run here: this lane's Bash runs only the named wrappers, so the PR's CI runs them
  • ci-status green is a PR CI check, left to the PR's CI
  • Tidy pass 5 (ai-slop fix) on the changelog fragment was only a manual read against the catalog, because the lane cannot run the ai-slop detector; it found no tell, and the fragment's line is text the issue prescribes. Passes 1-4 ran and changed nothing

Fix

  • plugins/planning/scripts/check-open-questions.sh: added the squash_awk helper (used by brief_fields, heading_texts and section_lines) and the headings_or_die helper (used by the register, deferred-questions and Brief-section heading reads); the row loop uses trim_into and proc_problem; the header…
  • plugins/planning/scripts/build-view.mjs: simplified the CI/interactive expression (same result for every env.CI value) and named the --out value once as out
  • .changes/planning/work-resolve-issue-issue-14673-42795318451-1-9b2f3a95.md: new patch fragment, ### Changed with the line "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 5db5a68:

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

The run reports:

  • check-changelog-fragments: all 1 fragment valid (run before and after tidy)
  • check-changed-skills: no changed skills, nothing to gate (run before and after tidy)
  • check-affected: 13 passed, 6 skipped over 3 changed files (run before and after tidy)
  • fresh-context review subagent over the whole diff: no behavior change found; it checked $? after the assignment in headings_or_die, the trimmed/matches globals, that the awk parameter is local, that the 8 rewritten proc_problem and 2 die_ungradeable messages are byte-identical, and the env.CI truth…
  • git-read diff --numstat HEAD: 2 tracked files (+53/-64) plus 1 new fragment; only the listed files and a changelog fragment are touched
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42795318451

Left out: the items under Not verified.

Related

#14673

Merge-Risk: max=MEDIUM demote=false head=5db5a687cf463618c531011169cc662c8d69fa93 rubric=8.3.3 rater=claude-opus-5-5 checker=claude-opus-5-5

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

Copy link
Copy Markdown
Contributor

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

Security review: PR #15075 (refactor(planning): simplify check-open-questions.sh and build-view.mjs)

I found no security issues. This was a full review: I read every hunk of the 3 changed files. This lane had not reviewed an earlier head, so this was not a blocking-only review. None of the changed files is on a trusted path, and the diff doesn't touch any trust control, merge hold, plugin manifest or standing instruction.

What I checked

  • plugins/planning/scripts/build-view.mjs, interactive: !env.CI || env.CI === "false" is the De Morgan form of !(Boolean(env.CI) && env.CI !== "false") and gives the same result for every value of env.CI. The value goes to resolveMedium, which decides whether a publishing medium may come from an interactive choice. Since the result is unchanged, CI runs get no new publishing path.
  • build-view.mjs, --out: the new code tests !out where the old code tested !has("--out"). The two only differ when --out is an empty string or has no value. The flagsOk check at build-view.mjs#L120 (typeof value === "string" && (value !== "" || key === "--option")) already rejects both cases before this code runs. The bridgeOutProblem check still runs first. The defense against a planted link or file is unchanged: it refuses a directory, then runs rmSync, then writes with wx and mode 0600.
  • plugins/planning/scripts/check-open-questions.sh:
    • The squash() awk helper does the same gsub/sub steps as the three inline copies it replaces. Its parameter is local to the function.
    • headings_or_die reads $? straight after matches="$(heading_matches …)", which gives the exit status of the command substitution. It keeps the same exit-4 and other-failure branches and the same messages, so the check still refuses on bad input.
    • trim_into and proc_problem (L405–L410) do the same work as the inline code they replace.
    • The one new pattern built from a variable, ^#+[[:space:]]+${section_pattern}…, uses the same fixed section_patterns values as before.
    • No new input reaches a shell or awk program as code.
  • .changes/planning/…md: a changelog fragment with no code in it.

The PR context contains no embedded instructions aimed at this lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of the 3 changed files, plus the unchanged code the changed lines call. Behavior stays the same in each spot I checked:

  • build-view.mjs
    • !env.CI || env.CI === "false" gives the same result as !(Boolean(env.CI) && env.CI !== "false") for every value of env.CI, including unset and empty.
    • if (!out) behaves the same as if (!has("--out")). The flagsOk check at build-view.mjs#L120 already rejects an empty --out value, so out is only empty when the flag is missing.
  • check-open-questions.sh
    • The script runs set -uo pipefail without -e. In headings_or_die, $? after matches="$(...)" is the exit code of heading_matches, and die_ungradeable exits from the top-level shell.
    • No other code uses the global matches.
    • squash() keeps the same order of steps as the three copies it replaces, including the tolower and # removal before it in heading_texts. Its parameter s is local, and the function name doesn't clash with fence_awk.
    • trim_into and proc_problem (L405-L410) trim the same [:space:] class and add the same trailing newline as the inline code they replace. The 8 messages that now go through proc_problem and the 2 die_ungradeable messages are byte-identical to before.
  • Changelog fragment: bump: patch, body ### Changed with "Internal simplification, no behavior change.", as issue Simplify the scripts planning plugin code #14673 asks.

Issue #14673 acceptance criteria:

  • Behavior unchanged: met, as far as I can tell from reading the code. The existing check-open-questions.test.sh and build-view.test.sh suites cover these paths. The PR says it didn't run them and leaves that to CI. I couldn't run them either, so that part is unverified.
  • Only listed files and a fragment edited: met.
  • Size limits: met, at about +53/-64 lines over 2 files plus the fragment.
  • ci-status green: for CI to decide. The author's verification claims are their own and unverified.
  • Fragment format: met.

No plugin manifest changed and the PR text contains no embedded instructions. The PR touches no trusted paths and adds no new spend.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 5db5a687cf463618c531011169cc662c8d69fa93, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 5db5a68

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15075-5db5a687cf463618c531011169cc662c8d69fa93, expires on 2026-12-10.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 93fb78d Nov 10, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14673-42795318451-1 branch November 10, 2026 11:22
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 5db5a687cf463618c531011169cc662c8d69fa93. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound: no-run;
  evidence-unbound:claude-security-review: not bound: no-run)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 93fb78dee62d3e04dbf6e50fb15aececd7983bb9; later checks count it verified from this comment.

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 scripts planning plugin code

0 participants