Memex Admin
Dashboard
API Keys
Policies
Mem-Client: Async Store Cleanup
Repository: mem-labs/mem
Back to Policies
Cancel
active
Updated Feb 18, 2026, 8:57 PM
Name
Status
active
inactive
Markdown
Mem-client async side-effect cleanup rule. Scope: - Applies when adding/changing store-side effects in `domains/frontend/mem-client/src/store/**`. Trigger: - Added/changed code creates long-lived side effects, including: - `reaction(` - `autorun(` - `setInterval(` - `setTimeout(` used as recurring polling/retry loop - `addEventListener(` Hard requirements: 1) Each triggered side effect must include explicit teardown in the same lifecycle path. 2) Teardown must call one of: - `dispose()` / returned disposer - `unsubscribe()` - `abort()` - `clearInterval()` / `clearTimeout()` - `removeEventListener()` 3) Do not add new long-lived side effects without a reachable teardown path. Decision: - Return NOT APPROVED when trigger is met and teardown requirements are missing.
Cancel
Save Policy