mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-29 10:40:12 +00:00
Root cause: Operations with `entityId: undefined` (corrupt ops) caused an infinite rejection loop during sync: 1. Upload ops → Rejected with CONFLICT_CONCURRENT 2. Rejection handler creates merged ops (still with invalid entityId) 3. Upload merged ops → Rejected again 4. Loop continues forever This prevented the sync status double checkmark from ever appearing because hasPendingOps never became false. Three-layer defense implemented: 1. Client: Guard time tracking dispatch (task.service.ts) - Changed `if (currentTask &&` to `if (currentTask?.id &&` - Prevents time tracking dispatch with undefined taskId 2. Client: Strengthen entityId validation (operation-log.effects.ts) - Check that entityId is truthy AND a string type - Log error with actual entityId value for debugging 3. Client: Cleanup corrupt ops on startup (operation-log-recovery.service.ts) - New cleanupCorruptOps() method marks corrupt ops as rejected - Runs during hydration to break existing infinite loops - Excludes bulk 'ALL' operations which legitimately lack entityId 4. Server: Validate entityId for all regular operations (validation.service.ts) - Reject ops with missing entityId (except full-state and bulk ops) - Full-state: SYNC_IMPORT, BACKUP_IMPORT, REPAIR - Bulk entity types: ALL, RECOVERY - Returns MISSING_ENTITY_ID error code (permanent rejection) |
||
|---|---|---|
| .. | ||
| integration | ||
| api.routes.spec.ts | ||
| auth-flows.spec.ts | ||
| cleanup.spec.ts | ||
| conflict-detection.spec.ts | ||
| decompress-body.spec.ts | ||
| device.service.spec.ts | ||
| duplicate-operation-precheck.spec.ts | ||
| email.spec.ts | ||
| gap-detection.spec.ts | ||
| operation-download.service.spec.ts | ||
| password-reset-api.spec.ts | ||
| password-reset.spec.ts | ||
| rate-limit.service.spec.ts | ||
| registration-api.spec.ts | ||
| request-deduplication.service.spec.ts | ||
| retention-config.spec.ts | ||
| security-fixes.spec.ts | ||
| server-security.spec.ts | ||
| setup.ts | ||
| snapshot-skip-optimization.spec.ts | ||
| snapshot.service.spec.ts | ||
| storage-quota-cleanup.spec.ts | ||
| storage-quota.service.spec.ts | ||
| sync-fixes.spec.ts | ||
| sync-operations.spec.ts | ||
| sync-types.spec.ts | ||
| sync.routes.spec.ts | ||
| sync.service.spec.ts | ||
| sync.service.test-state.ts | ||
| time-tracking-operations.spec.ts | ||
| validation.service.spec.ts | ||