-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
3
-
False
-
-
False
-
subs-swatch-lightning
-
-
- Validate that the Sync All Contracts API(/internal/rpc/syncAllContracts) is fully idempotent.
- Ensure repeated executions correctly synchronize contracts and subscriptions without creating duplicate or inconsistent data.
- Verify data integrity across related tables(contracts, contract_metrics, subscriptions, subscription_measurements).
- Assess whether is_pre_cleanup logic is required for global sync like we have it for
/api/swatch-contracts/internal/rpc/sync/contracts/{org_id}
AC:
- Multiple executions of the API do not create duplicate contracts or subscriptions.
- No additional or unintended records are inserted or modified.
- Contracts and subscriptions remain consistent and aligned after each run.
- Clear decision documented on is_pre_cleanup needed or not.
- Automated tests validate repeat-run and already-synced scenarios.
- blocks
-
SWATCH-4563 Add Nightly Contracts Sync Cron Job (IT Partner Gateway Integration)
-
- Backlog
-