Skip to content

fix(harness-config): match the eight-class auto-mode drop list and 2.1.327 runner forms - #18039

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-17902-44944202183-1
Nov 21, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17902

Summary

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

The shared auto-mode drop patterns in plugins/harness-config/lib/permission-patterns.sh now match path-prefixed and version package-runner rules (changelog 2.1.327). They gain three new patterns for the classes the permission-modes page added: a process wrapper followed only by a wildcard, shell rules that start with a wildcard, and the two wildcarded-path forms the page names ($HOME-led rules, and Windows backslash programs other than .\ paths). Design choices and their basis: (1) The wrapper class is Bash-only and uses the wrapper list from the permissions page's process-wrappers section, which strips them from Bash rules. (2) The page says only 'some wildcarded paths', so just the two named forms are matched and the lib comment says why the others are left out. (3) The new classes join the CCPERM_P1_ERE union, so audit-permission-grants P1 flags them, and the entry diff reports them as wrapper-wildcard, leading-wildcard and path-wildcard. The audit-permission-state criteria, SKILL.md, the P1 criteria and the permission-rule-hygiene contract (Anti-pattern 1 re-quoted with a 2026-11-21 fetch, a changelog 2.1.327 citation, and a per-class P1 scope table) now agree with what the patterns match. The contract's Known gap section no longer calls the leading-wildcard wrapper candidate untested, because the page now lists leading-wildcard rules as dropped.

Not verified

  • The changed test suites (permission-patterns.test.sh, permission-rule-check.test.sh, automode-entry-diff.test.sh) could not be run here because the lane allows no interpreter. Expected values were checked by hand and by the review subagent; running them is left to the PR's CI.
  • Tidy skipped: the change spans 12 files and 2 areas (plugins/harness-config, docs/contracts), over the 10-file and 1-area tidy cutoffs.
  • check-affected skipped comment-hygiene (its fetch was denied by the network sandbox), size-check (script missing), typos (not installed), and validate-plugins sub-checks and changed-skills that run code from the checked tree; the comment-lint check is CI-only.
  • Edge cases upstream does not settle, left unmatched or as written: Bash(timeout*) with no separator, PowerShell(& 'C:\x.exe' *) with a call operator, ${HOME}-led and POSIX absolute wildcarded paths, and UNC paths. ..\ paths are flagged as Windows backslash paths.

Fix

  • plugins/harness-config/lib/permission-patterns.sh: runner ERE takes a path prefix and version suffix; new CCPERM_WRAPPER_BODY, CCPERM_P1_WRAPPER_ERE, CCPERM_P1_LEADING_ERE, CCPERM_P1_PATH_ERE added to the CCPERM_P1_ERE union; header comment lists the eight classes and names the path forms left out…
  • plugins/harness-config/lib/permission-patterns.test.sh: one matched and one narrow unmatched case per new form (path and version runners, wrapper, leading wildcard, $HOME path, Windows backslash path, .\ path, YAML-escaped quoted bundled path); Bash(npm test) still asserted unmatched
  • plugins/harness-config/skills/audit-permission-state/scripts/automode-entry-diff.sh: header quotes the current eight-class list; new drop classes wrapper-wildcard, leading-wildcard, path-wildcard
  • plugins/harness-config/skills/audit-permission-state/scripts/automode-entry-diff.test.sh: new case with each new class and runner form dropped, each with a narrow counterpart kept, plus a summary count
  • plugins/harness-config/skills/audit-permission-state/reference/criteria.md: entry-diff section states the current dropped classes, cites changelog 2.1.327 for the runner widening, notes the path forms left out; As-of 2026-11-21; class list is now eight
  • plugins/harness-config/skills/audit-permission-state/SKILL.md: class list names the eight classes
  • plugins/harness-config/skills/audit-permission-grants/scripts/permission-rule-check.sh: P1 header comment and finding message name the new shapes
  • plugins/harness-config/skills/audit-permission-grants/scripts/permission-rule-check.test.sh: P1 case flags the new forms; narrow case adds their narrow counterparts; P2 case count 2 -> 3 because the Windows machine-path rule Bash(C:\Users\bob\x.sh:*) is also a wildcarded backslash-path program
  • plugins/harness-config/skills/audit-permission-grants/reference/criteria.md: P1 What/Why list the new shapes and the 2.1.327 forms; As-of 2026-11-21
  • docs/contracts/permission-rule-hygiene/README.md: Anti-pattern 1 quotes the current eight-class list (re-fetched 2026-11-21), cites changelog 2.1.327, adds a per-class P1 scope table; Known gap rejects the leading-wildcard wrapper candidate
  • docs/contracts/permission-rule-hygiene/CHANGELOG.md: 1.7.0 entry
  • .changes/harness-config/work-resolve-issue-issue-17902-44944202183-1-d56c3c40.md: minor changelog fragment

