Skip to content

TTP 3.2.4: check that the text arrived whole, and repair it - #6

Merged
AmirK-S merged 3 commits into
masterfrom
polaris/v3.0.0
Sep 27, 2026
Merged

AmirK-S merged 3 commits into
masterfrom
polaris/v3.0.0

Conversation

@AmirK-S

@AmirK-S AmirK-S commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Released as v3.2.4.

  • The paste verifier compares the text in the field with what was dictated, not only its length.
  • Scraps of the text are selected over Accessibility and retyped over, once, when nothing else touched the field.
  • Otherwise the full text goes on the clipboard and the pill says ⌘V.
  • paste.verify counts hardware and foreign key-downs during injection.
  • scripts/inject-bench: the bench used to measure injection in the Claude composer.

Verified live on a signed build with TTP_FAULT_GARBLE=1: 14 of 104 characters landed, repaired in 247 ms.

🤖 Generated with Claude Code

Amir KELLOU SIDHOUM and others added 3 commits September 26, 2026 21:17
…raps

2026-09-26 (0024-8368): 156 characters typed into the Claude desktop
composer, 21 arrived — the last character of each 16-char chunk, then the
whole last chunk — and paste.verify said `observed` because the field had
grown. The message was sent like that.

- landing.rs compares the field's text with what we typed. Scraps of our
  text (a subsequence, under 90%) are `Partial`; anything the app itself
  rewrote or drew is not.
- When scraps sit still for 80 ms, the verifier selects them over AX (read
  back to confirm) and retypes the text over them, once, unless the user
  moved app, started a recording, or touched the field. `paste.repair`
  records what it did.
- If it cannot, the verdict is `partial`, the full text goes on the
  clipboard, and the pill says ⌘V (`paste_partial`).
- paste.verify now counts hardware and foreign key-downs during the
  injection and when the user hit Return, to test the interleaving theory
  next time it happens.
- TTP_FAULT_GARBLE=<n> reproduces the incident on a real build.
- scripts/inject-bench: the bench that measured injection in the Claude
  composer (everything lands with focus settled; typing 0 ms after the app
  regains focus loses the first chunks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First live test on 0a37392 (0000-1f28): the partial landing was detected
("u dicte ?", 9 of 39) and the clipboard got the text, but the repair
stopped at `skipped_no_selection`. The selection was read back straight
after being set, and Chromium applies it asynchronously in the renderer,
so the read still answered the old caret. Poll the read-back for up to
150 ms, off the async runtime, and say which step failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…id not

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AmirK-S
AmirK-S merged commit 20909ad into master Sep 27, 2026
5 of 6 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.

1 participant