Skip to content

fix(settings): re-land orphaned auto-mode supabase soft-deny from #2195 - #2196

Merged
BigSimmo merged 2 commits into
mainfrom
claude/supabase-automode-softdeny-relanded
Aug 20, 2026
Merged

fix(settings): re-land orphaned auto-mode supabase soft-deny from #2195#2196
BigSimmo merged 2 commits into
mainfrom
claude/supabase-automode-softdeny-relanded

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Re-land the auto-mode Supabase fix from PR chore(claude): scope auto-mode environment rules to this project #2195, which was orphaned by the auto-merge race and never reached main. The commit is cherry-picked unchanged (a1259e5e93151c1e4e), authorship preserved.
  • Moves Bash(supabase migration list:*) and other read-only supabase inspection subcommands out of autoMode.allow and into autoMode.soft_deny, and adds the guard test that pins it there.

Why this PR exists. PR #2195 had squash auto-merge armed. GitHub merged it the moment the required checks went green, at head a96f5307. The Codex auto-resolve workflow pushed its P1 fix to the branch roughly five minutes later, at a1259e5e9 — after the PR was already merged and closed. GitHub resolved the review thread, so the finding reads as fixed, but main at 2abbe006 still carries the original rule in autoMode.allow and does not contain the guard test. Verified with git merge-base --is-ancestor a1259e5e9 origin/main (false) and by reading .claude/settings.json at origin/main.

Why the finding is correct (verified independently rather than taken on the reviewer's word): npx supabase migration list --linked is the repository's own documented flow (README.md:64, docs/supabase-migration-reconciliation.md:14) and it reads the live linked project, while AGENTS.md:512 requires explicit confirmation for any Supabase interaction, "including indirect tooling". Allowing it in auto mode was a real, if narrow, hole: an autonomous read against the live Clinical KB Database project with no prompt.

Verification

  • npx vitest run tests/claude-code-settings.test.ts tests/session-start-hook.test.ts:
 Test Files  2 passed (2)
      Tests  101 passed (101)
  • Mutation-checked the new guard rather than trusting a green run. With the rule deliberately moved back into autoMode.allow, the new test fails as it should:
 × soft-denies live supabase inspection in auto mode
AssertionError: expected true to be false
 Tests  1 failed | 89 passed (90)

The working tree was restored to HEAD afterwards. A check that cannot fail is not a check.

  • npx prettier --check .claude/settings.json tests/claude-code-settings.test.tsAll matched files use Prettier code style!
  • Confirmed post-change state: autoMode.allow contains no supabase rule; autoMode.soft_deny contains the inspection rule.

Verification not run: the full npm run verify:pr-local. The diff is one relocated configuration string plus a seven-line test, in the same file scope as #2195, which classifyPullRequestFiles returns as clinicalRisk: false, operationalRisk: false, ragRanking: false, ui: false. The committed tests that parse this file are the smallest checks capable of detecting a regression here, and the new one is proven able to fail. CI's pr-required aggregate remains the backstop.

Risk and rollout

  • Risk: Low, and in the safe direction — this narrows what auto mode may do without asking. The realistic cost is one extra confirmation prompt when running supabase migration list --linked, which is the documented intent.
  • Rollback: git revert this commit; behaviour returns to today's main.
  • Provider or production effects: None. No Supabase, OpenAI, Railway, or hosted-CI call was made.
  • RAG impact: none

Follow-up worth considering (not in this PR)

The auto-merge race that stranded this fix is not specific to it: any PR with auto-merge armed can have a late review-bot fix land after the merge, with the review thread still auto-resolved so nothing looks wrong. docs/outstanding-issues.md may be the right home for that.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 6 minutes

Limit details: You’ve used the included review currently available. Your 84 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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 22070126-8bc4-4fa4-bb4a-71ad174c2010

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc0d29 and 41aefe6.

📒 Files selected for processing (2)
  • .claude/settings.json
  • tests/claude-code-settings.test.ts

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Aug 20, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 20, 2026 16:40
@BigSimmo
BigSimmo merged commit 97f6142 into main Aug 20, 2026
24 checks passed
@BigSimmo
BigSimmo deleted the claude/supabase-automode-softdeny-relanded branch August 20, 2026 16:46
BigSimmo added a commit that referenced this pull request Aug 20, 2026
…estion (#2201)

* docs(ledger): record the PR #2198 migration-history alignment review

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(db): record the 2026-08-20 alignment window and reopen the D4 question

The PGRST106 fix (PR #2198, squash a341832) merged before its production
window, so the window's pre-flight found 20260820120000 already applied and
db push was never run. Verified read-only against sjrfecxgysukkwxsowpy:
stmt_count 3 (executed statements, not mark-applied), prosecdef true,
provolatile s, search_path="", proacl postgres=X/postgres |
service_role=X/postgres, and the function returns probe ok with
version_count 211 against 211 history rows and 211 local files. No guard
migration is owed.

Two open items are recorded rather than absorbed.

D4 is unresolved again. created_by and idempotency_key are NULL on every row
from 20260818090000 onward, including ones this programme applied by operator
db push, so the history table carries no provenance signal. The 2026-08-19
observation recorded as "D4 is OFF" was that migrations sat pending WHILE a PR
was open; that never tested deploy-on-merge, and so never contradicted section
3.7's 34-second application after #2106's squash-merge. Until the dashboard is
re-checked, assume merging a migration PR deploys it to production.

Staging is one version behind (210 rows, function absent, pending set exactly
20260820120000). Both write paths were denied by the session auto-mode
classifier under the live-Supabase confirmation rule added by PR #2196, so
Phase 4's staging parity is open by one version until an operator applies it.

Also lands the owed PR #2198 review-ledger record, whose original push was cut
short when the branch was deleted on merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(db): treat a merged migration PR as a production deploy until D4 is re-verified

The 2026-08-20 window update reopened D4 (Supabase GitHub auto-deploy), but the
status board's active instructions still told a coordinator the opposite: the
"Next dispatches" line, the D4 owner-decision entry, the 2026-08-19 "Resolved"
paragraph, and the pre-window forensics section all said D4 is OFF and every
migration needs its own explicit `db push`. A coordinator reading those could
merge a migration PR outside its approved window — the unapproved production
schema change the update exists to prevent.

All four now point at the reopened decision: assume merging a migration PR
deploys it to production until the dashboard toggle is re-verified. Push-before-
merge stays the required order, for the inverted reason.

Also lands the PR #2201 review-ledger record.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoyoNN7nCUVDLaE84k6e6c

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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