docs: safer-sequences page (the improve path) + post-#50 clarifications - #51
Open
Kiran01bm wants to merge 3 commits into
Open
docs: safer-sequences page (the improve path) + post-#50 clarifications#51Kiran01bm wants to merge 3 commits into
Kiran01bm wants to merge 3 commits into
Conversation
The committed-prefix section showed the four-step SET NOT NULL sequence without saying what the original statement was or why it decomposes that way — a per-step table now covers purpose, lock profile, and budget class. "Needs-rewrite" in both design docs read as if the submitted SQL needed rewording; it means a PostgreSQL table rewrite (the copy-and-swap executor's job) — safer-sequence substitution stays on the native-safe path.
The improve path had no human-first explanation of why the substituted sequence is safer — the ADD CONSTRAINT UNIQUE two-step is worked through as the example (same end state, different locking, failure modes, transactionality, cost), plus what the engine adds over running the idiom by hand, the substitutions made today, and the typed caveats. Linked from the README's Improve paragraph and the docs index.
Kiran01bm
marked this pull request as ready for review
August 20, 2026 08:43
Kiran01bm
requested review from
JashLal,
aparajon,
eeSeeGee,
jayjanssen,
jemiahw and
morgo
as code owners
August 20, 2026 08:43
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
Adds
docs/safer-sequences.md— a human-first explanation of the improve path: why the planner's substituted sequence is safer than the submitted form, worked through onADD CONSTRAINT … UNIQUE— and carries two small follow-up clarifications that missed the #50 merge.Why
The improve path is the product's headline move, but nothing explains why the substitution is safer — the README demos show it happening, the reference doc has the per-operation matrix, and the contracts carry the machine shape, yet a reader who asks "these two forms end in the same catalog state, so what did I gain?" has no page. The answer (blocking risk traded for leftover-state risk, exclusive locks confined to catalog flips) is the argument that wins an evaluator.
What
docs/safer-sequences.md: the workedADD CONSTRAINT … UNIQUEcomparison — one-statement vs two-step across locking, duplicate-failure behavior, transactionality, and cost; what the engine adds over running the idiom by hand (budgets per step, typed verdicts, visible substitution); the substitution families shipped today; the typed caveats and theUSING INDEXstructural limits.docs/README.mdindex: link the page.SET NOT NULLsequence (purpose, lock profile, budget class), and both design docs disambiguate needs-rewrite — a PostgreSQL table rewrite (copy-and-swap's job), not a rewording of the submitted SQL.Before / after