Skip to content

fix: settle observation captures and preserve completed input receipts - #529

Merged
iuyo5678 merged 3 commits into
mainfrom
codex/fix-527-cooperation
Oct 31, 2026
Merged

iuyo5678 merged 3 commits into
mainfrom
codex/fix-527-cooperation

Conversation

@iuyo5678

@iuyo5678 iuyo5678 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Foreground cooperation sync/wait/status could overtake a cancelled observation thumbnail while the extension still waited for a Chrome screenshot or identity reply. Completed browser inputs could also lose their successful receipts when navigation invalidated the old document's interaction coverage, encouraging an unsafe retry.

Wait for the preempted thumbnail's CLI to settle before dispatching cooperation reads, while keeping those reads independent of ordinary queued actions. Bound viewport capture reads to 10 seconds and give identity/overlay cleanup separate 500 ms limits. Discard late replies after cancellation. Preserve completed input receipts using the existing nativeInputStarted, handler-success and interruption checks, without a method whitelist. Consumed contexts remain invalid; handler failures, revoked input, human intervention and cancellation remain authoritative.

The viewport deadline returns timeout with screenshot_capture_failed and CLI exit 4, with dedicated recovery guidance. Browser/CDP capture errors remain cdp_failed with exit 3. This distinction and the capture cleanup budget are documented in CHANGELOG.md.

The real CLI/daemon/extension/plugin test covers click, Enter submission, drag submission, fill with automatic submission, and select with automatic submission. Each uses a real local page and waits for the navigation-commit event before returning the final successful input/verification reply. It verifies thumbnail cancellation, successful action receipts, one submission and rejection of the consumed context. These cases run in CI with isolated profiles and daemons. Controller tests also cover native input and DOM mutation receipts.

The previous Rust CI failure in step_cancel was reproduced locally: the RPC branch could dispatch before SIGINT listening was armed. Poll cancellation first in the existing biased select. The existing step cancellation and forwarding tests now pass; no retry or new cancellation state was added.

Addresses #527 (screenshot/synchronization contention and completed-action errors).

Validation:

  • Drag, fill and select all reproduced the erroneous coverage/state-change failure in real Chrome before removing the whitelist; both new controller tests failed before the fix.
  • Extension suite: 3,387 passed, 335 opt-in browser tests skipped.
  • All five opt-in CLI/daemon/extension/plugin browser cases passed using Chrome for Testing and bsk 0.4.0.
  • Existing cancel_forwarding and step_cancel integration suites: 6 passed after reproducing and fixing the SIGINT failure.
  • Extension build, extension/plugin typechecks, Biome, Rust formatting and git diff --check passed.
  • Earlier validation in this PR: plugin unit suite 673 passed and CLI error-rendering suite 24 passed.

@iuyo5678 iuyo5678 changed the title fix: settle observation captures and preserve completed click receipts fix: settle observation captures and preserve click/Enter receipts Oct 30, 2026
Arm cancellation before RPC dispatch to fix the reproduced step_cancel CI failure.
@iuyo5678 iuyo5678 changed the title fix: settle observation captures and preserve click/Enter receipts fix: settle observation captures and preserve completed input receipts Oct 30, 2026
@iuyo5678
iuyo5678 merged commit 877eba6 into main Oct 31, 2026
11 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