super-productivity/packages/shared-schema
Johannes Millan 329da9b9f3
fix(sync): harden full-state operation recovery (#8973)
* fix(sync): prevent destructive full-state sync races

Use causal ordering and server-sequence preconditions for full-state operations, surface snapshot rejection, deduplicate migrations, and retain queued WebSocket downloads.\n\nFixes #8959

* fix(sync): block uploads after rejected imports

Keep incremental operations behind a durable barrier when a local import or restore is rejected. Release the barrier only after a newer full-state snapshot is accepted, and surface the blocked state instead of reporting sync success.

* fix(sync): harden causal repair recovery

Persist repair base cursors across the client, provider, and server so stale snapshots are rejected before quota or history mutation and legacy repairs cannot poison restore state.

Atomically rebase stale repairs after downloading the missing suffix, preserve rejected-import barriers and WebSocket watermarks, and cover PostgreSQL serialization.

* fix(sync): harden repair recovery edge cases

Block dependent uploads after any rejected full-state operation, reset negotiated capabilities across provider config changes, and bound WebSocket download retries.

Update sync test doubles for causal repairs and the expanded duplicate-operation identity.
2026-07-13 22:58:17 +02:00
..
src fix(sync): harden full-state operation recovery (#8973) 2026-07-13 22:58:17 +02:00
tests fix(sync): harden full-state operation recovery (#8973) 2026-07-13 22:58:17 +02:00
.gitignore build: ignore files 2026-05-13 19:59:02 +02:00
package.json refactor(sync-core): drop shared-schema vector-clock compat re-export anda app enum (#8441) 2026-06-17 16:21:26 +02:00
tsconfig.json fix(shared-schema): fix module resolution for bundler compatibility 2026-01-11 13:20:16 +01:00
tsup.config.ts fix(shared-schema): use tsup for dual ESM/CJS build 2026-01-11 14:05:23 +01:00
vitest.config.ts feat(sync): add shared schema versioning package for frontend/backend 2025-12-12 20:47:44 +01:00