Repository navigation
feat(evals): branching entitlement regression evals - #375
Draft
claude[bot] wants to merge 22 commits into
Draft
claude[bot] wants to merge 22 commits into
claude[bot] wants to merge 22 commits into
Conversation
Three tools-mode regression evals for MCP branching on free vs paid plans, from the create_branch PaymentRequiredException failures (AI-1294): - deploy-database-002: free plan, agent should check the plan with get_organization and stop before get_cost/confirm_cost/create_branch. - deploy-database-003: Pro plan, two branches in one prompt via the cost flow, without re-checking the plan. - deploy-database-004: free plan, project-scoped MCP; one create_branch attempt should get a non-error "requires a paid plan" result. Expected to fail until the MCP server change ships and MCP_SERVER_VERSION is bumped. Infra: - platform-lite: seedable org plan, plan-free org list, entitlements endpoint (branching only), branch list/create with the platform's 402 for free orgs, branches replay migration history, seedable migrations. - harness: remote/organization.json and remote/migrations/ seeds, and projectScoped / mcpFeatures frontmatter for tools evals. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6acVm9fA1bXNQrxtPMcLt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
CI results from run 37674475604: codex-gpt-6-luna and codex-gpt-6-luna-no-skills, 3 runs each. Pulled from the
What this means for the server change: in project-scoped mode, The results refresh only added the 18 new rows. No existing results changed. Generated by Claude Code |
…oval stop as harness limit
…ements and branch routes with upstream
- platform-lite: one migration history array (with SQL) instead of parallel arrays; Branch/Organization types from the generated Management API schema; organization.json loading lives with the other seed loaders - core/sandbox: MCP feature lists typed as McpFeature - regression lib: drop unused is_error/snake-case handling, single-pass cost-flow check, colocate 003's branch listing and ignore the default branch
isToolError, checkNoMcpToolErrors and checkMcpCallCount now live in @supabase-evals/core (mcp-tool-checks.ts) so any tools eval can use them. The branching-specific cost-flow check stays in evals/regression/lib/branching.ts.
…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
checkMcpCallCount, checkNoMcpToolErrors and isToolError move from @supabase-evals/core to evals/lib/ so every suite can reuse them; discovery skips evals/lib; test:regression-lib becomes test:evals-lib; CONTRIBUTING points scorer authors at the shared checks.
Codex records its own list_mcp_resources helper as an MCP call; a failed helper call (wrong server name) false-failed 004 in CI run 37763240750.
Branching availability isn't only the plan, so 002 no longer requires get_organization first. It allows at most one get_cost/create_branch call, no confirm_cost and no tool errors. The shared judge (002/004) requires saying branching is unavailable, asking about upgrading, and linking the org billing page. checkMcpCallCount accepts several tool names counted together.
Clients with form elicitation (MCP revision 2026-07-28) confirm the branch cost inside create_branch; 003 and its cost-flow check cover the legacy flow.
- platform-lite: GET /v1/projects/{ref}/branching -> { available } (same rule as branch creation's 402); drop the org entitlements route and emulation that only the old design used
- 002: no get_organization requirement; <=1 get_cost/create_branch, no confirm_cost, no tool errors, upgrade-offer judge
- 003: drop the get_organization at-most-once check
- 004: exactly one create_branch that returns the non-error unavailable result, no tool errors, same judge
- READMEs describe the platform endpoint and the non-error result
…ching Per the user: the reply needn't link the billing page or ask a question; mentioning the upgrade is optional.
The MCP server resolves branch-id tools to the branch ref and checks availability there.
Every branching tool now fails fast with the same non-error result, so 002 and 004 require exactly one branching-tool call (create/list/delete/merge/reset/rebase_branch or get_cost) to return it, no confirm_cost and no tool errors; create_branch isn't required. 003 unchanged.
…tries Pass when at least one branching-tool call returns the non-error unavailable result and no branching call starts after the first such result came back. Parallel first calls count as one attempt. CI run 5 rescored offline: 002 6/6, 004 6/6.
This branch was successfully deployed
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.
Requested by Pedro Rodrigues · Slack thread
Before: About 21% of MCP
create_branchcalls fail, mostly free-plan orgs gettingPaymentRequiredException("Branching is supported only on the Pro plan or above"), often afterget_costalready quoted them a branch price. Nothing in this repo covered branching. platform-lite had no branch routes and a hardcoded free org.After: Three regression evals (tools mode,
interface: mcp) for the agreed fix (Slack, AI-1294):deploy-database-002-branch-free-plan: free org. The agent checksget_organization, never callsget_cost/confirm_cost/create_branch, has zero tool errors, and tells the user a paid plan is needed.deploy-database-003-branch-paid-plan-twice: Pro org. First branch goesget_cost→confirm_cost→create_branch, both branches exist,get_organizationis called at most once, zero tool errors.deploy-database-004-branch-free-plan-project-scoped: free org, project-scoped MCP. At most onecreate_branch, noconfirm_cost, zero tool errors, and the agent explains the plan.A "tool error" means
isError: trueor a thrown error. The server's planned non-error "requires Pro" response passes.These evals are expected to fail until the MCP server change ships and
MCP_SERVER_VERSIONis bumped.How:
GET /v1/organizationsno longer returns the plan (it didn't upstream either). There's a minimalGET /v1/organizations/{slug}/entitlementsthat only covers branching, andGET/POST /v1/projects/{ref}/branches, which returns the platform's 402 for free orgs. A branch is a fresh database with the parent's migrations replayed. Projects can also be seeded with migration history.remote/organization.jsonandremote/migrations/seeds, plus two frontmatter keys for tools evals:mcpFeatures: [branching](opt-in, so other evals' tool surface doesn't change) andprojectScoped: true(--project-ref).confirm_cost. In 003 nobody answers, so that run fails because the harness is single-turn, not because the agent is wrong. A real follow-up turn needs multi-turn support across all agent harnesses, which should be its own PR.Tests:
pnpm typecheck, platform-lite tests (111 pass, newbranching.test.ts), core tests, framework tests, the newtest:regression-libscorer tests (17),pnpm eval:dry,pnpm format:check.AI disclosure: Written end to end by Claude Code (AI). Pedro Rodrigues is the accountable owner and should review before merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6acVm9fA1bXNQrxtPMcLt
Generated by Claude Code