Skip to content

Allow atomic target-schema template migrations for one page - #89

Merged
obsessixnv merged 9 commits into
mainfrom
fix/40-atomic-template-migration
Sep 15, 2026
Merged

obsessixnv merged 9 commits into
mainfrom
fix/40-atomic-template-migration

Conversation

@obsessixnv

Copy link
Copy Markdown
Contributor

A template revision that adds required fields to closed schemas could not be adopted: config/data updates rejected the new fields against the live schema, while rerender rejected the old values against the target schema. Allow optional complete target-shaped config and data in the existing per-page rerender operation, requiring the live expected_version whenever either is supplied. Both blocks validate against the target before one immutable version and its audit event are written under the page lock.

Omitted blocks come from the published page. Omitted data retains its entire envelope; replacement data requires explicit source_as_of and honors the shared coverage floor, including legacy unindexed drafts. Default draft behavior, approval gates, template provenance and exact retry behavior are preserved; retry responses describe the stored version. Generated instructions combine schema-dependent settings with the reviewed rerender while retaining explicit publication and draft-dependency guards. No database migration or bulk page migration is introduced.

Validation: all 250 unit tests and the full PostgreSQL integration suite passed on the combined main base, including #26/#27/#28/#29/#41. Focused MCP and publication-prompt regressions also passed; full browser checks run in CI. Regressions cover closed-schema migration, failed/stale writes leaving history/audit/live pointers unchanged, exact retry metadata, indexed and legacy coverage floors, approval gates, config-only freshness preservation, MCP input contracts and generated workflow order.

Closes #40.

@obsessixnv obsessixnv added enhancement New feature or request priority:P2 Normal: correctness, reliability, or supported-workflow failure. size:L Large: roughly 4+ engineering days or migration/rollout work. area:templates Pages templates functionality and maintenance. audit:2026-09-14 Functional and reliability audit of commit 420bad8; cybersecurity excluded. labels Sep 15, 2026
@obsessixnv
obsessixnv merged commit a24bf92 into main Sep 15, 2026
5 checks passed
@obsessixnv
obsessixnv deleted the fix/40-atomic-template-migration branch September 15, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:templates Pages templates functionality and maintenance. audit:2026-09-14 Functional and reliability audit of commit 420bad8; cybersecurity excluded. enhancement New feature or request priority:P2 Normal: correctness, reliability, or supported-workflow failure. size:L Large: roughly 4+ engineering days or migration/rollout work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] Template schema changes have no atomic path for migrating page config or data

1 participant