Repository navigation
feat(evals): add build-database-005-apply-schema-change CLI eval (CLI-2701) - #406
Merged
Coly010 merged 7 commits intoOct 19, 2026
Conversation
Only migrations that sort after the seeded version count, and their due_date actions are folded in order, so a later drop or a shape repaired only in the live database fails. The history check requires every touching migration, and the report judge now sees tool outputs.
…701) The replay starts from what the seeded file defines, old-dated files that touch tasks fail and stay visible to the history check, generated columns are rejected, and the check notes name the final shape once.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…2701) A migration applied while empty and filled in afterwards no longer passes the history check. The README now marks the Docker-less arms as red until the stack backend is the default (CLI-2534).
Coly010
marked this pull request as ready for review
October 19, 2026 13:22
avallete
approved these changes
Oct 19, 2026
avallete
left a comment
Member
There was a problem hiding this comment.
LGTM, the scorer checks the end state and the refreshed results line up. A few non-blocking follow-ups:
- Motivation:
PROMPT.mdcites only CLI-2701, which is the ticket for building this eval. The real evidence (PostHog: 12,177 sessions, 35% non-zero exit) lives in the README and PR body; could it move intomotivation:? Note that figure includesdb pushto hosted, which this eval doesn't exercise. - Shared helpers:
formatTruthfulJudgeInputinreport.tsisformatGroundTruthJudgeInputfromevals/cli/lib/report.tsplusincludeToolCallOutputs. #407 adds that option to the lib helper, so whichever lands second can call it directly.MIGRATION_FILENAME_REinmigrations.tsis the same regex asevals/cli/lib/migrations.ts:13; exporting it would avoid the copy. - Duplicated tests: the
report judgeandmetrics checkblocks inEVAL.test.ts(e.g. :890 vsreport.test.ts:173, :951 vsreport.test.ts:269/293) assert the same output as the module tests. Keeping the pass / known-bad / valid-alternative runs at the EVAL level and leaving formatting cases to the module tests would cut the suite down a lot.
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.
Current Behavior
No CLI eval covers the most common local schema workflow: make a schema change, capture it in a migration, and apply it to the local database. In a 1% device sample of agent CLI sessions (Sep 15 to Oct 14 2026), the "new migration, apply, push" workflow (
migration new→db push/db reset) showed up in 12,177 sessions with a 35% non-zero-exit rate. 39% of those sessions came from Claude Code and 50% from Codex.Expected Behavior
Adds
evals/cli/build-database-005-apply-schema-change(CLI-2701). The prompt is a user asking to add the due dates their app code already uses to the database and apply the change locally. It names no command, column, file or tool (fixtures.test.tsguards a word list).The seeded project has one applied migration creating
public.tasks, a seed with three rows, andsrc/tasks.ts. That file reads, writes, orders by and clears adue_date: string | null, so it fixes the column's name and shape: a nullabledate,timestamportimestamptz. No stack is running (projectRunning: false), and there's nopackage.json,.envorsupabase/schemas.needsDocker: false, so all six cli experiments run the eval, including nodaemon and absent.local stack is running for this projecttasks.due_date exists in the local database as a nullable date or timestampa new migration adds due_date to tasks as a nullable date or timestamptasksfail, since a reset runs them before the table existsthat migration is recorded in the local migration historysupabase_migrations.schema_migrations, so a handpsqlapply plus a file written afterwards failsno container-runtime detoursmetricsfinal report is truthful about the schema changeNotes
supabase startuses the legacy Docker backend unless the stack backend is switched on, and nothing in the seed switches it on. The fix is tracked in CLI-2534. On 2.117.0, 2.121.0 and the 2.122 betas the declarative route is gated behind--experimental; on next it isn't. Either route ends in a migration file and a history row, so the scorer checks one end state.migration repair --status appliedpasses the history check. The README lists this with the other known limitations: DDL inDOblocks, named stacks, domains overdate.lib/is untouched. The truthful-report judge uses a local formatter that includes tool outputs, mirroringbuild-database-003-parallel-projects. Follow-up: add anincludeToolCallOutputsoption tolib/report.ts, and exportMIGRATION_FILENAME_REand an N-version history probe fromlib/migrations.tsso this eval can drop its copies.area/journeyPhasefrontmatter keys follow the CLI evals plan. The framework's metadata schema currently strips them.Verified locally
pnpm format:check && pnpm typecheck && pnpm test.test:frameworkstops at its judge-key step locally; the remaining legs pass when run separately.pnpm eval -- list --experiment-suite cli --eval build-database-005-apply-schema-changepicks it up on all six arms.Results
Latest refresh: run 39243185470 at a07c659, 3 runs per arm.
migration newor by hand), ransupabase startto apply it, and checked withmigration list/db query. In each, the history row matches the file and there was no hand DDL (directDdlCommands: 0).supabase start. The messages it saw pointed at Docker:statussaid "install Docker Desktop or Podman", andmigration upsaid "Make sure Docker is running, then run: supabase start". Every report named Docker as the blocker.migration up, then the DDL was hand-run throughdb query. The history check now compares recorded statements.startfalls back to the native runtime was wrong.apply_patchthrough the shell, where it isn't on PATH. The captured output drops the "command not found" line when the compound command exits non-zero. In the first refresh this made the truthful-report judge fail a mostly accurate report (pinned r3). It didn't recur in the second.Related Issue(s)
Closes CLI-2701
🤖 Generated with Claude Code