Repository navigation
feat(branching): tell agents when the organization's plan has no branching - #463
Draft
Rodriguespn wants to merge 2 commits into
Draft
Rodriguespn wants to merge 2 commits into
Rodriguespn wants to merge 2 commits into
Conversation
commit: |
Coverage Report for CI Build 37775658052Coverage decreased (-0.1%) to 96.893%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Rodriguespn
added a commit
to supabase/evals
that referenced
this pull request
Oct 8, 2026
…review pin - 002-004 PROMPT.md: 'Whatever it costs is fine, no need to check with me.' replaces the approval turn the single-turn harness can't give - 002/004 judge now requires linking the org billing page (https://supabase.com/dashboard/org/<slug>/billing) to upgrade - TEMP(AI-1292): MCP_SERVER_VERSION points at the supabase/mcp#463 pkg.pr.new preview; revert before merge
Rodriguespn
force-pushed
the
Rodriguespn/ai-1292-hide-branching-mcp
branch
from
October 8, 2026 12:00
4eca568 to
dacdf83
Compare
BranchingOperations gains an optional getAvailability(projectId). create_branch asks it before any cost step and, when the platform says the project's organization can't branch, returns the platform's message as a normal tool result instead of failing with the 402. get_cost gains an optional project_id and does the same for branch costs. Project-scoped create_branch accepts a missing confirm_cost_id so it can reach the check, and still rejects it with the existing message when branching is available. Hosts without getAvailability, and failed checks, keep today's behavior. Refs AI-1292.
…latform Hand-written fetch until the endpoint is deployed and the generated Management API types include it; replace with the typed managementApiClient call before merge.
Rodriguespn
force-pushed
the
Rodriguespn/ai-1292-hide-branching-mcp
branch
from
October 8, 2026 12:15
dacdf83 to
f34a9ba
Compare
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.
Refs AI-1292. Hiding the tools with
tools/list_changedis AI-1294; project-scoped branch creation is AI-1297. Decision thread: Slack.Before: about 21% of
create_branchcalls fail, mostlyPaymentRequiredException: "Branching is supported only on the Pro plan or above"(1,409 in 7 days). Onlycreate_branchhits it; the other branch tools had 0 such errors.After: when the platform says the project's organization can't use branching, every branching tool (
create_branch,list_branches,delete_branch,merge_branch,reset_branch,rebase_branch) and branchget_costreturn that answer as a normal tool result instead of a tool error. Nothing else changes.BranchingOperationsgains an optionalgetAvailability({ projectId } | { branchId })(the host resolves a branch to its project) →{ available: true } | { available: false; message?: string }. Withoutmessage, the server uses a generic one.create_branchasks before any cost step;list_branchesasks with the project, and the branch-id tools ask with the branch, after the read-only check. The result carries the message incontentandstructuredContent: { status: 'unavailable', message }.get_costgains an optionalproject_id(only when the host implementsgetAvailability) and asks for branch quotes. Added inserver.ts, next to the existingget_cost/confirm_costadjustments, so the account tools don't depend on branching.create_branchaccepts a missingconfirm_cost_idso it can reach the check; when branching is available it still fails with the existing "User must confirm understanding of costs before creating a branch." (see AI-1297).getAvailability, and failed checks, keep today's behavior.Platform: availability is decided by
getBranchingAccess(entitlement, free-org allowlist, K8s projects). The platform addsGET /v1/projects/{ref}/branching→{ available }and the hosted MCP'sgetAvailability(separate supabase/platform PR).dacdf83is TEMPORARY: the stdio platform callsGET /v1/projects/{ref}/branchingwith a hand-writtenfetch, so the evals can run on the preview now. Replace it with the typedmanagementApiClientcall once the endpoint is deployed and the generated types include it. Do not merge with it.Verification:
mainstill pass by name, plus 14 new ones (429/429), with and without the TEMP commit; typecheck and biome clean.tools/listvsmain: no tools added or removed; onlyget_costgains optionalproject_idand project-scopedcreate_branchno longer requiresconfirm_cost_id.Expected conflicts: with #428/#455 in
create_branchandserver.ts; to re-check before merge.AI disclosure: implemented with an AI agent (omp, Claude). Pedro Rodrigues is the accountable owner and reviews before merge.