fix(cua-driver): bound large macOS text synthesis - #2863
Merged
Conversation
f-trycua
force-pushed
the
codex/fix-large-type-text-2861
branch
from
August 4, 2026 23:07
bd8afa2 to
358bd55
Compare
f-trycua
marked this pull request as ready for review
August 4, 2026 23:25
This was referenced Aug 4, 2026
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.
Summary
Why
The macOS synthesized fallback has a per-character floor plus a bounded delivery drain. Large payloads can therefore outlive the daemon's 120-second request deadline, leaving callers with a transport timeout while the target may still be partially mutating.
This change gives synthesized routes a documented 100-second scheduled-work budget, reserving the remaining transport time for event construction, routing, focus assistance, queueing, response serialization, and transport delivery. Atomic AX insertion remains the preferred one-call path and is deliberately exempt because its cost does not scale per character.
Fixes #2861
Regression coverage
Verification
Exact source:
358bd55dd1dde03df1aab246d8b7d72a169e9f8acargo test -p platform-macos— 312 passed, 0 failed; 1 doctest ignoredtype_texttests — 19 passed, 0 failedcargo fmt --all -- --checkgit diff --check origin/main...HEADnpx tsx scripts/docs-generators/runner.ts --library cua-driver --checkNative macOS certification
Certified from the exact source SHA on a disposable macOS 26.5.2 arm64 Lume guest using a signed Cua Driver 0.17.0 candidate.
5a4b0aea4a3cf971677631f7ac17767064afa65e14ded178facd746e289423d7d78483e2cab099da4b14bed941d479b902fee005get_config.source_shamatched the exact PR headtype_text_synthesis_budget_exceededin 1.1 seconds withdelivered_chars: 0,synthesized_chars: 0, and a safe chunk limit of 2,578 characterstype hereafter refusal