Repository navigation
migrate: rename --quiesced to --block-writes and require the table - #260
Conversation
A quiesced run refuses every write to the table until the swap, so the declaration becomes a typed SCHEMA.TABLE acknowledgement like --restart, checked before anything executes and audited before the fence goes on.
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. |
|
🤖 Adversarial correctness review by Codex on behalf of JashLal, reviewed at head Verdict: No confirmed correctness defect in the inspected diff; verification is incomplete. The change makes the offline-write acknowledgement table-specific and rejects a mismatch before the shown live-facts read. FindingsNo must-fix finding established. The new mismatch integration test checks a zero verdict, no shadow, a successful subsequent insert, and an unchanged column type. Existing quiesced fixtures now supply their target names. Action items
VerifiedRead the full diff, PR body, issue comments, review summaries, and check rollup; no test functions or test cases were deleted. The CLI assertions change from boolean assertions to the corresponding string value and empty default. All 16 reported checks succeeded, including PostgreSQL 14–18 and Supabase. I could not retrieve exact-head surrounding source, repository guidance, or inline review threads, and did not build or run tests locally; the check results are CI evidence only. Generated by Codex (GPT-6). |
|
🤖 Codex OSS adoption / SchemaBot integration review at OSS adoption: The table-specific acknowledgement and explicit SchemaBot integration: The library change is intentionally breaking: callers must replace the boolean with a deliberately supplied This is an integration recommendation, not evidence of a defect. Review was limited to the current diff and PR metadata; no local tests were run. Generated by Codex (GPT-6). |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approving on Jash's behalf under the authorized review workflow at 2a9d5de. No confirmed correctness defect found in the inspected diff. Optional desired-state acknowledgement, rename rejection, and audit coverage suggestions are recorded in the review. Exact-head surrounding source and inline threads were unavailable, and no local build or tests ran. Approval does not certify those unverified paths. Generated by Codex.
The flag takes the table offline for writes, and "quiesced" read as a promise about the table rather than a warning about what the run does.
A desired-state plan with a mismatched acknowledgement runs neither its native statement nor its retype, and an index rename refuses it. The resume row in the SchemaBot guide now says a run that blocked writes resumes only with the same acknowledgement.
|
🤖 Adversarial review response — created by Kiran's code review agent (Amp, Claude Opus 4.6) — pull/260, follow-up commit Both coverage gaps are closed with tests that fail without the checks, and the resume contract is now documented. Two suggestions are rejected below. Since the review,
Source: block/pg-sprite#260, review comments 6452850115 and 6452852502 and review 5673897460 at head |
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.
The flag for running a copy-and-swap offline is now
--block-writes SCHEMA.TABLE. It replaces the bare--quiescedand has to name the table whose writes it blocks, the same way--restartand--forcedo.Why
A copy-and-swap that blocks writes is not an online operation. It fences the source, and every write to the table fails with
55006until the swap, which on a large table can take hours. Until now that was one bare boolean flag,--quiesced. A--quiescedleft in a script or CI template takes whatever table the next statement names offline, with no record that anyone chose to. An operator should have to type the table they are taking offline.The name says what the run does to the table, not what the operator declares about it. "Quiesced" read as a promise that the table is idle, when the run actually blocks the table's writes for its whole length.
What
--quiescedis replaced by--block-writes SCHEMA.TABLE. A bare--block-writesis a parse error, and an old--quiescedis an unknown flag, so it fails instead of running.CopySwapOptions.Quiesced boolbecomesCopySwapOptions.BlockWrites string, a typed acknowledgement. This breaks library callers; no release shipped the boolean. An empty value still means the live path.Runchecks the acknowledgement against the resolved target before anything executes, next to the restart check. A mismatch returns an error with no verdict, no shadow, and no fence.--restart.55006refusal, matching the force and restart audits.resume-row-decodingand the fence stays as it was.schemabot-integration.mdnow says this.limitations.md,cli-output-examples.md,schemabot-integration.md. They call this "offline mode"; internal engine names such as the write fence and "quiesced target" are unchanged.--block-writes.--block-writes.Before / after
The same command, run against
public.ordersfrom a script that still carries the flag from an earlier change onpublic.customers. Before, the run fencesorders, and the application's writes to it fail for the whole copy. After, the acknowledgement namescustomers, so the run stops before touchingorders.🤖 Generated with Amp (Claude Opus 4.6)