Skip to content

refactor(testing): define the audit engines' trim once in mask-js.awk - #15640

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15635-43277187306-1
Nov 12, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15635

Summary

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

The one-line awk trim that cant-fail-scan.awk, retry-config-scan.awk and runner-config-scan.awk each defined now lives once, at the end of mask-js.awk, and the three engines no longer define it. Every awk program that loads one of the engines loads mask-js.awk first (cant-fail-scan.sh:681, 832, 977, 1074 and parity-check.sh:81), so each program still sees exactly one trim. The mask-js.awk header now says the file holds functions only, with no BEGIN or main block, and keeps its reason (it composes with any engine that loads it). No new awk file, so no load site changed. A testing patch fragment records it as internal restructuring.

Not verified

  • plugins/testing/skills/audit/scripts/cant-fail-scan.test.sh was not run: this lane's Bash runs only the named wrappers. Left to the PR's CI.
  • parity-check.sh <base-sha> was not run, for the same reason. Left to the PR's CI.
  • runner-config-scan.awk was not exercised live: the repo has no Playwright config, so the scanner's config rules did not apply. cant-fail-scan.test.sh's Playwright cases cover it in CI.
  • ci-status green is a PR check, left to the PR's CI.
  • Tidy ran every pass, but pass 5 ran as a manual rubric read: ai-slop's detect.sh is not a wrapper this lane may run. It found no tells and made no edits.
  • No linter applies to awk here, and check-affected skipped typos because it is not installed.

Fix

  • plugins/testing/skills/audit/scripts/mask-js.awk: adds function trim(s), byte-identical to the removed copies, after mask_js; the header at lines 2-3 now reads 'Functions only. No BEGIN block and no main block, so it composes with any engine that loads it.'
  • plugins/testing/skills/audit/scripts/cant-fail-scan.awk: removes its trim definition (old line 1075)
  • plugins/testing/skills/audit/scripts/retry-config-scan.awk: removes its trim definition (old line 87)
  • plugins/testing/skills/audit/scripts/runner-config-scan.awk: removes its trim definition (old line 250)
  • .changes/testing/work-resolve-issue-issue-15635-43277187306-1-59124d01.md: new patch fragment, '### Changed', 'Internal restructuring, no behavior change.'

Verification

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

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

The run reports:

  • Grep for function trim under plugins/testing: only mask-js.awk:91 matches
  • Grep for every awk load of the three engines (cant-fail-scan.sh:681, 832, 977, 1074; parity-check.sh:81): every one loads mask-js.awk first; no shell script defines its own trim
  • cant-fail-scan wrapper, --count over the whole repo: exit 0; 2347 test files examined with 0 engine error lines, and 5 vitest configs went through retry-config-scan.awk with no errors, so the cant-fail and retry engines both load and call the shared trim
  • check-changelog-fragments: all 4 fragments valid (run before and after tidy)
  • check-changed-skills: PASS for plugins/testing/skills/audit, 0 errors, 4 existing size warnings unrelated to this change (run before and after tidy)
  • check-affected: 12 passed, 7 skipped, 0 failed over 5 changed files (run before and after tidy)
  • Fresh-context review subagent over the whole diff: no findings. It confirmed every engine load includes mask-js.awk, there is no duplicate trim (parity-check's dump.awk defines only pick), no test, check or line citation depends on the removed lines or the old header, and the moved definition…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43277187306

Left out: the items under Not verified.

Related

#15635

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

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This change moves the one-line awk trim out of the three audit engines (cant-fail-scan.awk, retry-config-scan.awk, runner-config-scan.awk) and defines it once, at the end of mask-js.awk. It also rewords the mask-js.awk header and adds a patch changelog fragment. I read all 5 changed files in full.

What I checked (by reading code; I ran nothing myself):

  • Every program that loads an engine also loads mask-js.awk. That holds at cant-fail-scan.sh:681, :832 (cant-fail engine), :977 (CONFIG_AWK, runner-config) and :1074 (RETRY_AWK), and at parity-check.sh:81. So each program still has exactly one trim. A grep for function trim across the plugin's awk and shell files finds only mask-js.awk:91. The trim() at lib/resolve-convention-home.sh:261 is a separate bash function.
  • parity-check.sh stays consistent. It loads mask-js.awk and cant-fail-scan.awk from the same directory, base or head. The base pair has trim only in the engine and the head pair has it only in mask-js.awk, so neither side defines it twice. Its dump.awk defines only pick.
  • The frozen judge-calibration copy is never loaded. Nothing in the repository references cant-fail-scan.awk.fixture, so it is never loaded next to the head mask-js.awk, and the clash it could cause (trim defined twice) cannot happen.
  • The moved function is unchanged. The new definition in mask-js.awk is byte-identical to the three removed copies. awk resolves functions across the joined -f programs, so their position in the file does not matter.

Closing issue #15635, acceptance criteria:

  • "trim is defined once, in mask-js.awk, and none of the three engines defines it": met. If the shared trim were dropped, every engine call to it would fail with an awk error, and cant-fail-scan.test.sh would catch that through the driver.
  • "Behavior is unchanged": met by inspection, since the function is identical and only its location moved.
  • "The diff edits only the listed files": met. Exactly the 4 listed awk files and one .changes/testing/ fragment changed.
  • "Within 400 changed lines and 15 files": met (5 files, about 10 lines).
  • "cant-fail-scan.test.sh passes" and "parity-check.sh <base-sha> exits 0": the author says CI runs these. I did not run them, so they are unverified here.
  • "ci-status is green": left to CI, unverified.

Changelog fragment: bump: patch with "Internal restructuring, no behavior change." is the right level for a refactor with no behavior change. No plugin manifest changed.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #15640

No security issues found.

I read every hunk of all 5 changed files. The PR moves one helper, trim(s), out of three awk engines and into one shared file:

  • Where it went: the copies in cant-fail-scan.awk, retry-config-scan.awk and runner-config-scan.awk are removed. One copy, identical to the removed ones, is added at the end of mask-js.awk.
  • Header comment: mask-js.awk now says "Functions only" in place of "Function only … no helpers".
  • Changelog: a new patch fragment, .changes/testing/..., records the change as internal restructuring.

Why there is nothing to report:

  • No new reachable surface. The change adds no new input handling, no shell or subprocess call, no file or path handling and no network access. The function body is unchanged, so behaviour is the same.
  • Not a removed guardrail. The header edit only describes what the file contains. It does not delete or soften any instruction, so the instruction-surface check does not apply.
  • No trust controls touched. No trusted path, workflow, token request, merge hold, kill switch or plugin manifest is changed.
  • Not a security concern either way: if an engine were ever loaded without mask-js.awk, awk would fail with an undefined-function error. That is a correctness question, not a security one, and the PR says every load site loads mask-js.awk first.

Embedded text: I found no directive in the PR context aimed at this review.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for e63855a

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-15640-e63855ace4009870b62c95532c3481ef8c2330b3, expires on 2026-12-12.

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=e63855ace4009870b62c95532c3481ef8c2330b3 rubric=8.4.12 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 42f7a8a Nov 12, 2026
52 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15635-43277187306-1 branch November 12, 2026 18:42
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 42f7a8acf6b3adf51a534c5e121b8f20af2f820e; 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.

Move the testing audit engines' trim into mask-js.awk

0 participants