Repository navigation
Conversation
Contributor
Author
|
/ok to test 1299b61 |
Contributor
Author
|
/ok to test d7e2431 |
This was referenced Nov 3, 2026
ffrujeri
force-pushed
the
ffrujeri/bird-interact-postgres
branch
from
November 4, 2026 21:33
d7e2431 to
c4d1e49
Compare
Contributor
Author
|
/ok to test c4d1e49 |
Lite and Full keep their databases in PostgreSQL. With database_engine: postgresql, each episode starts its own sandbox from an image whose build restores every database of the release once (postgres/Dockerfile), so an episode starts PostgreSQL instead of restoring dumps, and a write in one episode never reaches another. - grading.py has a PostgreSQL engine beside SQLite. setup starts the image's server and applies preprocess_sql to <db>_template; each query then runs in a transaction that is rolled back, as SQLite runs each on a scratch copy. - Values are normalized by the benchmark's rules for PostgreSQL's types: decimals to two places, half-up; dates and timestamps as YYYY-MM-DD; JSON values as sorted JSON. SQLite never returns these types, so its grading does not change. - The server sends the engine and the database with every request, uploads no database for PostgreSQL, refuses postgresql without a sandbox image, and names the dialect in the instructions. - Management tasks still fail at seed: their custom test_cases do not run yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
…use follow-up test cases The PostgreSQL image and the Lite and Full how-to move to the benchmark recipe (benchmarks/bird_interact, next in the stack), which also prepares the data and runs the benchmark. The server keeps what it needs to run on any image that holds a release's databases as <db>_template. A task whose follow-up has custom test_cases now fails at seed, as one with its own already did: every Lite and Full task has a follow-up, and its phase 2 would otherwise be graded by the default test case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
ffrujeri
force-pushed
the
ffrujeri/bird-interact-postgres
branch
from
November 6, 2026 17:23
c4d1e49 to
58c6c91
Compare
Contributor
Author
|
/ok to test 58c6c91 |
This branch was previously 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.
Stacked on #5409 (BIRD-Interact in its Environment Server), in the BIRD-Interact stack: #5465 → #5409 → this PR → #5475 (the benchmark recipe), on the
BaseEnvironmentServerWithToolsstack (#5346 → #5350). This PR's diff against #5409 isenvironment_servers/bird_interactonly, in two commits: the second moves the image to the recipe and refuses follow-up test cases.What changed
BIRD-Interact Lite and Full keep their databases in PostgreSQL; #5409 runs only SQLite (Mini-Interact). With
database_engine: postgresql, a task's database is<db>_templatein the PostgreSQL server of the sandbox image, and each episode starts its own sandbox from that image, so a write in one episode never reaches another. The benchmark recipe (#5475) builds the image with the databases already restored, prepares the data and runs Lite and Full.grading.pyhas a PostgreSQL engine beside SQLite, behind the samesetup,executeandgradecommands.setupstarts the image's server (socket only) and appliespreprocess_sqlto<db>_template. Each query then runs in a transaction that is rolled back, as SQLite runs each on a scratch copy.YYYY-MM-DD; JSON values as sorted JSON. SQLite never returns these types, so its grading does not change.postgresqlwithoutsandbox_config.image, and names the dialect in the instructions (PostgreSQL, asqlfence; apostgresqlfence is also read).test_casesnow fails at seed, as one with its own already did. Every Lite and Full task has a follow-up, and its phase 2 would otherwise be graded by the default test case.<db>.sqliteuploaded into each episode's sandbox<db>_templatein the sandbox image's PostgreSQLWhy
A sandbox per episode keeps #5409's lifecycle and isolation, and an image with the databases restored at build time removes its cost: BIRD-Interact's official image restores 18 databases whenever a container first starts, which would repeat in every episode. A shared PostgreSQL per worker would be cheaper still in memory, but its sandbox would outlive episodes, need a database per episode cloned from a template, and fail every episode on the worker with it. Tracking: GYMINT-646 (Linear).
Validation
pytest environment_servers/bird_interact/tests/test_app.pypostgresqlrequest to the image's server, committingpreprocess_sqland rolling back a query, and its preview; the server refusingpostgresqlwithout an image and running an episode onbookshop_templatewith the engine in every request, no database uploaded, and the dialect in the instructionsng_test +entrypoint=environment_servers/bird_interact +should_validate_data=truepre-commit run --fileson the changed filesNot validated yet:
TestPostgresDatabase(rollback, statement timeout, numeric and date grading) skips withoutinitdb,pg_ctlandpsycopg2, which neither this machine nor CI has.Rollout evidence
N/A for now: Lite and Full withhold
sol_sql(GYMINT-592), so no task runs without the ground truth, and the recipe's image is not built yet. The SQLite path is unchanged; its 37 episode tests pass as before.Compatibility
database_enginedefaults tosqlite, andsandbox_config.imagetopython:3.12-slimfor SQLite, so existing configs run as before. Management tasks, which have customtest_cases, still fail at seed: Lite runs 195 query tasks of 300, Full 410 of 600.🤖 Generated with Claude Code