|
Repo Added
|
Build
642
Last
|
Files
49
|
Badge
README BADGES
|
push
github
fix(mcp-server-supabase): keep a declined or cancelled SQL confirmation final (#581) First PR in the stack replacing #454. Base: `main` (1/5). ## Why this changes When `execute_sql` or `apply_migration` asks for confirmation, the client sends a second tool call with the server-issued state and the user’s answer. Today, only **Accept** skips a second SQL classification. If the user clicks **Decline** or **Cancel**, the server checks the SQL again before it honors that answer. The current regex always gives the same answer for the same SQL. The next PR makes the classifier replaceable, so a parser could flag a query on the first call and a fallback could clear it on the second. Today, that would run SQL the user just declined. #455 added observability and a test that captures this behavior. ## What changes The server checks that the signed state is valid and unexpired, then matches it to the current tool, project ID and exact SQL text. For `apply_migration`, the migration name must also match. | Answer for a matching prompt | What the server does | | --- | --- | | Decline or Cancel | Returns the user’s answer immediately. It skips classification and stops before executing the SQL. | | No answer | Asks again, even if the classifier now clears the SQL. In that case, the prompt says “This SQL was flagged for confirmation earlier and still needs your approval.” | | Accept | Runs the SQL, as it does today. | A decline ends that call. The client can still send **Accept** for the same prompt before the state expires. If the client changes the SQL, the earlier answer doesn’t apply to the new query. The server classifies it as before. ## Where to review Start with `checkDestructiveSqlConfirmation`, which decides when to classify the SQL. The updated tests show what happens when the classifier changes its answer or throws after the first prompt. [SQL confirmation handling](https://github.com/supabase/mcp/blob/92be4920a/pac... (continued)
1340 of 1388 branches covered (96.54%)
Branch coverage included in aggregate %.
39 of 39 new or added lines in 2 files covered. (100.0%)
6274 of 6369 relevant lines covered (98.51%)
296.23 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|
![]() |
Badge your Repo: mcpWe detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.Could not find badge in README. |
|
Embed ▾
README BADGES
|