Fix scoped legacy branch cost confirmation - #423
Closed
barryroodt wants to merge 1 commit into
Closed
Conversation
Coverage Report for CI Build 34485986440Coverage increased (+0.2%) to 96.575%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Scoped legacy clients exposed
create_branchbut lacked the cost helpers needed to obtain its confirmation ID, leaving branch creation blocked.What changed
Provides branch-only quote and confirmation helpers, with matching runtime and static schemas, while keeping approval mandatory and creation scoped to the expected project. Legacy/non-inline
confirm_cost_idmetadata changes from optional to required. Modern inline forms and existing account behavior stay unchanged.How to test
CI=true pnpm --filter @supabase/mcp-server-supabase test:unit --run src/server.test.ts -t 'branching-only legacy quote|branch-only fallback rejects'Expect 6 passing selected tests, with others skipped: successful quote→confirm→create creates exactly one fixture branch in the expected project; missing/wrong IDs and project-cost calls make zero requests or branches. This exact filter has not been rerun separately.
Prior compiled checks passed 8 CLI scenarios and 9 static configurations. Those checks were fixture-only, with no real-backend or hosted-UI proof; transport isolation used JS instrumentation, not an OS-wide firewall.
Trade-offs
Making the existing field required changes client-visible schema metadata, but makes the approval contract explicit. Legacy IDs remain deterministic hashes, not cryptographic proof of consent.