Repository navigation
fix: settle observation captures and preserve completed input receipts - #529
Merged
Merged
Conversation
Arm cancellation before RPC dispatch to fix the reproduced step_cancel CI failure.
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
timeoutwithscreenshot_capture_failedand CLI exit 4, with dedicated recovery guidance. Browser/CDP capture errors remaincdp_failedwith 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_cancelwas 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:
cancel_forwardingandstep_cancelintegration suites: 6 passed after reproducing and fixing the SIGINT failure.git diff --checkpassed.