Repository navigation
feat: Add a docs eval for database migrations - #527
Merged
jeremenichelli merged 2 commits intoNov 23, 2026
Merged
jeremenichelli merged 2 commits into
jeremenichelli merged 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
czenko
approved these changes
Nov 20, 2026
Contributor
There was a problem hiding this comment.
Approving. The scratch-database rollout is a good way to catch an in-place edit, and the probes use a per-run marker. Please fix the title before merging:
- The title says "[DOCS-1645] ... api/securing-your-api", but this PR adds the database migrations eval, and the branch says docs-1642. Retitle it to the migrations ticket and page. Otherwise the squash commit labels this eval as a different one. #525 has the reverse mix-up.
One note:
seedMigrations()usesnew URL(...).pathname, which percent-encodes spaces. In a checkout path with a space, the seed reads as empty. Thenthe migrations that were already in the repo are untouchedpasses on nothing, and the rollout applies the workspace's edited copies of the shipped files. UsefileURLToPathand throw when the seed is empty.
The exec-sql.ts change keeps the default path, so the other evals that use it are unaffected.
Contributor
Author
|
@czenko yeap, I copied the branch from the wrong tab, will fix. |
jeremenichelli
enabled auto-merge (squash)
November 23, 2026 14:16
jeremenichelli
force-pushed
the
jeremiasmenichelli/docs-1642-add-a-docs-eval-for-migrations
branch
from
November 23, 2026 14:17
dac6753 to
db50a9d
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.
What is the current behavior?
Nothing scores the Deploy database migrations guide, and no existing eval covers it.
build-docs-015-cascade-deleteschecks that a migration file was written, but it is about a different page.The page teaches the workflow in its walkthrough (
migration new, add the SQL,migration up). It does not say that a migration which has already shipped must not be edited, or that a column added to a table with rows needs a value for those rows. Related evidence, all in supabase/agent-skills: #578 (preserve committed migrations, use forward fixes), #519 (migration replay safety), #538 (repo naming conventions), #599 (history repair). The last two are out of scope here and named as such in the README.What is the new behavior?
The claim under test is that a schema change ships as a new migration that applies cleanly.
An agent gets a bakery app with two migrations that
local/README.mdsays production has already applied. It is asked to add a standard or express delivery option to every order, with existing orders reading "standard". The prompt avoids the page's vocabulary, and the README lists the stripped words.The scorer runs nine checks:
standard|3supabase db resethas the optionThe check that carries the claim is the rollout. Editing an old migration and running
db resetlooks fine locally. In the scratch database it fails, because production never re-runs a file it has applied.I expect the file checks and the local-database check to saturate. The signal should be in the rollout and the checks behind it.
Supporting change:
evals/docs/lib/exec-sql.tsgains an optionaldatabaseoption so probes can run against the scratch database. The name is validated (^[a-z0-9_]+$) because it reaches a shell command. The default path is unchanged.Additional context by Claude
supabase db resetandcreate databaseagainst a real stack have not been exercised.run-eval.ts --dry), and Biome andtscreport nothing on the new files.NOT NULLwith no default, a file sorting before the existing ones, a direct alter with no file, a non-runnable filename, and others). Each failed the checks I predicted beforehand. A broken rollout also fails the three checks behind it with anot runnote, by design.execSqlwas checked with stubsupabaseandpsqlbinaries.run-evals-changedlabel for the baseline, then record anything that broke inflakiness.mdwith this PR's number.authorstorageschemas. The seed has no table that needs them. The local-database and rebuild checks read the real database for that reason.020because 016, 018 and 019 are taken across main and open PRs. [DOCS-1645] feat: Add a docs eval for securing-your-api #525 is titled for this page but contains the "Securing your API" eval, and its id 018 collides with main'sbuild-docs-018-redirect-urls.