chore(claude): scope auto-mode environment rules to this project - #2195
Conversation
The auto-mode `allow` / `soft_deny` / `environment` block described this repository specifically — the live Supabase project ref, the Railway production services, protected branches, secret locations, and the provider-confirmation boundary — but lived in the machine-wide `~/.claude/settings.json`. Any unrelated project opened on the same machine inherited Database-specific rules. Move it verbatim into the project's own `.claude/settings.json`, which git already distributes to every worktree (~75 on the primary workstation), so a per-worktree local settings file was not a viable alternative. `autoMode` is a documented top-level settings key and project settings layer over user settings, so behaviour is unchanged for this repo. No new information is published: every fact in the block already appears in the tracked AGENTS.md. Secret names only, never values. Verified: tests/claude-code-settings.test.ts + tests/session-start-hook.test.ts -> Test Files 2 passed (2), Tests 100 passed (100). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:56 minutes Limit details: You’ve used the included review currently available. Your 85 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:411ed4c9a9
ℹ️ 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".
Uh oh!
There was an error while loading. Please reload this page.
Summary
allow/soft_deny/environmentblock out of the machine-wide~/.claude/settings.jsonand into this repository's own.claude/settings.json, verbatim and unmodified. The block describes this project specifically — the live Supabase project ref, the Railway production services, protected branches, secret locations, and the provider-confirmation boundary — so a machine-wide home for it meant any unrelated project opened on the same workstation inherited Database-specific rules..claude/settings.local.jsonwas considered and rejected: it is git-ignored globally, so it would have to be replicated by hand into every working copy (~75 worktrees on the primary workstation) and into every new one thereafter. The tracked.claude/settings.jsonis the only project-scoped location git distributes automatically.autoModeis a documented top-level settings key, and project settings layer over user settings, so the effective rules for this repository are unchanged.No new information is published by this move. Every fact in the block already appears in the tracked
AGENTS.md— the Supabase project ref, the Railway project and services, the bucket names, and the branch-protection posture. Secret names appear; secret values do not, and none were read or written during this change.Verification
tests/claude-code-settings.test.ts+tests/session-start-hook.test.ts— the two committed guards that parse.claude/settings.json:npx prettier --write .claude/settings.json→.claude/settings.json 256ms (unchanged)(already formatted; whole-tree prettier policy unchanged by this diff)autoModeabsent from user settings, present in project settings with all 24environmententries, 5allowentries and 4soft_denyentries intact; the projecthooksblock (SessionStart, PreCompact, PostToolUse, PreToolUse) is untouched.npm run verify:pr-local -- --dry-run --files .claude/settings.jsoninspected for scope.Verification not run: the full
npm run verify:pr-localgate. This diff is 41 added lines in a Claude Code configuration file with no executable, product, RAG, or schema surface;classifyPullRequestFilesreturnsclinicalRisk: false,operationalRisk: false,ragRanking: false,ui: false. The two committed tests that actually parse this file are the smallest checks capable of detecting a regression here, and both pass. CI'sstatic-pr/pr-requiredaggregate still runs on this PR as the backstop.Risk and rollout
autoModeis somehow not honoured where the user-level block was, which would silently drop thesoft_denyguardrails on live Supabase pushes and provider-backed evals. That risk is mitigated but not eliminated: the settings schema documentsautoModeas an unrestricted top-level key (unlike, say,sandbox.network.strictAllowlist, which explicitly ignores project settings), but this change was not verified against a live auto-mode classifier call. It costs nothing to notice — the repo's ownpermissions.deny/permissions.askrules in the same file are an independent second layer over the same provider commands, and they are unchanged.git revertthis commit. The prior machine-wide block is also retained on the workstation at~/.claude/settings.json.bak-2026-08-20.🤖 Generated with Claude Code