Skip to content

refactor(harness-config): simplify audit-engine.sh part 1 without behavior change - #15486

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14501-43134706701-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14501-43134706701-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14501

Summary

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

Simplified the first half (lines 1-1314) of plugins/harness-config/skills/audit/scripts/audit-engine.sh with no change in behavior. Two read-into-array loops over unsupplied's output became mapfile -t (bash 4.3+ is already required by local -n and declare -A, and a sibling script in the same skill already uses mapfile). The four undocumented-key row calls that differed only in severity and detail now build sev and detail first and make one row call, so the consent-receipt tail is written once. MCP_OK now sits next to the other scope flags it matches. A fourth change, reading the fallbackModel presence from the FACT cache instead of a separate jq call, was reverted after review: a scope file holding several top-level JSON values passes the validity probe, and the two reads disagree on it.

Not verified

  • The audit-engine test suite (and any bats/shell tests of the audit skill) was not executed: the lane runs only the named wrappers, so it is left to the PR's CI
  • shellcheck/shfmt over audit-engine.sh not run here (no wrapper for it); left to the PR's CI
  • tidy pass 5 (ai-slop): detect.sh could not run since the lane allows only the named wrappers; the one-line fragment was read against the rubric by hand and needed no fix
  • cant-fail-scan wrapper not applicable: the change edits no test file
  • Proposal, not applied: the fallbackModel check (now line ~996) could read FACT[<file>:has_fallback] as the H check already does, saving up to three jq processes, but that changes which linked pages are fetched for a scope file holding several top-level JSON values; it belongs to a…
  • Untracked runner dotfiles (.bashrc, .gitconfig, .mcp.json, .idea, .vscode and others) in the checkout root are environment artifacts, not part of this change

Fix

  • plugins/harness-config/skills/audit/scripts/audit-engine.sh: MCP_OK moved beside PROJECT_OK/LOCAL_OK/USER_OK; the DOCS_WANT and linked_fetch read loops replaced with mapfile -t; the four undocumented-key row calls merged into one row call with sev and detail chosen per branch (detail text unchanged…
  • .changes/harness-config/work-resolve-issue-issue-14501-43134706701-1-a2d9a64f.md: new patch fragment, ### Changed, "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 0f3f717:

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

The run reports:

  • check-changelog-fragments: all 7 fragments valid
  • check-changed-skills: plugins/harness-config/skills/audit PASS, 0 errors, 7 pre-existing warnings (none from this diff)
  • check-affected: 13 passed, 6 skipped over 2 changed files
  • fresh-context review subagent over the diff: confirmed the mapfile, row-merge and MCP_OK edits equivalent (byte-identical detail strings, no leaked globals: sev and detail are assigned before every later read and are local in row, cr_note had no other reader); flagged the FACT-based fallbackModel…
  • git-read diff --stat HEAD: 1 code file, 10 insertions, 11 deletions; every edit sits in lines 1-1314 (range 1 of 2)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43134706701

Left out: the items under Not verified.

Related

#14501

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

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

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found. (Blocking only: this lane already reviewed an earlier head, 0f3f717.)

I read every hunk of both changed files. Neither one matches a trusted-path glob. The new head f16e82a8 merges main into the branch. The pull request's own diff is the same as at the head reviewed before.

  • .changes/harness-config/...a2d9a64f.md: a new patch changelog fragment. It is prose only.
  • plugins/harness-config/skills/audit/scripts/audit-engine.sh: a refactor of the local audit script with no change in behavior. It adds no new inputs, network calls, file paths, or eval/exec surface.
    • MCP_OK: moved up beside the other scope flags. It is still read from SCOPE_STATE[mcp] in the same way, and nothing between the old and new position reads it.
    • Read loops: two while read loops became mapfile -t over the same unsupplied process substitution. The arrays end up with the same contents, and no data reaches a shell command unquoted.
    • row calls: four row A key-documented finding calls became one. It takes sev/detail, which are set again at the start of every loop iteration. Each argument is still passed to row quoted, and nothing is evaluated.

Lenses that did not apply:

  • No standing instruction changes, so the instruction-surface lens has nothing to check.
  • No trust control, merge hold, token scope or kill switch changes.
  • No plugin manifest changes.
  • No workflow or Actions file changes.

PR context: it contains no text telling the lane to pass the PR, skip a check or drop a finding.

Prior findings: the lane's one earlier post was a summary with no findings, so nothing is carried forward.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: no blocking findings. This lane already reviewed an earlier head (0f3f717), so this pass only looked for blocking issues.

The new head f16e82a is a merge from main. The PR's own diff hasn't changed since the last review: the same 2 files with the same hunks. I read both in full and checked the edits against the code at the new head:

  • MCP_OK move (L561-562): SCOPE_STATE[mcp] is already set when this line runs (the case at L549), and load_facts (L588-595) never reads MCP_OK. Same result as before.
  • mapfile -t (L799, L1010): unsupplied (L792-797) is unchanged by the merge. It still ends every slug with a newline, so the array is identical to the old while read loop's, including when there is no output.
  • Merged undocumented-key row call (L1298-1309):
    • The severity and detail text in each branch are byte-identical to the base version.
    • The consent-receipt tail is now added at the row call. CR_WHY can't change before then, because the only call inside the branches (bin_describe) runs in a $(...) subshell.

Closing issue #14501: my earlier review found the acceptance criteria met: behavior unchanged, only the listed file plus a fragment, size limits, the fragment's form, and range 1 of 2. They still hold, because the PR's diff is unchanged. "ci-status is green" can't be checked from this lane and is left to CI. The author says their checks passed; I didn't run them, so that's unverified.

No .claude/rules/ path rules, plugin manifests, paved-path entries or trusted paths are touched. The PR context contains no embedded instructions.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Verification evidence for f16e82a

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-15486-f16e82a8290e26f53ca57b16b4c777b6fdd45529, expires on 2026-12-12.

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 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 12, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 12, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head f16e82a8290e26f53ca57b16b4c777b6fdd45529. 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 f16e82a8290e26f53ca57b16b4c777b6fdd45529, the head its arming checks judged.

@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 69fdcca Nov 12, 2026
62 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14501-43134706701-1 branch November 12, 2026 05:10
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/harness-config/skills/audit/scripts/audit-engine.sh 6 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-config/skills/audit/scripts/audit-engine.sh:1300 SBR productive no-assertion

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 69fdcca8b10e2a65869baa1ef7d2891f102e1c37; 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 audit-engine.sh harness-config plugin code (part 1 of 2)

1 participant