Repository navigation
Conversation
The abandon was proven at the Runner and at migrate.Run, but not through the front door, not on a live run under load, and not for the fence, slot, publication, and checkpoint row together. These two tests hold the CLI's verdict, exit mapping, and server state to the data-fault contract the execution-model doc states.
Main renamed --quiesced to --block-writes SCHEMA.TABLE (#260), so the data-fault test now sets BlockWrites to its table and is renamed to match.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Reviewed on Jash's behalf at Verdict: no blocking defect found in this test-only diff. The two CLI cases check the typed abandonment and SQLSTATE, JSON outcome, released resources, unchanged column type, and ability to write afterward. Keeping deletes out of the live workload avoids intentionally removing the planted violator. Two optional coverage improvements:
Verification: read the full 200-line diff and PR description, and checked the current head. GitHub reports all 16 checks successful, including PostgreSQL 14–18 integration jobs. I did not run a local build or tests. The source-file API was unavailable, so I could not inspect the unchanged workload, copier, or CLI exit-mapping implementations; the asserted error classification is not itself a subprocess exit-code test. — Codex |
|
🤖 Product review at OSS adoption: This improves coverage of an actionable failure contract: SchemaBot integration: Preserving — Codex |
Two front-door integration tests prove that a copy-and-swap run which meets a value the new type cannot hold is abandoned cleanly:
failed/data-faulton stdout, exit 1, and nothing left on the server.Why
The abandon path exists and is tested at the Runner (
pkg/schemachange) and atmigrate.Run, but neither test drives it the way a user or an orchestrator does — throughpg-sprite migrate --json— and neither holds the server to the whole promise thedata-faultrow indocs/execution-model.mdmakes: shadow dropped, write fence off or slot and publication dropped, checkpoint row deleted, source untouched and writable. The existingmigrate.Runtest also makes every row violate, so the fault fires on the first chunk; a realistic fault is one bad row deep in a table that has already landed chunks in the shadow. The live abandon under load has no front-door coverage at all.What
internal/cli/data_fault_integration_test.goadds two tests over the workload table, each with one planted 64-characterlabelat row 3000 of 4000 and the statementALTER COLUMN label TYPE varchar(32):TestMigrateReportsABlockWritesDataFaultAndLeavesNothingBehind—--block-writes SCHEMA.TABLE, so the run holds the write fence.TestMigrateReportsALiveDataFaultAndLeavesNothingBehind— awal_level=logicalserver with an insert/update load running throughout, so the run holds a replication slot and publication; the load is never fenced and reports no write error.Both assert the run's error is the Runner's
AbandonedErrorcarrying SQLSTATE22001and is notErrRefused(exit 1, not 2); the JSON verdict isfailed/data-faultfor the table, notforced, with a detail that says the run was abandoned, names what was released, and offers no--restart; and the server has no shadow, nopgsprite_write_fencetrigger, no checkpoint row,labelstilltext, the planted row still the only violator, every seeded row present, and the source accepting an insert. The live test also asserts zero rows inpg_replication_slotsandpg_publication.No production code or docs change; the tests hold the code to claims the docs already make.
Before / after
The same statement and the same table on both sides: 4000 rows, one
labelof 64 characters at row 3000, narrowed tovarchar(32). Before, the front-door path had no proof past the first chunk and no proof of what a live run releases; after, both runs are driven throughcmd.runwith--jsonand the server is checked field by field.🤖 Generated with Amp (Claude Opus 4.6)