You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updateRuntimeStatus (routes/instances-runtime.ts): the node UPDATE is filtered AND runner_node = ?4; the instance_runtimes UPDATE is WHERE instance_id = ?2 AND user_id = ?3 — no node filter. So the Mac mini's heartbeat (instances.ts:549) refreshes the shared row's status/last_seen_at while runner_node, runner_version and capabilities keep the last registrant's values.
The row is therefore not stale — it is two machines blended: one machine's liveness under another machine's identity and capability list.
runtime.lastSeenAt disagrees with its own named node on 7 of 22.
probe:true bypasses the derivation entirely (instances.ts:813-898, effective = online || recentlySeen), so the more thorough call is the less truthful one.
runtime-response.ts:38-52 already documents this exact bug class. It was applied to one of the two functions it describes.
Why this misleads a user into a wrong action
This is the field an owner reads to decide whether to run pags up. It currently says the machine with coding.repo-write is online when that machine has been gone for ten hours and the live one cannot write to repos. A run dispatched on that basis fails for a reason the status screen denies.
Acceptance criteria
runtimeResponse derives status from heartbeat freshness, as runtimeNodeResponse does. Neither may publish a stored status raw.
runtime stops blending machines: either it is scoped to one node, or the field set it publishes comes from the same row its lastSeenAt does. State which, and why.
probe:true is at least as truthful as the un-probed call. A path that skips a correctness derivation in the name of thoroughness is the defect, not a shortcut.
instance_runtime_status.runtimereports an offline machine as online, and is a composite of two machinesMeasured live 2026-08-15 across 22 instances with
capabilities.runtime != null(82 node rows).Two instances state a falsehood inside a single response
12ebf1f0(Coder Home) and6d2d9401(Facebook Friends):runtime.runnerNodeRLs-MacBook-Air.localruntime.statusonlineruntime.lastSeenAt2026-08-15 10:11:58runtime.runnerVersion0.4.51, capabilities includecoding.repo-writenodes[]same nodeoffline,lastSeenAt 2026-08-14 23:36:04— 10h36m staleSergeys-Mac-mini.local,0.4.45, nocoding.repo-writenodes[]is correct.Mechanism, traced
workers/api/src/routes/instances.ts:433—runtime: runtimeResponse(runtime), nodes: nodes.map(runtimeNodeResponse).workers/api/src/lib/runtime-response.ts:26—runtimeResponsepublishesstatus: row.statusraw.:63-71—runtimeNodeResponseapplies the 90sheartbeatFreshderivation.fcfbce0(instance_runtime_nodes.statusis a write-once "online" column — every machine an instance has ever seen reports online forever, including one last seen four days ago #570) fixed only the second.updateRuntimeStatus(routes/instances-runtime.ts): the node UPDATE is filteredAND runner_node = ?4; theinstance_runtimesUPDATE isWHERE instance_id = ?2 AND user_id = ?3— no node filter. So the Mac mini's heartbeat (instances.ts:549) refreshes the shared row'sstatus/last_seen_atwhilerunner_node,runner_versionandcapabilitieskeep the last registrant's values.The row is therefore not stale — it is two machines blended: one machine's liveness under another machine's identity and capability list.
Scope
runtime.status === "online"on 22 of 22. No offline case observed — the same write-once-online shapeinstance_runtime_nodes.statusis a write-once "online" column — every machine an instance has ever seen reports online forever, including one last seen four days ago #570 fixed, still live on this field.runtime.lastSeenAtdisagrees with its own named node on 7 of 22.probe:truebypasses the derivation entirely (instances.ts:813-898,effective = online || recentlySeen), so the more thorough call is the less truthful one.runtime-response.ts:38-52already documents this exact bug class. It was applied to one of the two functions it describes.Why this misleads a user into a wrong action
This is the field an owner reads to decide whether to run
pags up. It currently says the machine withcoding.repo-writeis online when that machine has been gone for ten hours and the live one cannot write to repos. A run dispatched on that basis fails for a reason the status screen denies.Acceptance criteria
runtimeResponsederivesstatusfrom heartbeat freshness, asruntimeNodeResponsedoes. Neither may publish a storedstatusraw.runtimestops blending machines: either it is scoped to one node, or the field set it publishes comes from the same row itslastSeenAtdoes. State which, and why.probe:trueis at least as truthful as the un-probed call. A path that skips a correctness derivation in the name of thoroughness is the defect, not a shortcut.instance_runtime_nodes.statusis a write-once "online" column — every machine an instance has ever seen reports online forever, including one last seen four days ago #570's fix passing while this one survived is exactly what a per-function test cannot catch.Verified vs inferred
file:line; the two UPDATE statements and their differing WHERE clauses; the 22/22 and 7/22 counts.