Simplify offline command and projection ownership - #70
Merged
Conversation
✅ Deploy Preview for rdlabo-ionic-angular-library ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
What changed
OfflineCommand.payloadimmutable and move revision changes to Kit-ownedbaseRevisionmetadatawithServerRevision/withoutServerRevisionhooks and the unused publicpayloadHashpayload_hashcolumn as a physical compatibility sentinelscope + changesdecomposition contractWhy
Revision state and derived-row ownership were represented in more than one place. That made a command payload mutable after enqueue and forced product projectors to read the repository and rediscover pending state.
The new boundary keeps business intent immutable, lets Kit own transport revision metadata, and makes Pull the only authoritative confirmed-row writer while preserving the existing Outbox, conflict, FIFO, and reconciliation guarantees.
Compatibility
The logical
payloadHashfield is removed, but the SQLite v2 physical column remains and receives an empty sentinel. Existing v2 databases therefore open and accept new commands without a destructive core-schema migration.Validation
Integration order
Merge and release this PR before the dependent Winecode PR.