Allow atomic target-schema template migrations for one page - #89
Merged
Merged
Conversation
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.
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
configanddatain the existing per-page rerender operation, requiring the liveexpected_versionwhenever 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_ofand 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.