fix(cloud-task): recover queued messages after sandbox stops#3046
Conversation
|
Reviews (1): Last reviewed commit: "fix(cloud-task): recover queued messages..." | Re-trigger Greptile |
ccf9c40 to
11283ab
Compare
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
The bot comment about missing coverage for the "error" status was already addressed in the current diff — the new integration test uses it.each(["disconnected", "error"]) to cover both cases. The core logic is well-guarded: the force-flush path only fires when sandboxAlive === false AND the session is disconnected/error AND not prompt-pending, which is a safe, narrowly scoped recovery path. Interface additions are optional and backward-compatible, and the retry() return-type change to Promise<void> is non-breaking for existing callers.
|
Reviews (2): Last reviewed commit: "test(cloud-task): cover error status san..." | Re-trigger Greptile |
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
No showstoppers. The sandbox-stopped recovery path is narrowly guarded (sandboxAlive===false AND disconnected/error AND not prompt-pending AND reentrancy lock), the interface additions are optional and backward-compatible, and the previously flagged missing coverage for the "error" status is addressed in the current diff via it.each.
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Narrowly scoped bug fix with solid guards: the force-flush path fires only when sandboxAlive === false AND the session is disconnected/error AND not prompt-pending, with the existing reentrancy lock preventing double-fires. Interface additions are optional and backward-compatible, the retry() async signature change is safe for void callers, and the previously flagged missing "error" status coverage is addressed via it.each.
Problem
Cloud task runs can remain
in_progressafter the backing sandbox has stopped. When the renderer is disconnected in that state, a follow-up message is queued behind the agent-ready guard, but no freshrun_startedorturn_completeevent arrives to drain it.Changes
state.sandbox_alivethrough cloud task watcher status and snapshot updates