feat(plan): disclose greenfield steps as plain executable statements - #69
Open
Kiran01bm wants to merge 2 commits into
Open
feat(plan): disclose greenfield steps as plain executable statements#69Kiran01bm wants to merge 2 commits into
Kiran01bm wants to merge 2 commits into
Conversation
A greenfield create plan runs each statement verbatim, so the report now carries exec_sql and autocommit execution per step instead of leaving the reviewer to infer the create path's execution from the desired file.
… execution A safer-idiom decision left on an execute statement with no safer_sql is a state router.Route cannot produce; the CLI keyed a blocking-lock warning off it right before "runs as written". An index on a table born in this run has no readers to lock out, so it takes the same reason the planner already gives the CREATE TABLE. Docs disclose the greenfield fingerprint value change.
Kiran01bm
marked this pull request as ready for review
September 3, 2026 04:40
Kiran01bm
requested review from
JashLal,
aparajon,
eeSeeGee,
jayjanssen,
jemiahw and
morgo
as code owners
September 3, 2026 04:40
|
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.
Greenfield plan statements now disclose what the create path actually executes:
exec_sqlis the statement as written, each build's decision is reclassifiedmetadata-only, and noCONCURRENTLYsubstitution is shown for a table that does not exist yet.Why
A greenfield
CREATE TABLEplan (the table does not exist yet) is executed statement-by-statement by the create path, which runs the desired file's builds verbatim and refuses a concurrent build on a table born this run. The plan report disclosed the opposite: the planner's live-table rewrite (CREATE INDEX CONCURRENTLY …) as the greenfieldexec_sql, with asafer-idiomdecision and a blocking-lock warning in the human report. An orchestrator that ranexec_sqlitself ran a form the engine never would, and a reviewer was told a table nobody reads yet was about to be locked.What
plan.DiscloseGreenfieldExecutionsetsexec_sqlto the statement itself andexecution: autocommitfor every executable greenfield statement, withdrawssafer_sql, and re-stamps asafer-idiomdecision tometadata-only— the reason the planner already gives theCREATE TABLEitself. Refused, rewrite-required and unavailable statements are untouched.diffplancalls it on the greenfield branch, sopg-sprite diff --json,--sql(-- native (metadata-only)), the human report (note[metadata-only]…runs as written) and the libraryReportall agree.RefuseUnsupportedPartitionedParent.plan-report.md(field rows, reason vocabulary, Fingerprint),postgres-online-ddl-reference.md(metadata-only/safer-idiom),safer-sequences.md,schemabot-integration.md.Fingerprint change, no version bump.
plan.Fingerprinthashesexec_sql, so every greenfield plan's fingerprint changes value (for the same desired file,sha256:63a6cd9e…→sha256:df731940…). The serialization is unchanged andformat_versionstays 2; the fingerprint now commits to what runs. A consumer holding a pre-upgrade greenfield fingerprint gets oneplan-fingerprint-mismatchand re-plans. Fingerprints for existing tables are unaffected.docs/plan-report.mdcarries the caveat.Before / after