Skip to main content

ORPHAN_SWEEP_MIN_AGE_SECS

Constant ORPHAN_SWEEP_MIN_AGE_SECS 

Source
const ORPHAN_SWEEP_MIN_AGE_SECS: u64 = _; // 1_800u64
Expand description

Direct-account sibling of compute_and_ensure_bundle_dir (issue #1624 PR-C Part B) — bypasses the bundle system entirely. Mints a fresh account_id when existing_account_id is empty (first-time OAuth connect from the launch modal); reuses it when non-empty (Reconnect — refresh tokens in place, same isolation dir, same account row updated in place).

Every fresh mint (existing_account_id empty) is swept for BEFORE it, giving prior abandoned/failed attempts a chance to be cleaned up (reagent finding on #2260 — see sweep_orphaned_account_dirs’s own doc comment). 30 minutes comfortably clears every frontend poll timeout in this flow (5 minutes, as of this writing) plus room for a slow user plus one retry, so an in-progress login’s dir is never swept out from under it.