Skip to content

fix(cu): preserve unknown dispatch outcomes - #921

Merged
Astro-Han merged 1 commit into
apache:mainfrom
hqhq1025:codex/cu-outcome-unknown
Jul 13, 2026
Merged

fix(cu): preserve unknown dispatch outcomes#921
Astro-Han merged 1 commit into
apache:mainfrom
hqhq1025:codex/cu-outcome-unknown

Conversation

@hqhq1025

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the non-blocking Runtime finding on merged #911.

  • preserve typed backend failures such as outcome_unknown after dispatch
  • keep the session fenced in reobserve_required
  • run post-dispatch lease rejection only for backend successes
  • cover both generic coordinate and semantic element action paths

Root cause

applyTypedOutcomeState() correctly advanced the session after outcome_unknown, but the subsequent old-lease validation replaced the backend result with reobserve_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

  • Runtime typecheck
  • focused Computer Use/session-state suite: 69/69
  • git diff --check

@hqhq1025

Copy link
Copy Markdown
Contributor Author

@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 Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Astro-Han
Astro-Han merged commit 35ba798 into apache:main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants