Skip to content

refactor(claudecode): centralize .claude/settings.json permissions ownership in a gateway#2115

Open
saitota wants to merge 1 commit into
dyoshikawa:mainfrom
saitota:claudecode-settings-gateway
Open

refactor(claudecode): centralize .claude/settings.json permissions ownership in a gateway#2115
saitota wants to merge 1 commit into
dyoshikawa:mainfrom
saitota:claudecode-settings-gateway

Conversation

@saitota

@saitota saitota commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Background

Who owns which entries inside .claude/settings.json permissions lived in two places: ignore writes Read(...) into permissions.deny, permissions writes the whole allow/ask/deny, and both re-implemented the entry format and the preserve/overwrite rule — permissions even guessed about the ignore feature by name in a warning. The two could drift while each feature's own tests kept passing. Ordering is already guarded by GENERATION_STEP_GRAPH (#2081, #2109); this closes the remaining merge/ownership half.

Changes

  • New claudecode-settings-gateway.ts owns the permissions entry format, merge, and cross-feature ownership rule (permissions' Read rules win over ignore-derived Read denies).
  • ignore and permissions now state intent only; the warning drops its possibly from ignore feature guess.

No change to generated output. Claude Code only, matching the staged-adoption note in #2081.

Test Plan

  • New gateway unit tests; existing claudecode regression tests preserved.
  • pnpm cicheck green (6749 tests).

Refs #2081, #2109

…nership in a gateway

The rule for who owns which entries inside .claude/settings.json permissions
was duplicated across the ignore and permissions features: both knew the
Read(...) deny entry format, and permissions guessed about the ignore feature
by name in a warning string. Extract that shared contract into a single
gateway so each feature only states its intent.

No change to generated output.
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.

1 participant