fix(cu): preserve unknown dispatch outcomes - #921
Conversation
|
@Astro-Han Follow-up to your merged #911 P2 is isolated and CI typecheck/test/e2e is green. Both generic left_click and semantic click_element now preserve model-visible outcome_unknown while the session remains fenced in reobserve_required. Ready for review. |
Astro-Han
left a comment
There was a problem hiding this comment.
Approved. I did not find a P0 or P1. This is the follow-up round for #911. One non-blocking P2 remains; I did not find an additional P3.
[P2] Revalidate host-read leases even when the backend fails. cursor_position and wait use the observation lease, but gating that check on result.outcome.ok lets a failed host result complete after clearSession(). I reproduced both calls returning service_unavailable after the session had already become user_stopped. This regresses the stop fence added in #911; the existing test covers only successful late results. Keep observation-lease validation unconditional, and narrow the outcome_unknown exception to delivered action results whose session was not changed externally.
Summary
Follow-up to the non-blocking Runtime finding on merged #911.
outcome_unknownafter dispatchreobserve_requiredRoot cause
applyTypedOutcomeState()correctly advanced the session afteroutcome_unknown, but the subsequent old-lease validation replaced the backend result withreobserve_required. The state was safe, but the model lost the critical signal that delivery may already have occurred and could retry an action incorrectly.Verification
git diff --check