DashboardopencodeSessionExecution fixed-expiry heartbeat

SessionExecution fixed-expiry heartbeat

Category: gotcha
Confidence: 1.00
ID: 01a0aecf-7384-71cc-adca-f9e0845da9e2
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0410hkwvS1ACdy6D6
Created: 2026-09-15 12:47:18
Updated: 2026-09-17 10:00:26

Content

Trap: a repeated heartbeat with Date.now() captured outside its body, or a lease sized only for renewal cadence, looks sufficient because SQL still runs periodically. It can write a fixed expiry or let bounded node clock skew expose healthy work. Fix: recompute time each tick, require the exact claim to remain unexpired, never revive an expired claim, and keep lease duration above maximum clock skew plus one renewal interval.

Move to: