Skip to content

feat(docs): add a generating types guide eval - #558

Draft
czenko wants to merge 1 commit into
mainfrom
docs/generating-types-guide-eval
Draft

czenko wants to merge 1 commit into
mainfrom
docs/generating-types-guide-eval

Conversation

@czenko

@czenko czenko commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes DOCS-1666

Problem

Nothing measures whether the Generating Types guide leads an agent to types that match the local database. A typed app breaks when its types miss part of the database. A second schema drops out of the types file, or a database function stays typed as never.

Evidence:

Docs finding, checked by hand on the pinned CLI 2.117.0:

  • The page's local command, npx supabase gen types typescript > database.types.ts, exits 1 with "Must specify one of --local, --linked, --project-id, or --db-url". It writes that error into the types file.
  • --remote, used in the page's hosted, self-hosted and update-types commands, is "Unrecognized flag".
  • Both work on CLI 3.x, where local is the default. No check scores a command, only outcomes, so the pin does not decide a verdict.

evals/cli/build-database-006-regenerate-types overlaps in part. Its subject is the agent across CLI versions, and it has no second schema, no function and no refresh after a change. The README says how the two differ.

Sources reached: Linear, Slack, supabase/supabase, supabase/cli and agent-skills issues, the CLI run by hand. Not reached: Hex, Supacademy. Slack had CLI team threads about type generation internals, and no user failure.

Changes

Adds build-docs-036-generating-types. A bookshop app's TypeScript fails to compile, because its client imports database types that do not exist. The prompt asks for types that match the local database and a working refresh command. The seed puts the books table, an enum and a search function in an exposed catalog schema, and orders in public. Its CONTRIBUTING.md names npm run db:types as the refresh command, and package.json does not have it yet.

Checks:

  • The app type-checks in strict mode with no suppression comments.
  • The types match the local tables and function the app uses. The probe follows the client's createClient<...> import, so types at any path pass.
  • The refresh command picks up a new column in the local database. The scorer adds a run-scoped column, links the pinned CLI into node_modules/.bin, runs npm run db:types, and compiles again.
  • The agent read the generating types guide.

Expected signal: A --schema public command copied from the page leaves out catalog and fails the match check. Hand-written types, or the page's update-types script as written, fail the refresh check.

What part of the guide this tests:

Guide section Tested How
Generating types with the CLI, local development Yes, by outcome The match and refresh checks
Using the types with supabase-js Pre-solved The seed client already uses createClient<Database>
Helper types and overrides No An override over generated types still passes
Updating types with GitHub Actions Partly The refresh check runs the agent's script. The workflow file is not scored
Dashboard, hosted and self-hosted generation No Not reachable locally

Verification

  • pnpm exec biome check evals/docs/build-docs-036-generating-types passes.
  • pnpm --filter @supabase-evals/framework typecheck passes.
  • pnpm eval:dry -- --suite docs --eval build-docs-036-generating-types plans one pair on codex-gpt-6-luna-no-skills.
  • Baseline: three runs of codex-gpt-6-luna-no-skills in the run-evals-changed run. All three passed all four checks, including the guide read. A full-marks pass does not show the page carried the run. Braintrust run.

For new or changed evals (see Submitting evals for review):

  • 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 (suite: regression for framework changes), and linked the Braintrust run here.

@czenko czenko added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 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 25, 2026 7:53pm 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

run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant