Repository navigation
feat(claude-permissions): retire the ~/.claude.json Read denies from the floor - #519
Conversation
…the floor Both spellings blocked Edit and Write on the same path, not only reads, so the floor prevented the documented way to manage the file rather than merely protecting it. Official docs also record that a Read/Edit denial does not apply to a subprocess that opens the file itself, so a one-line jq read was always available and the rows only ever constrained the first-class tools. Read() rules are path/glob only, so no rule could keep the sign-in session and MCP server fields denied while leaving the rest reachable. The choice was all or nothing. The file's sensitive material is now protected by operator judgement, and a consumer that wants the old posture can re-add either spelling to its own deny list. Moves both patterns from required_read_denies to forbidden_read_denies so a future sync cannot silently reintroduce them, matching how the settings.local.json rows were retired for the same mechanical reason. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 3m 8s —— View job Review completeReviewed the diff (
Findings (2, both minor):
No correctness issues found. The JSON edit, test-assertion move ( Branch: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44fd03daa6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…he repo's spelling Review follow-up on two valid findings. The settings.local.json entry still asserted that `.claude.json` "stay[s] denied" and referred to "both remaining patterns", which contradicted the retirement recorded one entry above. Rewritten so the skillUsage point reads as moot rather than as a live residual, since nothing in the floor distinguishes one key of that file from another now. "judgement" is the British spelling and this repo uses "judgment" in 35 files with no prior use of the other form. Aligned in the README and the test comment. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ation flags (#520) No linked issue: found while driving #519, whose CI was red for a reason unrelated to its diff. ## Summary `main` is red on `pr-convention-lockstep`, and has been since 2026-09-02, on a gate that has not actually drifted. The check stopped being able to *read* the reusable and reported that as drift. This restores it. ## Fix `parseGatePatterns` matched the gate's regex declarations with a literal `/i;` terminator. melodic-software/ci-workflows commit `3e32b0a` made `CLOSING_KEYWORD` global, `/gi;`, so every occurrence on a line can be classified. The match then failed and the check raised `gate reusable: CLOSING_KEYWORD / NO_ISSUE_MARKER regex declarations not found`, which reads as drift but is a parse failure. Declaration flags were never part of the contract this check enforces. Only the pattern *body* is extracted, and both probes are rebuilt with `"i"` regardless, so pinning the flag set asserted an incidental detail of how the reusable happened to be written on the day the parser was authored. The matcher now accepts any valid flag set. Drift detection is unchanged and still functional: the extracted body is probed against every policy keyword and marker, so a keyword surviving only in a comment still fails. Why `main` went red without anyone touching it: this repo's last CI run on `main` was 2026-09-02T06:04Z and the ci-workflows commit landed at 06:48Z, 44 minutes later. No run had observed it until #519 opened. ## Verification - Reproduced on `main`'s own tree before changing anything: `node components/pr-convention-policy/lockstep-drift.mjs` against live sources fails with the exact CI message. - With the fix, the same live run reports `pr-convention lockstep: all copies and caller pins match policy.json` and exits 0. That is the load-bearing check that no *real* drift was hiding behind the parse failure, so this is not a detector being loosened to hide a problem. - `npm run test:pr-convention-lockstep`: 14 tests, 14 pass. - Red under mutation, which this suite's design calls for: reverting only the parser change and re-running leaves 13 passing and fails exactly the new `declaration flags are not part of the contract` test. - The new test asserts the substantive properties rather than the message: a `gi`-declared gate still yields probes that match `Closes #12` and `No linked issue`, the rebuilt probe is not global, and the extracted body is identical whichever flags were declared. Two commits, deliberately. `e11eb1c` is mechanical Biome formatting plus three per-call `noConsole` suppressions for the CLI entrypoint; it landed on its own because these files had never been Biome-formatted. The CI Biome job scopes itself to a path list that excludes this component while the lefthook lane globs every staged JS/TS file, so any edit here drags the accumulated formatting diff in. `4344d9a` is the actual fix. Reviewing the second commit alone is sufficient, and the first is verified behavior-neutral: after it, the live check still failed with exactly the original error and the 13 pre-existing tests still passed. ## Related - #519, blocked by this failure; it touches only `components/claude-permissions` and is otherwise green. - melodic-software/ci-workflows `3e32b0a`, the upstream change that exposed the brittleness. It is correct and needs no revert. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
No linked issue: operator-directed change to the permission floor, raised while reconciling a machine's Claude settings before a
chezmoi apply.Summary
Retires the two
~/.claude.jsonRead()denies from the fleet permission floor. The operator needs that file readable and writable by first-class tools; this is the layer that owns the rule, so removing it downstream would have been undone by the next sync.Fix
Removes
Read(**/.claude.json)andRead(~/.claude.json)fromclaudePermissions.deny, and moves both patterns fromrequired_read_deniestoforbidden_read_deniesin the component test so a later sync cannot silently reintroduce them. This mirrors exactly how thesettings.local.jsonrows were retired, for the same mechanical reason.The reasoning, recorded in the README:
Readdeny also blocks Edit and Write on the same path, per the permissions docs. So the rows blocked the documented way to manage the file, not just reads of it. That is the same defect that retired thesettings.local.jsonrows.jqread was always available, so the rows constrained the first-class tools without being a boundary against a determined reader.Read()rules are path/glob only. No rule could keep the sign-in session and MCP server configuration denied while leaving the rest reachable, so the choice was all or nothing.The file does still hold sign-in session state and MCP server configuration. That material is now protected by operator judgement rather than by a floor rule that could not express the distinction, and any consumer wanting the old posture can re-add either spelling to its own
denylist. The README states this plainly rather than leaving it implied.Verification
bash components/claude-permissions/claude-permissions.test.sh: 17 assertions, all pass, including the fourdeny omitschecks that now cover both retired.claude.jsonspellings alongside the twosettings.local.jsonones.jq empty components/claude-permissions/claude-permissions.json: valid, andgrep -c 'claude\.json'on the component returns 0.npx markdownlint-cli2 components/claude-permissions/README.md: 0 issues.typos components/claude-permissions/: clean.Related
🤖 Generated with Claude Code