• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / mcp / 46845665592 / 1
98%
main: 98%

Build:
DEFAULT BRANCH: main
Ran 02 Dec 2026 08:56AM UTC
Files 55
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Dec 2026 08:54AM UTC coverage: 98.261% (-0.02%) from 98.277%
46845665592.1

push

github

web-flow
feat(mcp-server-supabase): add the SQL confirmation classifier interface (#582)

Second PR in the stack replacing #454. Base: `main`, now that #581 has
merged (2/5).

## Why this changes

Today, `execute_sql` and `apply_migration` use a regex to decide when to
ask for confirmation. I’d like to try the SQL parser from #426 for the
same job. Both classifiers need a way to tell the tools when a query
needs approval and what happened if they couldn’t check it.

This PR defines that interface and wraps the existing regex as
`regexClassifier`. Hosts can import it from
`@supabase/mcp-server-supabase/sql-confirmation` without starting an MCP
server. #583 and #584 connect it to the tools, so the SQL confirmation
flow stays the same in this PR.

## What a classifier returns

A `SqlConfirmationClassifier` takes the SQL text and a cancellation
signal. Its result tells the tool what to do once the follow-up PRs
connect it.

| Classifier result | Tool behavior |
| --- | --- |
| `undefined` | Run the SQL without asking for confirmation. |
| `destructive`, `do-heuristic` or `unclassified` | Ask for confirmation
and explain what triggered the prompt. |
| `{ failure: 'oversized' }` | Ask for confirmation and tell the user
the SQL was too large to check. |
| Any other failure, an invalid result or an unhandled exception | Stop
before running the SQL and report a `SqlClassifierCallError`. |

## When the fallback runs

A host can use `withFallback(parser, regexClassifier)` to try the parser
first. If the parser can’t load, it can return `{ failure: 'unavailable'
}` or throw `SqlClassifierUnavailableError`. Either tells the wrapper to
use the regex for that call.

A timeout or crash fails the call by default. Hosts can opt into
fallback for those failures. If the parser returns `unclassified`,
that’s already an answer: the tool should ask the user for approval.

Refs AI-1338

1515 of 1581 branches covered (95.83%)

Branch coverage included in aggregate %.

7019 of 7104 relevant lines covered (98.8%)

2226.98 hits per line

Source Files on job 46845665592.1
  • Tree
  • List 55
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 46845665592
  • 483ddff4 on github
  • Prev Job for on main (#46655997813.1)
  • Next Job for on main (#46873437000.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc