feat: enforce conditional entity mutations with record revisions - #138
Merged
Conversation
rrrodzilla
marked this pull request as ready for review
September 7, 2026 21:23
Resolves the patch-handler conflict between the in-process constraint check (#133) and the conditional revision persist helper: the constraint check now runs before persist_entity_update, matching the replace path.
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.
Prepared PostgreSQL schemas can reject stale record updates and deletes using an opaque revision returned by authorized detail reads. Conditional mutations compare that revision atomically with persistence; ordinary writes also advance it so they invalidate old snapshots.
Preparation is explicit through
apply --prepare-record-revisions. Unsupported or unprepared schemas refuse conditional writes. Authorization remains ahead of revision errors. The contract and rollout limitations are documented indocs/conditional-entity-mutations.md.Validation: 664 Acton, 361 CLI, and 166 backend/PostgreSQL tests passed, plus both live PostgreSQL concurrency suites. Relevant Clippy checks passed without warnings, including MSSQL and SurrealDB. External MinIO cases remain separate. A PostgreSQL CI workflow covers preparation and HTTP/storage concurrency.
Stacked on metadata-only apply PR #137. Includes measured fixes for cached dynamic query shapes after DDL and NO_COLOR parsing. No registry release or production deployment is implied.