Skip to content

Discard Pocket invitation parses after Cancel - #1315

Merged
nedtwigg merged 1 commit into
mainfrom
audit-pocket-scan-cancel
Oct 21, 2026
Merged

nedtwigg merged 1 commit into
mainfrom
audit-pocket-scan-cancel

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

Cancelling Pocket's scanner while an invitation was being parsed could still hand the completed parse to the pairing flow. Leaving the scanner had the same race, for both camera reads and pasted codes.

Invalidate pending parses on Cancel, teardown, and a successful handoff. Ignore their late results and rejection text, while allowing fresh input if the caller keeps the scanner open after cancellation. Update the scanner contract within its existing word budget.

Validation: all four camera/paste cancellation and teardown cases fail before the fix and pass after it; a fifth case preserves fresh input on a retained scanner. All 112 scanner and Pocket App tests, library TypeScript, spec lint, Markdown lint, and diff checks pass.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef7f399
Status: ✅  Deploy successful!
Preview URL: https://2c830f73.mouseterm.pages.dev
Branch Preview URL: https://audit-pocket-scan-cancel.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg merged commit 406bbce into main Oct 21, 2026
19 of 20 checks passed
@nedtwigg
nedtwigg deleted the audit-pocket-scan-cancel branch October 21, 2026 17:07

This branch was successfully deployed

No deployments
hosted-preview — ef7f399b Deployed Oct 21, 2026 by nedtwigg via deploy #1799
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