fix(run): heartbeat fires immediately after start due to monotonic/time mismatch
heartbeat_due was initialized from time.monotonic() but compared against time.time(), causing the first heartbeat to always trigger on the first loop iteration (duplicate message at startup). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -556,7 +556,7 @@ def run_live(cfg, duration_s=None, capture_stub: bool = False) -> None:
|
||||
audit.log({"event": "started", "config": cfg.config_version, "canary": canary_status})
|
||||
|
||||
start = time.monotonic()
|
||||
heartbeat_due = start + cfg.heartbeat_min * 60
|
||||
heartbeat_due = time.time() + cfg.heartbeat_min * 60
|
||||
levels_extractor = None
|
||||
last_saved_color: str | None = None
|
||||
first_accepted = True
|
||||
|
||||
Reference in New Issue
Block a user