fix: identify production preflight stage - #5
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7f7b7979c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ]); | ||
| migrations = verifyD1SchemaAndMigrations(schemaOutput, localMigrationNames); | ||
| } catch { | ||
| throw fixedError("Cloudflare D1 schema preflight failed"); |
There was a problem hiding this comment.
Name migration-ledger failures in the D1 stage
When the remote command succeeds but verifyD1SchemaAndMigrations rejects the migration ledger or foreign-key results, this catch rewrites the failure as Cloudflare D1 schema preflight failed. That incorrectly directs operators toward schema drift even when the schema signature passed and the applied migration filenames are the only problem; keep the message redacted, but name the combined schema/migration-ledger/integrity stage.
Useful? React with 👍 / 👎.
Problem
The first automatic main deployment correctly failed closed, but the production preflight collapsed four safe checks into one generic error. After the missing D1 migrations were applied and verified, the rerun still could not distinguish a Cloudflare API-token permission failure from custom-domain drift.
Change
Verification