Verification

The runner ran each check from the base copy against 54865bb:

  • 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/permission-modes: 'How the classifier evaluates actions' lists eight dropped classes: blanket Bash()/PowerShell(), wildcarded interpreters, a wrapper followed only by a wildcard (Bash(timeout )), shell rules that start with a wildcard (Bash( --version)),…
  • read https: //code.claude.com/docs/en/permissions: process wrappers stripped before matching Bash rules are timeout, time, nice, nohup, stdbuf, command, builtin, noglob
  • read https: //code.claude.com/docs/en/changelog: 2.1.327 'Changed auto mode to ignore more allow rules that run any package, like Bash(pnpm dlx ), and path or version forms of ones it already ignored (/usr/bin/npm run:)' and fixed auto mode ignoring wildcard PowerShell rules naming a .\ script;…
  • check-affected: 15 passed, 8 skipped, 0 failed (shellcheck and shell-portability failed on the first run and were fixed)
  • check-changelog-fragments: all 7 fragments valid
  • check-changed-skills: audit-permission-grants and audit-permission-state PASS, 0 errors (warnings were already there, except a 1-line SKILL.md body growth, which was fixed by reflowing)
  • fresh-context review subagent: found that CCPERM_P1_PATH_ERE matched YAML-escaped quoted bundled-path frontmatter rules (Bash("${CLAUDE_SKILL_DIR}/x.sh":*)) in 12 skills, plus two stale doc lines; all three fixed, with a regression case added
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44944202183

Left out: the items under Not verified.

Related

#17902

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

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44947183042, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44947183042

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/apply-patch

Run 44947183042, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 89a6cae
Run 44947183042

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #18039 (incremental since 89a6caea)

No security issues found. This was a blocking-only review because this lane already reviewed an earlier head.

Scope: one file changed since the last review, plugins/harness-config/skills/audit-permission-state/scripts/automode-entry-diff.test.sh. I read its whole change.

What changed: the CI fix moves one test assertion earlier in the file. The check that the monitor verdict says "Requires Claude Code v2.1.236 or later" now runs against the first fixture's output, not the newer-class fixture's. The assertion's text and expected value are unchanged. The change affects only a test, so it changes no permission state, script behaviour or trust control. It matches no TRUSTED PATHS: glob.

Prior findings: the earlier post was a summary with 0 findings, so there is nothing to restate.

PR context: it contains no text aimed at the review lane.

Spend: none beyond normal CI.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, blocking only): no findings

This review covers only the change since 89a6caea, which is one file: plugins/harness-config/skills/audit-permission-state/scripts/automode-entry-diff.test.sh. Because this lane already reviewed an earlier head, it reports blocking findings only.

What changed. The push moves the "a monitor verdict carries its version bound" assertion back up, so it runs right after the FIVE_CLASSES case. At the previous head, the new NEWER_CLASSES case sat between that fixture and the assertion and overwrote $OUT. The assertion was then checking output from a fixture with no Monitor rule, which is most likely the CI failure this commit fixes. Now the assertion reads the output of FIVE_CLASSES, and that fixture has effective allow scopes=user precedence_basis=uncontested Monitor (automode-entry-diff.test.sh#L44). That is the input the version-bound line depends on. The NEWER_CLASSES assertions are unchanged, and their summary count (dropped=6 kept=5 from 11 rules) still adds up.

The move only restores what an existing assertion reads, so it changes nothing against closing issue #17902. All its criteria were judged met in the earlier review. I did not run the suite because this lane has no shell; CI is the evidence.

The earlier review's summary comment had no findings, so nothing is restated.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci

Run 44948680163, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44948680163

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch

Run 44948680163, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 84d9bf2
Run 44948680163

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 84d9bf2be64cc7fb906b4d0d6c5f501d7f5bc0a0. 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 is about to arm native auto-merge at head 84d9bf2be64cc7fb906b4d0d6c5f501d7f5bc0a0, 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=MEDIUM demote=false head=84d9bf2be64cc7fb906b4d0d6c5f501d7f5bc0a0 rubric=10.4.6 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 1e53f61 Nov 21, 2026
46 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17902-44944202183-1 branch November 21, 2026 21:25
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: update auto-mode drop classes and package-runner patterns to the eight-class 2.1.327 list

0 participants