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 5d3806b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(desktop): keep a chat-view import alive while it works, by the lease its session renews (#8742)
* fix(desktop): keep a chat-view import alive while it works, by the lease its session renews
An import the chat view runs was failed as lost once it ran past the default tool budget (60 s plus
the 30 s resume grace), though it was still uploading. Its claim now takes the execution lease
under the claiming session, the chat view renews it through the existing lease route while the
import runs, and the turn's wait budget runs to the end of that lease. Without renewals the lease
lapses with the default budget, so a closed or crashed window still settles within about a lease.
* fix(desktop): keep renewing an import's lease through transient failures, and retry a failed lease lookup
- The chat view stops renewing only when the server refuses the call (410)
- The resume watchdog retries a failed lease lookup for up to one lease instead of treating it as a lapse
- The lifecycle tests assert what the agent is resumed with, and when
* fix(desktop): cap a renewed import's wait at the client tool limit, renew at once, and report the extended wait
- A chat-view import's lease extends its wait only up to the cap every client tool has
(CLIENT_TOOL_RESULT_TIMEOUT_MS), so an import that hangs with its page alive still settles
- The page renews the lease as soon as the import starts, then every heartbeat
- The force-fail log names an extended wait and how long it lasted; the wait span's budget
includes the extension
- Tests for the cap, the bound on failed lease lookups, and the client heartbeat
* fix(desktop): bound lease lookups, never fail a replaced call, and renew from the start of an import
- Each lease lookup gets 5 s (and Stop) before it counts as failed, so a stalled read cannot hold
the wait past its deadlines
- A call replaced while its lease was read is left to its new watchdog
- The page renews from the moment it asks for the manifest; a refusal counts only once the claim
is confirmed, and renewing stops on every exit
- Heartbeat tests check the lease a fake server holds, not request counts
* fix(desktop): judge a lease refusal by whether the claim was confirmed when the renewal was sent
* fix(desktop): renew an import's lease only after its claim, and give a capped call up without reading its lease
The first heartbeat now comes one beat in, after the desktop's bounded claim, so every renewal
follows the claim and a refusal always means the call was stopped, settled, or lapsed. A call at
its ceiling is given up before its lease is read, and the force-fail log names whether the
budget, the cap, a lapsed lease, or failed lease lookups ended the wait.
* test(desktop): give the renewal test's lease room for a slow round trip
0 commit comments