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
{{ message }}
Repository navigation
Commit 9af89fc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mothership): fail unclaimed desktop calls fast and stop dropping them silently (#8652)
* fix(mothership): fail unclaimed desktop calls fast and stop dropping them silently
A desktop call reaches the user's machine only through the chat view showing
that chat, so one issued while the user is elsewhere was never claimed and
the turn waited out a 90-160 s watchdog that called it hung. One desktop wait
now fails a call still unclaimed after a 15 s pickup grace as never started,
with the inverse of the desktop's claim (pending -> failed) and a result
sealed like any client completion. A call claimed in time keeps waiting, and
a result that lands as the grace runs out is returned, not discarded.
Local reads (read_local_file, user-local VFS reads) join them for a desktop
that advertises localReadClaims: the desktop claims each read through
authorize, as it already does for imports. Older desktops keep today's
behaviour.
The single "hung and was abandoned" result becomes two: notStarted for an
unclaimed call, and outcomeUnknown/doNotRetry for one that started and lost
its result. Both are settled through one sealed failure helper. A terminal
run's server budget now follows the wait the desktop holds it for. A
not-started report can settle only an unclaimed call.
In the renderer, a running browser action is cancelled only by Stop:
recovering the stream or leaving the chat view lets it finish and report.
A terminal call delivered too late is reported as not started instead of
being skipped.
* refactor(mothership): one desktop-tool classifier and a typed claim for each claimant
The authorize and confirm routes classify desktop tools through
lib/mothership/tools/desktop-tools.ts instead of inline checks. The Sim
execution claim and the desktop claim share one run-admission lock but
return their own outcome types, so a Sim caller can no longer receive the
desktop-only awaiting_permission outcome. The terminal-status mapping moves
to lifecycle as getTerminalConfirmationStatus, since confirm uses it for
every client tool.
* test(mothership): drive the authorize unit test through the desktop claim
* fix(mothership): settle an unclaimed desktop call whose wait ends before the grace
A wait shorter than the pickup grace ended with no result and left the call
claimable; it now settles it as never started like any unclaimed call. The
desktop E2E fixture models claims per call, the way the server accepts a
local read's repeat claim and refuses a second import claim. The admission
probe follows the claim rename.
0 commit comments