Skip to content

fix(schema): the pre-reconcile default-dataset sweep reads only the org columns it copies (#1290) - #1291

Merged
athvin merged 1 commit into
mainfrom
fix/518-post-merge-boot
Nov 27, 2026
Merged

athvin merged 1 commit into
mainfrom
fix/518-post-merge-boot

Conversation

@athvin

@athvin athvin commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #1290

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

ensure_default_datasets (runs before the reconciler) reads only the org columns it copies instead of the generated full-row statement; a pg_schema_replay phase pins it.

Follow-up to #1286 (#518): every deploy since it merged fails in er-schema-migrate with column "record_allowance" does not exist (runs 45922458663, 45923693490); --atomic keeps the previous release serving.

Proof

  • New pg_schema_replay phase 6 passes; run against the previous fixups.rs it fails with the deploy's exact error (SqlState(E42703) column "record_allowance" does not exist).
  • make check (see comment once finished).

Risk & rollback

Narrows one read; same rows, same fields. Reverting would re-break deploys.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-27T02:01:19Z

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

🤖 Generated with Claude Code

…rg columns it copies (#1290)

Every deploy since #518 failed: er-schema-migrate planned the additive
`ADD COLUMN record_allowance`, then ensure_schema died on `column
"record_allowance" does not exist` before the reconciler could add it.
ensure_default_datasets runs ahead of the reconciler and read orgs through
the generated full-row org::read::list, which names every catalog column,
so any new orgs column broke boot on every existing store. --atomic rolled
dev and prod back, leaving the previous release serving.

The sweep now selects only the eight columns it copies into the default
dataset (OrgSeed), as the adjacent config_versions read already does for
the same reason. pg_schema_replay gains a phase that drops the newest org
column and boots the store; it fails on the previous code with the
deploy's exact error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin

athvin commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

make check: exit 0 (local, on the PR head).

@athvin
athvin merged commit b3c3907 into main Nov 27, 2026
39 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 27, 2026 01:51 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 4f4534cf Deployed Nov 27, 2026 by athvin via remove closed PR previews #86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploys fail since #518: the pre-reconcile default-dataset sweep reads orgs through the full-row statement

2 participants