Milestone: 3 — Protocol gaps
Type: protocol
Priority: medium
There is no logic that detects expired sessions and cleans them up. After a take attempt times out, after an order expires, after a session goes stale — the entries remain in the DB and continue to be loaded into providers. v1 documents this in TIMEOUT_DETECTION_AND_SESSION_CLEANUP.md and has dedicated logic for it.
Scope
- Periodic sweep (on app start + at low frequency thereafter) that:
- Marks orders past
expires_at as expired.
- Cleans sessions whose underlying trade has been in a terminal state for > N days.
- Does not delete dispute sessions early (related to bond defer behavior — separate issue).
- Surface counters in the logs / debug screen.
Milestone: 3 — Protocol gaps
Type: protocol
Priority: medium
There is no logic that detects expired sessions and cleans them up. After a take attempt times out, after an order expires, after a session goes stale — the entries remain in the DB and continue to be loaded into providers. v1 documents this in
TIMEOUT_DETECTION_AND_SESSION_CLEANUP.mdand has dedicated logic for it.Scope
expires_atas expired.