Repository navigation
fix(runtime): stop one unreachable relay from freezing every workspace as active (STA-517) - #14649
Conversation
📝 WalkthroughWalkthroughPTY process inventory now forwards caller deadlines through targeted and aggregate listings. SSH provider failures produce partial aggregate results, while local provider failures still reject the aggregate request. Runtime inventory refreshes apply bounded provider and aggregate deadlines. Restored orchestration authority cleanup now runs after PTY rescue processing. Tests cover provider failure handling, deadline propagation, partial relay liveness, and updated call assertions. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/main/ipc/pty.ts (1)
5746-5753: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShorten the new comment.
Keep the behavior rationale in one concise sentence. The detailed incident history is not needed beside this branch.
- // Why: one unreachable relay must not decide liveness for every other provider. - // Promise.all failed the whole aggregate on a single SSH rejection, and an - // unanswered relay list runs to the mux's 30s default — far past the caller's - // budget — so the runtime kept losing the inventory it needs to retire exited - // PTYs and every retained pane stayed "active" (STA-517). Settle each SSH - // provider on its own and bound it by the caller's deadline; a provider that - // does not answer is unknown, not empty — the runtime's hasPty rescue keeps its - // panes. A local failure still fails the aggregate, matching pty:listSessions. + // Treat failed SSH listings as unavailable; keep local listing failures fatal.Source: Coding guidelines
src/main/runtime/pty-inventory-partial-relay-liveness.test.ts (1)
6-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce explanatory test comments.
The test names and assertions already specify these contracts. Remove these comments, or replace each with one short comment only where needed.
src/main/runtime/pty-inventory-partial-relay-liveness.test.ts#L6-L9: remove the suite rationale.src/main/runtime/pty-inventory-partial-relay-liveness.test.ts#L72-L73: remove the mock implementation rationale.src/main/runtime/pty-inventory-partial-relay-liveness.test.ts#L95-L96: remove the deadline failure explanation.src/main/runtime/pty-inventory-partial-relay-liveness.test.ts#L135-L136: remove the rescue assertion explanation.src/main/runtime/pty-inventory-partial-relay-liveness.test.ts#L161-L162: remove the retirement assertion explanation.As per coding guidelines, “Comments must be concise, non-obvious, and brief—prefer one line; do not explain obvious behavior or walk through code.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ffecbf00-f36f-4387-9289-4a2bb044c28f
📒 Files selected for processing (5)
src/main/ipc/pty-controller-process-inventory.test.tssrc/main/ipc/pty.test.tssrc/main/ipc/pty.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/pty-inventory-partial-relay-liveness.test.ts
cf43ea5 to
edddfdb
Compare
5254f17 to
cd7e186
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
cd7e186 to
42bd5ee
Compare
…e as active The worktree.ps liveness refresh is the only thing that retires an exited PTY, and mobile renders "active" straight off the summary it produces. Its aggregate inventory ran every provider through Promise.all with no per-provider deadline, so a single SSH relay that rejected — or simply did not answer inside the 3s budget, since a relay list runs to the mux's own 30s default — cost the runtime the whole inventory. Nothing was ever proven dead, so every retained pane kept reporting hasHostSidebarActivity/liveTerminalCount, and the SSH workspaces stayed "active" on mobile for as long as the connection stayed unreachable. Settle each SSH provider independently and forward the caller's deadline, so local and healthy relays are still reconciled. A provider that does not answer is unknown, not empty: the runtime's existing hasPty rescue keeps its panes. A local failure still fails the aggregate, matching pty:listSessions. The restored-orchestration-authority sweep now runs after that rescue, so a pane the controller still vouches for keeps its handle instead of losing it to a listing that merely omitted it. STA-517
…entory calls These assertions exist to prove which provider scope the inventory asked for. Forwarding the caller's deadline added a second argument, which broke them on arity alone. Match the scope argument and require a numeric deadline beside it, so the intent is preserved and the budget is covered too.
A bare `async () =>` mock types mock.calls as an empty tuple, so reading the scope argument off it fails typecheck. Declare the parameter the runtime actually passes.
42bd5ee to
141d45d
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 521a080e-083b-4e20-b8ab-cb37b1eb19a9
📒 Files selected for processing (6)
src/main/ipc/pty-controller-process-inventory.test.tssrc/main/ipc/pty-runtime-kill-and-exit.test.tssrc/main/ipc/pty.tssrc/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/pty-inventory-partial-relay-liveness.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- src/main/ipc/pty-controller-process-inventory.test.ts
- src/main/runtime/orca-runtime.test.ts
- src/main/runtime/pty-inventory-partial-relay-liveness.test.ts
- src/main/runtime/orca-runtime.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 0 remain after this review.
| // Why: the deadline only applies to relay round-trips; the local provider answers in-process. | ||
| processes: await (connectionId ? provider.listProcesses(opts) : provider.listProcesses()), |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Forward opts on both local listing paths.
localProvider can be daemon-backed, so the connectionId check does not guarantee an in-process call. Without opts, aggregate and targeted listings can exceed their caller deadlines.
src/main/ipc/pty.ts#L289-L290: callprovider.listProcesses(opts)for the local aggregate session.src/main/ipc/pty.ts#L5845-L5848: calllocalProvider.listProcesses(opts)for targeted local requests.
Proposed fix
- processes: await (connectionId ? provider.listProcesses(opts) : provider.listProcesses()),
+ processes: await provider.listProcesses(opts)
- return localProvider.listProcesses()
+ return localProvider.listProcesses(opts)📍 Affects 1 file
src/main/ipc/pty.ts#L289-L290(this comment)src/main/ipc/pty.ts#L5845-L5848
Review statusState: Scope has changed since the validation was run — read this before assessing the evidence. #14977 merged to So this PR now contributes only the deadline. That is not a leftover; it is the half that covers the reported failure. A relay that goes silent never rejects, so it never reaches #14977's catch — What the review loop established. Validation — what was and was not done. Live, done: a throwaway Pre-fix the aggregate returned CORRECTION — the gap named below has since been closed. Everything from here to the next heading was accurate when written and is now superseded; it is left visible rather than deleted so the record shows what changed. The rig has been re-run against the rebased tree. Two things I said could not be measured, now measured: 1. The headline contrast reproduces on the rebased tree. Fresh
2. The bridging claim is no longer inference — the composition was observed directly. With two temporary probes in 2500 ms is exactly 3000 − 500 — Also corrected: the Docker daemon was not wedged. That was a stale claim of mine, and it is why the re-run was reported as blocked here. Still not verified:
Automated (post-rebase): 5 files, 1202 passed, 1 skipped. New coverage asserts the deadline lands strictly inside the runtime budget, that a tighter caller deadline is honoured, that a local failure still fails the aggregate (contract lock), and that a pane no provider vouches for is retired. Two pre-existing suites that matched the inventory call on exact arity were tightened to match the scope argument and require a numeric deadline beside it, so the budget is covered rather than merely tolerated. Wire: no frame shape change, no new opcode, no RPC params touched. Rule 3 territory (host-published content on Supersedes: nothing. Adjacent finding, deliberately not fixed here and worth its own ticket: |
…e as active (STA-517) (stablyai#14649) * fix(runtime): stop one unreachable relay from freezing every workspace as active The worktree.ps liveness refresh is the only thing that retires an exited PTY, and mobile renders "active" straight off the summary it produces. Its aggregate inventory ran every provider through Promise.all with no per-provider deadline, so a single SSH relay that rejected — or simply did not answer inside the 3s budget, since a relay list runs to the mux's own 30s default — cost the runtime the whole inventory. Nothing was ever proven dead, so every retained pane kept reporting hasHostSidebarActivity/liveTerminalCount, and the SSH workspaces stayed "active" on mobile for as long as the connection stayed unreachable. Settle each SSH provider independently and forward the caller's deadline, so local and healthy relays are still reconciled. A provider that does not answer is unknown, not empty: the runtime's existing hasPty rescue keeps its panes. A local failure still fails the aggregate, matching pty:listSessions. The restored-orchestration-authority sweep now runs after that rescue, so a pane the controller still vouches for keeps its handle instead of losing it to a listing that merely omitted it. STA-517 * test(runtime): assert the provider scope, not the exact arity, of inventory calls These assertions exist to prove which provider scope the inventory asked for. Forwarding the caller's deadline added a second argument, which broke them on arity alone. Match the scope argument and require a numeric deadline beside it, so the intent is preserved and the budget is covered too. * test(runtime): type the inventory mock's scope parameter A bare `async () =>` mock types mock.calls as an empty tuple, so reading the scope argument off it fails typecheck. Declare the parameter the runtime actually passes.
…e as active (STA-517) (stablyai#14649) * fix(runtime): stop one unreachable relay from freezing every workspace as active The worktree.ps liveness refresh is the only thing that retires an exited PTY, and mobile renders "active" straight off the summary it produces. Its aggregate inventory ran every provider through Promise.all with no per-provider deadline, so a single SSH relay that rejected — or simply did not answer inside the 3s budget, since a relay list runs to the mux's own 30s default — cost the runtime the whole inventory. Nothing was ever proven dead, so every retained pane kept reporting hasHostSidebarActivity/liveTerminalCount, and the SSH workspaces stayed "active" on mobile for as long as the connection stayed unreachable. Settle each SSH provider independently and forward the caller's deadline, so local and healthy relays are still reconciled. A provider that does not answer is unknown, not empty: the runtime's existing hasPty rescue keeps its panes. A local failure still fails the aggregate, matching pty:listSessions. The restored-orchestration-authority sweep now runs after that rescue, so a pane the controller still vouches for keeps its handle instead of losing it to a listing that merely omitted it. STA-517 * test(runtime): assert the provider scope, not the exact arity, of inventory calls These assertions exist to prove which provider scope the inventory asked for. Forwarding the caller's deadline added a second argument, which broke them on arity alone. Match the scope argument and require a numeric deadline beside it, so the intent is preserved and the budget is covered too. * test(runtime): type the inventory mock's scope parameter A bare `async () =>` mock types mock.calls as an empty tuple, so reading the scope argument off it fails typecheck. Declare the parameter the runtime actually passes.
…e as active (STA-517) (stablyai#14649) * fix(runtime): stop one unreachable relay from freezing every workspace as active The worktree.ps liveness refresh is the only thing that retires an exited PTY, and mobile renders "active" straight off the summary it produces. Its aggregate inventory ran every provider through Promise.all with no per-provider deadline, so a single SSH relay that rejected — or simply did not answer inside the 3s budget, since a relay list runs to the mux's own 30s default — cost the runtime the whole inventory. Nothing was ever proven dead, so every retained pane kept reporting hasHostSidebarActivity/liveTerminalCount, and the SSH workspaces stayed "active" on mobile for as long as the connection stayed unreachable. Settle each SSH provider independently and forward the caller's deadline, so local and healthy relays are still reconciled. A provider that does not answer is unknown, not empty: the runtime's existing hasPty rescue keeps its panes. A local failure still fails the aggregate, matching pty:listSessions. The restored-orchestration-authority sweep now runs after that rescue, so a pane the controller still vouches for keeps its handle instead of losing it to a listing that merely omitted it. STA-517 * test(runtime): assert the provider scope, not the exact arity, of inventory calls These assertions exist to prove which provider scope the inventory asked for. Forwarding the caller's deadline added a second argument, which broke them on arity alone. Match the scope argument and require a numeric deadline beside it, so the intent is preserved and the budget is covered too. * test(runtime): type the inventory mock's scope parameter A bare `async () =>` mock types mock.calls as an empty tuple, so reading the scope argument off it fails typecheck. Declare the parameter the runtime actually passes.
ELI5
Your phone asks the desktop "which workspaces are busy?". To answer, the desktop counts the terminals that are still alive — and that count is the only thing that can ever mark a forgotten terminal as dead. It asks every machine and waits.
If one SSH machine goes silent — not refusing, just never answering — the desktop waits on it far longer than it is willing to wait for the whole answer, so it throws the entire count away, including the machines that did reply. Nothing gets marked dead, and those workspaces stay lit up as active.
This PR gives each machine its own time limit, strictly inside the overall one. A silent machine now gives up early, and the answer still comes back with everyone else's terminals in it.
What Changed
Scope note (post-rebase): main's #14977 already made each provider settle independently — a relay that rejects is caught, dropped from both
processesandhostIds, and recorded asunverifiable. This PR now contributes only the missing deadline, which is the half that covers the actual failure: a relay that goes silent never rejects, so it never reaches #14977's catch. Earlier revisions of this PR also introduced the settle; that part is now main's, and the resolution here deliberately keeps main'stry/catch(and itsmarkSshInventoryUnverifiablecall) rather than replacing it with a.catch(...)that would have silently dropped the verdict.The deadline does not merely coexist with #14977 — it closes a hole in it. #14977's verdict machinery hangs off the
catch: a relay that fails to list is supposed to be recordedunverifiableso nothing downstream mistakes lost contact for a confirmed exit. But a silent relay never throws, so before this change that branch was simply never reached for the silent case — the aggregate died on the runtime's own timeout first and the verdict was never recorded at all. With the deadline forwarded, a silent relay now rejects at the deadline, falls into main'scatch, firesonSshInventoryUnavailable, and lands theunverifiableverdict that #14977 intended. The two changes compose: one supplies the branch, the other makes it reachable.src/main/ipc/pty.ts— the aggregate PTY inventory:The deadline is threaded through all three entry points: the aggregate, the targeted single-connection path (
listProcesses(connectionId, opts)), andlistProcessesWithHostScope(opts). The local provider is deliberately not given a deadline — it answers in-process, and a local failure still fails the aggregate.src/main/runtime/orca-runtime.ts:refreshPtyWorktreeRecordsWithControllerInventorycomputes its list budget once and passes a deadline strictly inside it (PTY_CONTROLLER_LIST_PROVIDER_MARGIN_MS = 500), so a relay that gives up still leaves the aggregate time to return the providers that answered;RuntimePtyController.listProcesses/listProcessesWithHostScopegain the optionaloptsto carry it (main-process internal type; not a wire contract);hasPtyrescue, so a pane the controller still vouches for keeps its handle.Why
worktree.psis mobile's only status source, and its liveness refresh is the only code path that can flip a retained PTY toconnected = false.SshPtyProvider.listProcessesfalls through to the mux's ownREQUEST_TIMEOUT_MS = 30_000, while the runtime wraps the whole aggregate inPTY_CONTROLLER_LIST_TIMEOUT_MS = 3_000. A registered-but-unresponsive relay therefore blows the budget every single time — and #14977's per-providertry/catchdoes not help, because a silent relay never throws.Promise.allsimply does not settle inside 3s,withTimeoutResultfires, andrefreshPtyWorktreeRecordsWithControllerInventoryreturnsnullbefore the sweep that marks PTYs disconnected. The entire inventory is lost, local included.Which panes actually get stuck — corrected. An earlier revision of this description implied that local panes stay "active" after their processes exit. That is not accurate, and live testing falsified it. Orca has two independent retirement paths:
So the stuck-active symptom applies to panes that must be proven dead by the listing: records restored from persistence after an app restart, and retained/unconfirmed records generally. A pane that exits while the app is watching retires normally even with the inventory broken. The user-visible bug is real; this is the accurate statement of its scope.
A provider that does not answer is unknown, not empty. Its panes are not retired: the existing
hasPtyrescue re-adds them (SshPtyProvider.livePtyIdsis cleared only ondispose()), and it drops out ofhostIdsso the listing never claims coverage it lacks. When the connection is genuinely lost,teardownProviders('connection_lost')disposes and unregisters the provider,hasPtyreturnsnull, and the workspace correctly goes inactive. That self-healing path is what the failed aggregate was preventing.Linked Issue
Fixes STA-517 — https://linear.app/stably/issue/STA-517/fix-incorrect-active-status-display-for-ssh-work-trees-on-mobile
Visual Proof
N/Afor screenshots — no UI change; this is a host-side correctness fix to the valuesworktree.pspublishes, and mobile's rendering code is untouched. The proof is a measured before/after against a real SSH relay, below.Testing
Live rig
A throwaway
ubuntu:22.04Docker container as the SSH target (key-only root login, node 22.14.0,build-essential+python3— required or node-pty will not build on the remote and remote PTYs never come up — and a real git repo at/work/demo-project). The client was this worktree running as an isolated Electron dev instance (ownORCA_DEV_USER_DATA_PATH, own CDP port,getIdentity()re-verified before every interaction batch,repos.list()returning[]on first attach confirming a genuinely fresh profile), connected through the realssh.connectpath with the real relay deployed and running on the container (detached daemon +--connectbridge both verified by PID inside the container).4 real PTYs, 2 per host: 2 local (darwin) and 2 remote (
ssh:…@@pty-1/2, real/bin/bashonpts/0inside the container, titles resolving toroot@c4a120d1207b: /work/demo-project).Unreachability =
docker pause. This is the important detail: the TCP socket stays open and nothing ever answers. That is the actual failure mode — killing the container or blackholing the port produces a clean error instead, which exercises #14977's branch rather than this one. The mux confirmed it:[ssh-mux] Protocol error: Connection timed out (no ack received).Each arm's running bundle was verified to be the code under test, not assumed:
PTY_CONTROLLER_LIST_PROVIDER_MARGIN_MSoccurs 2× inout/main/index.jswith the fix and 0× without it.Result
Baseline, relay healthy —
hostIds: ["local","ssh:…"],omittedHostIds: [], both workspacesactive:true live:2.With the relay hung:
terminal.listlatency3004 ms(hit the 3s ceiling, returned nothing)5395 ms(returned)hostScope.hostIds[]— whole inventory lost, local included["local"]hostScope.omittedHostIds["local","ssh:…"]["ssh:…"]active:false live:0)active:true live:2(UNKNOWN, not empty)Pre-fix rows, verbatim:
Corroborated in the same run by
terminal_liveness_unavailablethrown out ofrefreshRestoredOrchestrationAuthority— therequireFreshPtyLivenesscallers failing on the null inventory.— not covered:renders correctlyThe live
terminal.listpayload was captured off the running runtime and fed to the realformatTerminalListfromsrc/cli/terminal-format.ts:A dead relay prints "not covered" rather than an empty list that would read as "no terminals there".
Caveat, stated plainly: only the post-fix line comes from a fully captured payload. The pre-fix line substitutes the
hostScopethe pre-fix runtime actually reported into that captured payload — thehostScopevalues are measured, the surrounding body is not a pre-fix capture.Re-run against the rebased tree — the caveat is now a measurement
The section this replaces said the "current main behaves identically under a hang" claim was code inspection, not measurement, and that the rig had not been re-run after the rebase. It has now been re-run against this exact tree (
141d45db76), and the inspection was correct.Full log: sta517-rebased-measurement.txt
Rig. Fresh throwaway
debian:bookworm-slimsshd container (key-only, node 20.18.1 +build-essential/python3, aarch64 — node-pty will not build on the remote without them and every remote PTY comes up unavailable), pluspnpm run build:relayfirst because the dev build ships no linux-arm64 relay. Isolated Electron dev instance (ownORCA_DEV_USER_DATA_PATH, own CDP port,getIdentity()verified), with theorcaCLI pointed at that runtime viaORCA_USER_DATA_PATH=<same dir>so the measurement cannot read another instance. Real PTYs on both hosts. Unreachability is againdocker pause— socket open, nothing answers.Rebased baseline confirmed:
origin/mainalready carries #14977's per-provider settle (7afce2ea41), so this PR contributes only the forwarded deadline.terminal.listlatencyhostScope.hostIds[]— whole inventory lost, local included["local"]hostScope.omittedHostIds["local","ssh:…"]["ssh:…"]scope: none — not covered: local, ssh:…scope: local — not covered: ssh:…onSshInventoryUnavailableBoth arms are real
orca terminal listoutput from the running runtime — the pre-fix scope line is a genuine pre-fix capture this time, not a substitution.The composition with #14977, observed. This is the part that had never been seen. Two temporary
console.logcalls inmarkSshInventoryUnverifiable(reverted afterwards; not in this diff) recorded:2500 msis exactlyPTY_CONTROLLER_LIST_TIMEOUT_MS(3000) minusPTY_CONTROLLER_LIST_PROVIDER_MARGIN_MS(500). The silent relay rejects at the deadline, falls into main's per-providercatch, firesonSshInventoryUnavailable, and lands theunverifiableverdict on every PTY that connection owns. With the deadline removed the same probe printed zero lines across the whole arm: main's verdict machinery is genuinely unreachable for a silent relay, and the deadline is what makes it reachable. That is the deadline's contribution stated exactly.Still not measured. The
unverifiableverdict was observed at the point it is recorded, not at a user-facing surface:terminal.closeis the only CLI surface that reportsptyStopVerdict, and it returnstab_not_foundfor CLI-created terminals in a headless rig (for local terminals too), so the verdict was not read back out through an RPC. Only the aggregate (connectionId === undefined) path was exercised; the per-connection path shares the same forwarding but was not driven separately.Automated
src/main/ipc/pty-controller-process-inventory.test.ts— the aggregate still reports local + healthy relays when one relay is unavailable; the deadline is forwarded on both the aggregate and targeted paths; a local failure still fails the aggregate (contract lock).src/main/runtime/pty-inventory-partial-relay-liveness.test.ts— the provider deadline lands strictly inside the runtime's own budget, a tighter caller deadline is honoured, a vouched-for pane keeps its orchestration authority, and a pane no provider vouches for is retired.src/main/ipc/pty-runtime-kill-and-exit.test.ts/src/main/runtime/orca-runtime.test.ts— existing assertions matched the inventory call on exact arity; their intent is which provider scope was asked, so they now match the scope argument and require a numeric deadline beside it, so the added budget is covered rather than merely tolerated.pnpm exec vitest run --config config/vitest.config.ts \ src/main/runtime/pty-inventory-partial-relay-liveness.test.ts \ src/main/ipc/pty-controller-process-inventory.test.ts \ src/main/ipc/pty-runtime-kill-and-exit.test.ts \ src/main/runtime/orca-runtime.test.ts \ src/main/runtime/terminal-list-execution-host-scope.test.tsPost-rebase: 5 files, 1202 passed, 1 skipped.
tsc --noEmit -p config/tsconfig.node.json --composite falseclean.oxlint+oxfmt --checkclean on all 6 changed files, and the lint gate was proven live by injecting ano-unused-vars/no-debuggerviolation and confirming both were reported, rather than trusting silent output.Review
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
hasPtyrather than being wrongly retired.catch, somarkSshInventoryUnverifiablenever fires for the silent case.listProcessesWithHostScopestill binds the hoisted module-levellistRegisteredPtyProcessesWithHostScope, andorca-runtime.tsstill calls exactly that — checked explicitly, since a clean merge does not prove the fix stayed on the live path.docs/reference/remote-wire-compatibility.md. No frame shape change, no new opcode, no RPC params touched. This is Rule 3 territory (host-published content onworktree.ps): no field changes meaning, units, or nullability, and the host does not stop populating anything. It stops emitting a false positive. An older client reads the samestatus/hasHostSidebarActivity/liveTerminalCountfields with the same semantics, just accurate, so no capability gate is needed.worktree.pspublishes.Adjacent finding, deliberately not fixed here (flagging so it is not lost; it wants its own ticket):
mobile/src/worktree/agent-row-display.tsdecays a stale agent row using the phone'sDate.now()against a host-stampedrow.updatedAt— the two-machine clock comparison STA-3455 describes. A phone clock behind the host makes that delta negative, so the per-agent dot never decays. It styles the agent row rather than the worktree's active status, so it is a separate defect and out of scope for a focused fix.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) — scoped equivalents run locally as listed in Testing; full typecheck/build left to CIAuthor