Skip to content

refactor(harness-config): simplify audit-instructions conflict-scan, emit-findings and finding-ids - #15522

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14495-43145502345-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14495-43145502345-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #14495

Summary

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

Behavior-preserving simplification of the three audit-instructions scripts. emit-findings.sh folds its six value options into one branch, writes lane_rule as a single regex (/^I3[0-3]$/, the same answer on every id the intake admits) and builds the Ran line's two strings in one pair of conditionals. finding-ids.sh resolves ROOT, HOME_P and CONFIG_P through one physical_dir helper. conflict-scan.sh tests --help with an if in place of a case and shortens a comment that narrated an old bug. A fresh-context review found two refactors that changed edge-case behavior: a /dev/stdin redirect in finding-ids.sh and a SUBSEP split of the repo roots in emit-findings.sh. Both are reverted.

Not verified

  • The .test.sh suites (emit-findings.test.sh, finding-ids.test.sh, conflict-scan.test.sh) were not run directly: this lane runs only the named wrappers, and check-affected's output does not list which suites it ran. Left to the PR's CI.
  • Behavior equivalence was checked by reading the code and by an independent review, not by running old and new versions side by side.
  • Tidy pass 5 (/ai-slop:audit fix) could not run its detector because the lane's Bash allowlist excludes it. I read the 7-line fragment against the rubric by hand and found nothing; its text is fixed word for word by the issue.
  • Not run here (no tool in this lane): build and lint beyond check-affected's shellcheck, and the eval suites. Left to the PR's CI.
  • ci-status green is a PR CI check, left to the PR's CI.
  • Known, not changed: physical_dir drops the old '|| X=""' fallback, which only mattered if a CDPATH-resolved cd printed a path and pwd -P then failed. The reviewer judged this not a practical difference.

Fix

  • plugins/harness-config/skills/audit-instructions/scripts/emit-findings.sh: one case branch for the six value options; lane_rule as a regex; the Ran-line how/ranids strings built together
  • plugins/harness-config/skills/audit-instructions/scripts/finding-ids.sh: physical_dir helper replaces three copies of the cd-then-pwd -P block
  • plugins/harness-config/skills/audit-instructions/scripts/conflict-scan.sh: --help tested with an if; COORD_ERE comment keeps its reason and drops the bug history
  • .changes/harness-config/work-resolve-issue-issue-14495-43145502345-1-c16f9595.md: patch fragment, ### Changed, "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 36e2496:

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

The run reports:

  • check-changelog-fragments: all 17 fragments valid
  • check-changed-skills: audit-instructions PASS, 0 errors, 4 warnings that predate this change (description length, body size)
  • check-affected: first run failed shellcheck SC2249 (no default branch in the new inner case); added *) ;; and it then reported 13 passed, 6 skipped
  • fresh-context review subagent: found two behavior differences, both reverted (finding-ids.sh input redirect to /dev/stdin: an unreadable FILE, closed stdin or socket stdin exits 1 where the old code exited 0, and partly-read stdin was reread from byte 0; emit-findings.sh SUBSEP split: a repo root…
  • re-ran all three checks after the review fixes: all pass
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43145502345

Left out: the items under Not verified.

Related

#14495

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 535112c433903e8cb4c46be71547ff16b234c7c7: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15522

Blocking only. This lane already reviewed an earlier head (36e2496c71), so this pass reports only CRITICAL and IMPORTANT findings. The new head 535112c4 is a merge from main. The PR diff is the same four-file change as before.

I read every hunk of all 4 changed files. None of them matches a trusted-path glob. The diff touches no plugin manifest, workflow, token, kill switch, merge hold or other trust control.

No security issues found.

  • conflict-scan.sh: the --help test moves from case to an if and behaves the same. The COORD_ERE comment gets shorter, but the regex it describes is unchanged. This is a comment inside a script, not a standing instruction, so the instruction-surface lens does not apply.
  • emit-findings.sh:
    • The six value options now share one branch. Each one still calls require_opt_value before it reads $2, and still shifts by 2.
    • lane_rule is now the anchored regex /^I3[0-3]$/. It accepts exactly I30 to I33, the same set as the old equality chain.
    • The Ran-line how/ranids strings are built in the same order with the same values.
    • The change adds no shell interpolation of option values.
  • finding-ids.sh: the new physical_dir helper runs inside a command substitution, so its cd stays in a subshell. It returns empty when a directory is unset or unreachable, as the old blocks did. The resulting values only decide which local paths count as instruction files. The errexit point on this file is a settled thread (owner reply, lines changed since resolution: no), and I did not raise it again.
  • Changelog fragment: a patch-bump note only.

The PR context file has no embedded text aimed at the review lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #15522

No blocking findings. I read every hunk in all 4 changed files. This lane already reviewed an earlier head (blocking only: yes), so this pass looked for blocking findings only.

How the changes compare with the old code. I checked this by reading the code. I did not run anything.

  • conflict-scan.sh: --help is now tested with an if instead of a case and gives the same result for -h and --help. The comment edit changes no code.
  • emit-findings.sh, option parsing: the six value options now share one branch that calls require_opt_value "$@" and then sets the matching variable before shift 2. Error text, exit codes and assignments are the same as before.
  • emit-findings.sh, lane_rule: awk's id ~ /^I3[0-3]$/ is anchored at both ends, so it matches exactly I30 through I33, the same set the old == chain did.
  • emit-findings.sh, Ran line: how and ranids are now built in the same two conditionals. ran still uses only how, and the order of ranids (I28/I29 first, then I30–I33) is unchanged.
  • finding-ids.sh: physical_dir skips an empty argument just like the old -n guards did. For the config directory it receives ${CLAUDE_CONFIG_DIR:-${HOME:+$HOME/.claude}}. That gives the same path as the old test-then-cd pair whenever the old guard let the block run, and empty otherwise. The function now always returns 0, and its output is unchanged.

Issue #14495 criteria:

  • Behavior unchanged: holds, based on reading the code. The .test.sh suites were not run here, and the PR says it did not run them directly either. That is the author's claim and I have not verified it. The suites are left to CI.
  • Only listed files plus a fragment: met.
  • Size limit: met; the change is well under 400 lines.
  • Fragment: met. It has bump: patch, ### Changed and the required line word for word.
  • ci-status green: CI's job, not checked here.

Settled and prior items:

  • The settled thread on finding-ids.sh (lines changed since resolution: no) is not raised again.
  • This lane's only earlier post was a no-findings summary, so nothing repeats.

Other checks:

  • No plugin manifest changed.
  • No changed file matches a TRUSTED PATHS glob.
  • The PR context and settled-thread text contain no instructions aimed at this lane.

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 95a5e886fad3a325646bddcfca9577740788d67e. 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:earlier-fail)

kyle-sexton and others added 2 commits November 12, 2026 10:07
…ng directory

physical_dir now ends in `|| true`, so an empty or unreachable directory
yields an empty value with status 0, as the base's `|| X=""` guards did.
Output and exit codes match the base under plain bash and under bash -e.

Refs: #14495

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 535112c

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-15522-535112c433903e8cb4c46be71547ff16b234c7c7, 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=535112c433903e8cb4c46be71547ff16b234c7c7 rubric=8.4.11 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 53910ca Nov 12, 2026
47 of 48 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14495-43145502345-1 branch November 12, 2026 16:57
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 53910ca12515b30c22c131b1ee38878bc7eb3019; 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-instructions harness-config plugin code (1 of 2)

1 participant