Skip to content

docs(context-budget): attribute the hook if skip to tool-name matching, not the path - #10911

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-3680-40838396699-1
Oct 29, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #3680

Summary

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

Corrects the context-budget README Hook section and the hook-precision convention's Platform gap section. Both now say that on Windows, Claude Code 2.1.285, an Edit(...) rule in a hook if does not match a Write tool call, while Write(...) and Edit(...) rules each match absolute paths outside cwd for their own tool. The old path-based explanation is removed, the Recheck names the tool-name gap and #8985, and the context-budget row stays unconditioned with no hooks.json change.

Not verified

  • Tidy skipped: the change touches docs/conventions/, a listed shared path, and spans 2 areas (plugins/context-budget with .changes/context-budget, and docs/conventions), over the 1-area cutoff.
  • scripts/new-changelog-fragment.sh context-budget patch could not run: the lane checkout is a detached HEAD and the script needs a branch name. The fragment was written by hand in the same format and passes check-changelog-fragments.
  • Markdown lint (markdownlint) is left to the PR's CI as the issue states. check-affected passed locally, but its output does not name a markdownlint step, and typos is not installed here.
  • Out-of-scope finding from the review, not changed here: plugins/harness-ops/skills/audit-performance (reference/known-performance-issues.md around :229-248, scripts/audit_performance.py HOOK_ANCHOR_NOTE around :230-234 and :1854, SKILL.md around :213) still says hook if rules never match a file ou

Fix

  • plugins/context-budget/README.md: rewrote the paragraph starting 'The registration carries no if filter'. It now records the 2.1.285 Windows probe (Edit(...) does not match Write calls; Write(...) and Edit(...) each match outside-cwd absolute paths for their own tool), notes that 2.1.258 was not r
  • docs/conventions/hook-precision/README.md: rewrote the 'Platform gap' section with the tool-name cause, Claude Code 2.1.285 and Windows, updated the Claim, Basis (with the permissions docs pointer) and As of bullets, and made Recheck name the tool-name gap and #8985.
  • .changes/context-budget/work-resolve-issue-issue-3680-7c2a91e4.md: new patch fragment (Fixed) for the README correction.

Verification

The runner ran each check from the base copy against 56b0a6d:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //code.claude.com/docs/en/permissions: section 'What Read and Edit rules cover' says 'Edit rules apply to all built-in tools that edit files'; section 'Write(path), NotebookEdit(path), and Glob(path) rules never match' says permission checks use Edit(path) and Read(path) rule
  • read https: //code.claude.com/docs/en/hooks: Common fields says the hook if field takes permission rule syntax and is evaluated only on tool events; the page gives no Write example for if.
  • grep for 'outside the working directory' and '#3680' across the repo: the old path-based phrase no longer appears in either target file; it remains only in the historical plugins/context-budget/CHANGELOG.md 0.6.19 entry.
  • grep matcher in plugins/context-budget/hooks/hooks.json: the row's matcher is Write|Edit|NotebookEdit and it has no if; hooks.json is unchanged.
  • .lane/checks/bin/check-changelog-fragments: 'All 3 changelog fragment(s) under .changes/ are valid.' (run before and after the review fixes)
  • .lane/checks/bin/check-affected: '11 passed, 7 skipped over 3 changed files' (run before and after the review fixes)
  • fresh-context review subagent over the whole diff: found no bugs and confirmed every acceptance criterion. Its should-fix and nit findings in the changed files were applied: the matcher is now named Write|Edit|NotebookEdit, the Recheck triggers are aligned, claims are scoped to 'at any path tested',
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40838396699

Left out: the items under Not verified.

Related

#3680

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

Copy link
Copy Markdown
Contributor

claude-review reviewed 56b0a6d039c1eb7c02cf10ce7c9d666ae7cb2276: 0 finding(s), 0 as inline comments.

No findings. The PR touches three files: the context-budget README Hook paragraph, the hook-precision "Platform gap" section, and one new patch changelog fragment. It is docs only: no hooks.json change, and no manifest or userConfig change, so no manifest items apply. No trusted-path glob matches a changed file.

I checked the diff against the acceptance criteria in closing issue #3680:

  • Both sections name Claude Code 2.1.285 and Windows. Met.
  • Both sections state that an Edit(...) rule in a hook if does not match a Write call, and that Write(...) and Edit(...) rules each match outside-cwd absolute paths for their own tool. Met.
  • The phrase "do not match an absolute path outside the working directory" is gone from both files. I grepped both files and plugin-wide, excluding CHANGELOG.md. The only remaining hit in plugins/context-budget outside the changed paragraph is an unrelated test description in settings-write-ask.test.sh.
  • The Recheck bullet names the tool-name gap and context-budget: file the corrected hook if tool-name report upstream and re-probe each release #8985 in the convention README. The context-budget README's Recheck trigger names it too. Met.
  • The row stays unconditioned and the diff touches no hooks.json. Met.
  • The .changes/context-budget/ fragment is a patch bump with a Fixed entry, which fits a docs-only correction. I did not run the fragment checker. The PR body says it passed, and that is the author's claim, not something I confirmed.
  • The markdown lint CI criterion is for CI to answer. I did not run it.

The README's claims match the probe table in the issue's resolution comment. I did not re-run the probe, and the probe results are the author's.

The PR itself says plugins/harness-ops/skills/audit-performance still carries the old path-based claim. That is outside this diff and I did not review it.

The PR context text contained no embedded instructions aimed at the reviewer.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 56b0a6d039c1eb7c02cf10ce7c9d666ae7cb2276: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

  • What changed: three documentation-only files: the context-budget README Hook paragraph, the hook-precision convention's "Platform gap" section, and a patch changelog fragment. plugins/context-budget/hooks/hooks.json is not in the diff, so the Write|Edit|NotebookEdit checkpoint row stays unconditioned and still runs on every matched write. That follows from the diff's contents and the PR context's statement that hooks.json is unchanged; I did not read hooks.json itself.
  • Trusted paths: none of the changed files match a listed glob. docs/conventions/hook-precision/README.md is not docs/conventions/pr-pipeline.yaml.
  • Trust controls: no trusted-actor list, token scope, kill switch, merge hold, signer or pr-pipeline.yaml setting is touched. Nothing widens who or what is trusted.
  • Instruction surface: the rewrite replaces a path-based explanation with a tool-name one. It removes no rule or guardrail. The advice to leave any Write-matching guard row unconditioned, or split it into a gated row per tool after a probe, is kept and stated more precisely.
  • Manifests: no plugin.json or marketplace.json change, so there are no manifest <field> lines.
  • PR context: it contained no embedded instructions aimed at the review lane. The upstream-filing and probe notes are ordinary issue data.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 56b0a6d039c1eb7c02cf10ce7c9d666ae7cb2276. The lanes clear this reason on their own; 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 56b0a6d039c1eb7c02cf10ce7c9d666ae7cb2276.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 2ffa5dd Oct 29, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-3680-40838396699-1 branch October 29, 2026 09:32
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.

Hook if file rules never match an absolute path outside cwd on Windows (upstream candidate)

0 participants