-
Notifications
You must be signed in to change notification settings - Fork 0
feat(domain): enforce CRDT snapshot coverage at sync edges #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tyemirov
commented
Feb 3, 2026
- add snapshot coverage invariants: snapshot_update_id <= cursor last_seen
- adapt handlers/adapters to construct at edges
- remove interior defensive checks (validated once at boundary): n/a
- wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): n/a
- CI: make test/lint/ci passing
- add snapshot coverage invariants: snapshot_update_id <= cursor last_seen - adapt handlers/adapters to construct at edges - remove interior defensive checks (validated once at boundary): n/a - wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): n/a - CI: make test/lint/ci passing
- add snapshot coverage repair migration with invariants: reset snapshot_update_id to 0 once and track db_migrations - adapt handlers/adapters to construct at edges (require per-note cursors; drop LWW/legacy sync handling) - remove interior defensive checks (validated once at boundary): remove LWW service/models and legacy payload fallbacks - wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): retain notes.* service codes and return missing_cursor for cursor-less updates - CI: go vet/staticcheck/ineffassign passing
- add snapshot hash guard with invariants: equal snapshot_update_id updates only overwrite on new non-duplicate payloads - adapt handlers/adapters to construct at edges (pass duplicate guard into snapshot upsert) - remove interior defensive checks (validated once at boundary): n/a - wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): retain notes.* service codes - CI: go vet/staticcheck/ineffassign passing
- add cursor-scoped query with invariants: per-note update_id > last_seen filters in SQL - adapt handlers/adapters to construct at edges (build deterministic cursor predicates before query) - remove interior defensive checks (validated once at boundary): drop in-memory cursor filtering - wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): retain notes.list_crdt_updates errors - CI: go vet/staticcheck/ineffassign passing
…update-replay-sql feat(domain): filter CRDT update replay in SQL; move validation to edge
…snapshot-equal-guard feat(domain): guard CRDT snapshot equality; move validation to edge
…crdt-repair-sync feat(domain): introduce CRDT sync cursor guard; move validation to edge
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89d5e6eda4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- add cursor-chunked CRDT replay with invariants: SQLite variable cap respected, update ordering preserved - adapt update replay query builder to batch per-note cursor predicates - remove interior defensive checks (validated once at boundary): n/a - wrap errors with operation+subject+stable code (e.g., user.create.invalid_email): n/a - CI: go vet/staticcheck/ineffassign; make test/lint/ci passing
…sqlite-variable-limit feat(domain): chunk CRDT cursor queries under SQLite limits