super-productivity/packages/super-sync-server/tests
Mohamed Abdeltawab 32aec63023
Cleanup/remove dead super sync surface (#8526)
* cleanup: remove unused latestSnapshotSeq from HTTP response and client types

latestSnapshotSeq was computed on every download but never read by any
client code. sibling snapshotVectorClock IS consumed — only this field
is dead. The server still computes it internally for the snapshot
optimization logic, but it no longer serializes it in the response.

Removed from:
- DownloadOpsResponse type and response object (sync.routes.ts)
- Zod schema (supersync-http-contract.ts) + associated test
- OpDownloadResponseBase interface (sync-providers)
- Client validator test + stale comment references
- Server integration test assertions

* cleanup: remove deprecated CONFLICT_STALE error code

Server never emits CONFLICT_STALE (fully migrated to
CONFLICT_SUPERSEDED).

* cleanup: remove unused SyncConfig fields (maxOpsPerUpload, downloadLimit, downloadRateLimit)

These three config fields were declared and defaulted but never read by
any code. Routes hardcode their own limits:

- maxOpsPerUpload: gate is MAX_OPS_PER_BATCH constant
(sync.routes.payload.ts)
- downloadLimit: hardcoded Math.min(limit, 1000) in sync.routes.ts
- downloadRateLimit: hardcoded max:200 in route rateLimit config

* cleanup: remove dead/drifted duplicate types from sync.types.ts

Removed 6 types with zero references repo-wide:

- SnapshotResponse: orphaned after previous PR removed its importers
- UploadSnapshotRequest: zero uses, missing 7 fields vs actual Zod
schema
- RestorePointType: zero uses, included dead 'DAILY_BOUNDARY' value
- RestorePoint: zero uses (live version in snapshot.service.ts)
- RestorePointsResponse: zero uses
- RestoreSnapshotResponse: zero uses
2026-06-22 14:34:18 +02:00
..
integration Cleanup/remove dead super sync surface (#8526) 2026-06-22 14:34:18 +02:00
account-page-contrast.spec.ts fix(supersync): improve account badge contrast (#8186) 2026-06-09 00:13:33 +02:00
api.routes.spec.ts Pr 6741 (#6743) 2026-03-05 21:17:59 +01:00
auth-cache.spec.ts perf(sync): SuperSync server speed + correctness hardening (#7621) 2026-05-15 17:24:16 +02:00
auth-flows.spec.ts Pr 6741 (#6743) 2026-03-05 21:17:59 +01:00
cleanup.spec.ts fix(supersync): order cleanup reconcile stalest-first and add C1 regression tests 2026-05-12 22:25:18 +02:00
config.spec.ts feat(supersync): configure server bind host #7301 (#8108) 2026-06-08 12:12:49 +02:00
conflict-detection.spec.ts refactor(sync): remove dead SyncService facade methods (#8498) 2026-06-20 12:00:10 +02:00
conflict.spec.ts fix(sync): accept encrypted retries as duplicate, not invalid op id 2026-05-23 16:46:05 +02:00
decompress-body.spec.ts Merge branch 'master' into feat/our-latest-super-sync-server-update 2026-05-12 20:40:26 +02:00
device.service.spec.ts refactor(sync): extract DeviceService and OperationDownloadService 2025-12-27 20:43:25 +01:00
duplicate-operation-precheck.spec.ts fix supersync retry idempotency 2026-05-13 00:14:35 +02:00
email.spec.ts Fix super-sync server auth and snapshot safety 2025-12-12 20:48:13 +01:00
entity-ids-conflict.pglite.spec.ts test(sync): pin #8334 divergent-scalar conflict, fix PGlite SQL drift 2026-06-17 16:07:53 +02:00
gap-detection.spec.ts perf(sync): use indexed findFirst for op-download minSeq 2026-05-18 14:21:02 +02:00
issue-8334-detect-conflict.spec.ts fix(sync): conflict-check all entities of multi-entity ops (#8334) (#8377) 2026-06-13 15:40:10 +02:00
magic-link-registration.spec.ts fix(sync): preserve own vector clock counter across full-state op resets 2026-04-01 15:41:13 +02:00
middleware.spec.ts Pr 6741 (#6743) 2026-03-05 21:17:59 +01:00
migrate-deploy-script.spec.ts fix(supersync): address multi-agent review of CONCURRENTLY recovery 2026-05-15 22:03:25 +02:00
migration-sql.spec.ts fix(sync): conflict-check all entities of multi-entity ops (#8334) (#8377) 2026-06-13 15:40:10 +02:00
op-replay.spec.ts fix(sync): replay all entityIds on multi-entity DELETE (#8340) (#8384) 2026-06-13 16:08:30 +02:00
operation-download.service.spec.ts perf(sync): use indexed findFirst for op-download minSeq 2026-05-18 14:21:02 +02:00
passkey.spec.ts test(sync): fix failing unit tests for recent server changes 2026-01-24 21:14:58 +01:00
password-reset-api.spec.ts Revert "feat(sync): add rolling JWT token refresh on sync requests" 2026-02-02 17:15:13 +01:00
password-reset.spec.ts fix(security): address critical and high severity vulnerabilities 2025-12-31 12:15:56 +01:00
rate-limit.service.spec.ts refactor(sync): extract services from SyncService and migrate tests to Prisma 2025-12-27 20:38:26 +01:00
registration-api.spec.ts chore(sync-server): update npm scripts and expand legal docs 2025-12-15 13:47:42 +01:00
replace-token-expiry.spec.ts fix(sync): fix supersync server unit test failures 2026-03-22 10:10:19 +01:00
request-dedup-failure-caching.routes.spec.ts fix(sync): don't cache transaction-failure results in request dedup (#8370) 2026-06-13 12:50:32 +02:00
request-deduplication.service.spec.ts feat(supersync): persist full-state vector clock and add snapshot retry idempotency 2026-05-13 17:01:39 +02:00
retention-config.spec.ts fix(security): address critical and high severity vulnerabilities 2025-12-31 12:15:56 +01:00
security-fixes.spec.ts test: strengthen unit test assertions and revive disabled plugin specs (#7755) 2026-05-23 18:31:53 +02:00
server-security.spec.ts test: strengthen unit test assertions and revive disabled plugin specs (#7755) 2026-05-23 18:31:53 +02:00
server.error-log-level.spec.ts feat(supersync): configure server bind host #7301 (#8108) 2026-06-08 12:12:49 +02:00
setup.ts fix(supersync): sanitize errors, exact full-state quota, atomic counter 2026-05-12 21:36:49 +02:00
snapshot-skip-optimization.spec.ts test(sync-server): add comprehensive edge case tests for snapshot skip 2025-12-17 11:42:32 +01:00
snapshot.service.spec.ts refactor: retire GET /api/sync/snapshot, re-scope GET /api/sync/status as diagnostic (#8496) 2026-06-20 12:02:58 +02:00
storage-quota-cleanup.spec.ts refactor(sync): decompose SuperSync server giants into cohesive modules 2026-05-15 20:06:12 +02:00
storage-quota.service.spec.ts perf(sync): SuperSync server speed + correctness hardening (#7621) 2026-05-15 17:24:16 +02:00
sync-compressed-body.routes.spec.ts perf(sync): SuperSync server speed + correctness hardening (#7621) 2026-05-15 17:24:16 +02:00
sync-fixes.spec.ts refactor: retire GET /api/sync/snapshot, re-scope GET /api/sync/status as diagnostic (#8496) 2026-06-20 12:02:58 +02:00
sync-operations.spec.ts refactor(sync): remove dead SyncService facade methods (#8498) 2026-06-20 12:00:10 +02:00
sync-types.spec.ts test(sync): add vector clock pruning edge case tests (#6506) 2026-02-13 12:42:36 +01:00
sync-upload-rate-limit.routes.spec.ts docs(sync): clarify upload rate-limit layers (#8497) 2026-06-22 12:19:56 +02:00
sync.const.spec.ts fix(sync): measure op payload size limit in UTF-8 bytes, not UTF-16 units (#8368) 2026-06-13 14:29:00 +02:00
sync.routes.spec.ts refactor: retire GET /api/sync/snapshot, re-scope GET /api/sync/status as diagnostic (#8496) 2026-06-20 12:02:58 +02:00
sync.service.spec.ts refactor(sync): remove dead SyncService facade methods (#8498) 2026-06-20 12:00:10 +02:00
sync.service.test-state.ts perf(super-sync): optimize status and conflict checks 2026-05-13 11:40:43 +02:00
time-tracking-operations.spec.ts refactor(sync): remove dead SyncService facade methods (#8498) 2026-06-20 12:00:10 +02:00
validation.service.spec.ts fix(sync): conflict-check all entities of multi-entity ops (#8334) (#8377) 2026-06-13 15:40:10 +02:00
websocket-connection.service.spec.ts refactor(supersync): address round-2 review of WS reconnect cooldown fix 2026-05-20 15:57:00 +02:00
websocket.routes.spec.ts test(supersync): cover WS storm fixes with unit + integration tests 2026-05-20 15:57:00 +02:00