Memex Admin

Backend: Async Idempotency

Repository: mem-labs/mem

inactiveUpdated Feb 18, 2026, 8:49 PM

Policy ID js73yekrpzwbcv8xvxrc9htpnn81c1sw

Async backend state mutations must be idempotent under retries.

Scope:
- Enforce when changing Temporal/Celery/sync operations or retryable background workflows in backend.

Rules:
1) Mutating operations should be safe if executed more than once.
2) Changes should show deduplication, guard checks, or idempotent upsert/update behavior where appropriate.
3) Tests or implementation evidence should cover retry/duplicate-execution safety for changed logic.

Review behavior:
- Return NOT APPROVED when new retryable mutation paths appear likely to create duplicate side effects without safeguards.
- Do not block read-only background tasks.