Skip to content

fix(harness-config): align audit-permission-grants P3 wording with 2.1.323 and document the 2.1.325 --plugin-dir - #17922

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-17914-44896928811-1
Nov 21, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17914

Summary

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

The P3 header comment, scan comment and warning message in permission-rule-check.sh, and evals.json case 4's expected_output, now say what docs/contracts/permission-rule-hygiene/README.md:166-173 says: in a plugin settings.json only the deprecated agent key takes effect (2.1.323 removed subagentStatusLine), so a permissions block is inert. The inert-permissions verdict and the detector's behavior are unchanged. For 2.1.325's change to nested skills in --plugin-dir plugins, I took the issue's second option: criteria.md explains that whether a plugin root was passed to --plugin-dir is a launch flag the tree does not record. Without the flag the same directory's nested skills do load, so the detector keeps auditing them and over-reports in the safe direction. Excluding every nested .claude/skills under a manifest-holding root would under-report on the error-tier checks. A new fixture test (Case 6f3) pins that behavior.

Not verified

  • permission-rule-check.test.sh was not executed: the lane allows no interpreter or test runner. The new Case 6f3 and Case 14g assertions were only traced by reading the code. Left to the PR's CI.
  • comment-lint is CI only (pull request). The edited comment lines in permission-rule-check.sh and the new Case 6f3 header in the test each carry an https link, which the lint's necessary posture accepts, but the lint was not run here.
  • Tidy: passes 1-4 ran (no code edit; one wording edit in the changelog fragment, which now names reference/criteria.md). Pass 5 (ai-slop:audit fix) did not run its detector or semantic-diff verifier, since the lane's Bash runs only the named wrappers. The listed lines were read by hand against the…
  • The skills page section on discovery from parent and nested directories still names no --plugin-dir exception (docs lag), so criteria.md cites the 2.1.325 changelog entry and sets a recheck trigger on that page.

