Skip to content

Fix scoped legacy branch cost confirmation - #423

Closed
barryroodt wants to merge 1 commit into
mainfrom
fix/scoped-legacy-branch-cost
Closed

Fix scoped legacy branch cost confirmation#423
barryroodt wants to merge 1 commit into
mainfrom
fix/scoped-legacy-branch-cost

Conversation

@barryroodt

Copy link
Copy Markdown
Contributor

Why

Scoped legacy clients exposed create_branch but 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_id metadata 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.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34485986440

Coverage increased (+0.2%) to 96.575%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 63 of 63 lines across 4 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3633
Covered Lines: 3527
Line Coverage: 97.08%
Relevant Branches: 542
Covered Branches: 505
Branch Coverage: 93.17%
Branches in Coverage %: Yes
Coverage Strength: 61.72 hits per line

💛 - Coveralls

@barryroodt barryroodt self-assigned this Sep 10, 2026
@barryroodt barryroodt closed this Sep 10, 2026
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.

2 participants