mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 16:02:35 +00:00
fix(orchestration): compare stale-dispatch timestamps with julianday (#8636)
getStaleDispatches compared space-format datetime('now') columns
(dispatched_at, last_heartbeat_at) against an ISO-Z threshold using raw
TEXT ordering. The space (0x20) sorts below 'T' (0x54) at index 10, so
every fresh same-UTC-date dispatch/heartbeat was ordered below the
threshold and wrongly flagged stale, producing a false stale warning on
each coordinator tick. Wrap both column comparisons and both bound
threshold params in julianday(), which parses the space and ISO-Z
formats as UTC for a correct numeric comparison.
Fixes #8452
(cherry picked from commit 1d40312bf2)
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
Co-authored-by: Orca <help@stably.ai>
This commit is contained in: