Skip to content

feat(evals): add CLI docUrl A/B evals for supabase/cli#7749 - #566

Draft
nrichers wants to merge 2 commits into
mainfrom
nrichers/cli-docurl-ab
Draft

nrichers wants to merge 2 commits into
mainfrom
nrichers/cli-docurl-ab

Conversation

@nrichers

@nrichers nrichers commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

Draft for experimentation & demo. Not ready to review or merge.

Problem

supabase/cli#7749 adds Learn more: <url> to CLI text errors and error.docUrl to JSON errors. The URL points to a /kb/troubleshooting article. We need to know if the link changes what an agent does when a CLI command fails.

Changes

  • Six CLI evals, resolve-cli-002 to resolve-cli-007. In each one, a CLI command fails with a Postgres error code that #7749 links to an article. The prompt names the command that failed, never the error or the article.
    • 002 to 004 use errors that models already know: a sequence out of sync (23505), an index row too big (54000), a missing schema prefix (42P01).
    • 005 to 007 use errors where the fix is specific to Supabase and is in the article: column grants that block select * (42501), a null byte in a string (22021), a read-only state on the pooler (25006). The scorer fails the obvious shortcut.
  • evals/cli/lib/docurl.ts records if the agent saw the link and if it read the expected article (a web_fetch, or a curl or wget in the shell).
  • An off/on experiment pair for Claude Sonnet 5.5 (Claude Code) and GPT-6 Luna (Codex). experiments/cli/lib/docurl-pair.ts builds each arm from a preset and a CLI version. Each model is compared only with itself.
  • The evals carry customMetadata.abGroup: cli-docurl. skipUnlessCli skips them, so the regular CLI experiments do not change. Only the docUrl experiments run them.
  • Both arms point at 3.5.0-beta.6 for now. Move DOCURL_ON_VERSION to the first release that contains #7749.

How to Review

  1. experiments/cli/lib/skip.ts and experiments/cli/lib/docurl-pair.ts: the evals stay out of the existing CLI experiments.
  2. evals/cli/lib/docurl.ts: the saw-link and read-article checks.
  3. evals/cli/resolve-cli-005-select-star-column-privileges/: PROMPT.md, then EVAL.ts, then the seed. The other five evals use the same shape.

Verification

pnpm test
pnpm eval -- --eval resolve-cli-002-sequence-out-of-sync,resolve-cli-003-oversized-index-row,resolve-cli-004-unqualified-schema-query --experiment claude-code-sonnet-5.5-cli-docurl-off --experiment claude-code-sonnet-5.5-cli-docurl-on --experiment codex-gpt-6-luna-cli-docurl-off --experiment codex-gpt-6-luna-cli-docurl-on --runs 5

#7749 is not in a release yet. For a run before the merge, I used a local patch (not in this PR) that copies the branch CLI binary into the sandbox. Results, 5 runs per task, per arm, per agent:

Evals Agent Pass off → on Read the article Saw the link (on) Median steps off → on
002 to 004 Claude Sonnet 5.5 15/15 → 15/15 0% → 0% 100% 4 → 4
002 to 004 GPT-6 Luna 15/15 → 15/15 0% → 0% 53% 9 → 9
005 to 007 Claude Sonnet 5.5 15/15 → 15/15 0% → 0% 100% 4 → 4
005 to 007 GPT-6 Luna 15/15 → 15/15 0% → 0% 40% 9 → 9

The link did not change pass rate or steps. Agents fix local database errors on their own. The next step is evals on hosted projects, where the cause (pooler limits, Auth and Storage settings, billing gates) is not on the agent's machine.

  • Ran the eval locally, and it completes without framework errors.
  • Ran it in CI with the run-evals-changed label or the Refresh eval results workflow, and linked the Braintrust run here.

Part of P-DOCS-4368.

🤖 Generated with Claude Code

nrichers and others added 2 commits November 27, 2026 11:23
Add three resolve-stage CLI evals (sequence out of sync, oversized btree
index row, unqualified schema query) and four off/on experiments for
Claude Code Sonnet 5.5 and Codex GPT-6 Luna. They measure whether an agent
reads the /kb article that supabase/cli#7749 links in error output.

The evals carry customMetadata.abGroup: cli-docurl. The scheduled CLI
experiments now skip them, and only the docurl experiments run them.
read_doc_url and saw_doc_url are recorded as always-passing checks, so
they never change the pass decision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ll byte, pooler read-only)

Add resolve-cli-005 to 007. Each failing command is named in the prompt, and
each fix is Supabase-specific and in the linked /kb article. The scorers fail
the obvious workaround (a table-wide grant, an edited script, a deleted
read-only guard). runSql accepts a dbUrl so a scorer can connect as another
role or through the pooler.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Nov 28, 2026 1:05am UTC

Request Review

This branch has not been deployed

No deployments
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.

1 participant