Fix

  • plugins/harness-config/skills/audit-permission-grants/scripts/permission-rule-check.sh: P3 header comment (:22-27), P3 scan comment (:791-794) and the P3 warning message (:807) now say only the deprecated agent key takes effect and that 2.1.323 removed subagentStatusLine, with the changelog…
  • plugins/harness-config/skills/audit-permission-grants/scripts/permission-rule-check.test.sh: new Case 6f3 fixture (a nested .claude/skills inside a plugin root below the scan root stays audited: finding present, 0 excluded, --count 2); Case 14g asserts the new P3 wording.
  • plugins/harness-config/skills/audit-permission-grants/evals/evals.json: case 4 (operator-setup-boundary) expected_output says only the deprecated agent key takes effect in a plugin settings.json, so a permissions block there is inert.
  • plugins/harness-config/skills/audit-permission-grants/reference/criteria.md: new paragraph citing changelog 2.1.325. It explains why the detector cannot tell a --plugin-dir root apart and keeps the over-report, with an as-of date and a recheck trigger.
  • .changes/harness-config/work-resolve-issue-issue-17914-44896928811-1-10a83153.md: patch changelog fragment (### Fixed).

Verification

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

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

The run reports:

  • read https: //code.claude.com/docs/en/changelog: 2.1.323 'Deprecated a plugin's agent setting: it still applies, and now warns at startup...' and 'Removed the subagentStatusLine setting'; 2.1.325 'Changed nested skill loading: .claude/skills folders in --plugin-dir plugins no longer load…
  • check-changelog-fragments: first run failed (fragment had no ### section); fixed by adding ### Fixed; rerun: all 7 fragments valid.
  • check-changed-skills: audit-permission-grants PASS, 0 errors, 5 warnings that predate this change (description length, body length, no Gotchas, criteria.md TOC, procedure completion criteria).
  • check-affected: 15 passed, 8 skipped (typos not installed; comment-hygiene and size-check could not run in the lane; validate-plugins sub-checks and changed-skills skipped as tree-executing), 0 failed.
  • check-evals-quality on audit-permission-grants/evals/evals.json: PASS, 5 Q4 path-token warnings that predate this change.
  • Local review: a fresh-context subagent read the whole diff and found no correctness bugs. It traced Case 6f3's three assertions and the Case 14g substring through frontmatter_is_loadable, the coverage printf and the emit format, and found no remaining test or eval that asserts the old…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44896928811

Left out: the items under Not verified.

Related

#17914

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 0e91b9eb28155db0d70d29265c0c4e59856f164e. 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)

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #17922

No security issues found. I read the whole diff for all 5 changed files.

What the change does:

  • permission-rule-check.sh: only the P3 header comment, the scan comment and the warning text change. The new text says that in a plugin settings.json only the deprecated agent key takes effect, and that 2.1.323 removed subagentStatusLine. The detection logic is unchanged: jq -e 'has("permissions")', the manifest find and the emit tier are all the same.
  • permission-rule-check.test.sh: adds a Case 6f3 fixture. It checks that a nested .claude/skills inside a plugin root is still audited. It also adds a Case 14g assertion for the new P3 wording. Both write only to the test's temp directory.
  • evals.json: case 4's expected_output gets the same wording change. The eval still expects the skill to refuse to self-grant and to send the rule to the operator's user-global settings.
  • reference/criteria.md: adds a paragraph explaining why the detector keeps auditing a nested .claude/skills/ under a plugin root. This keeps coverage broader (it over-reports); it narrows nothing.
  • Changelog fragment: text only.

Instruction-surface lens: no standing instruction is deleted, narrowed or softened. The P3 guidance still says a plugin cannot grant itself permissions and that the operator must add the allow-rule. The criteria change keeps the audit scope as wide as before. No trust control, merge hold, plugin manifest or workflow is touched, and none of the files match a TRUSTED PATHS glob.

PR context: I found no embedded instructions aimed at the review lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings.

This PR updates the P3 wording in /harness-config:audit-permission-grants. A plugin settings.json now takes effect only for the deprecated agent key, because 2.1.323 removed subagentStatusLine. The PR also explains in criteria.md why a nested .claude/skills/ inside a plugin root stays audited after 2.1.325, and adds fixture Case 6f3.

I read all 5 changed files in full, plus the code they rely on:

  • the frontmatter_is_loadable function in permission-rule-check.sh
  • Cases 6b through 6f2 in the test file
  • the surrounding section of criteria.md

Closing issue #17914, criteria checked:

  • ":23, :791 and the :804 P3 message match the wording at docs/contracts/permission-rule-hygiene/README.md:166-173 … and the script's tests still pass": Met. All three places say only the deprecated agent key takes effect and that 2.1.323 removed subagentStatusLine. The new Case 14g assertion fails if the warning text drifts. No other copy of subagentStatusLine remains in the plugin outside the corrected lines. I ran no tests (this lane has no shell); the author says the tests were not run either and leaves them to CI.
  • "evals.json:44 expected_output matches …": Met. Case 4's expected_output now says only the deprecated agent key takes effect and that a permissions block is inert.
  • "criteria.md … says why the script cannot tell a --plugin-dir root apart and keeps the over-report": Met. The new paragraph explains that --plugin-dir is a launch flag the files on disk do not record, cites the 2.1.325 changelog, and sets an as-of date and a recheck trigger.
  • "A fixture test covers whichever case the change takes": Met. I traced Case 6f3 by reading the code:
    • Its path tools/.claude/skills/inner/SKILL.md matches the nested .claude/skills branch of frontmatter_is_loadable. It is not under the user plugins directory, because run points HOME at the isolated fixture home, so it is audited.
    • tools/skills/deploy/SKILL.md is admitted through the manifest check.
    • So --count gives 2 and the coverage block prints 0 excluded as non-loadable, which is what the case asserts.

No plugin manifest changed, so there are no manifest lines. The changelog fragment's bump: patch fits a wording and documentation fix. Loosened checks would be marked: fail (default; the wrapper supplied no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. No decision-record line was supplied, so the citation requirement was not checked. No check is relaxed: the diff only adds assertions.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 0e91b9eb28155db0d70d29265c0c4e59856f164e, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=0e91b9eb28155db0d70d29265c0c4e59856f164e rubric=10.4.4 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 21, 2026
Merged via the queue into main with commit 3ec3237 Nov 21, 2026
49 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17914-44896928811-1 branch November 21, 2026 11:33
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

harness-config: permission-rule-check and its evals match the 2.1.323 plugin settings keys and 2.1.325 --plugin-dir nested skills

0 participants