Repository navigation
Engine: cua owns and releases Chrome's AXEnhancedUserInterface (end_task, stop, 30 s idle), and a never-seen Chrome is established at click time (#292, #288) - #295
Merged
Conversation
… the engine's stop, or 30 s after the last observing connection closed (refs #292) Chrome lists AXEnhancedUserInterface (AXManualAccessibility is Electron's) and answers its write with kAXErrorNotImplemented while acting on it, so the engine never owned it and Chrome kept complete mode past cua. A -25208 write that reads true right after counts as set (owned by the A3 rule), and a -25208 write back counts as done. The release comes at whichever is first: the service's end_task now sends endTask before closing, which releases at once what only that connection observed or acted on; the engine's stop (shutdown or a termination signal); or enablementReleaseGraceMs (30 s) after the last observing or acting connection closed otherwise, a timer token that a new observation, input or close replaces. An input counts as an observation. Grace 0 is the previous immediate release. Docs: the Enablement header, a #292 Decision Log entry with one pointer line in #282's and #283's, and a correction note in the chrome-first-mouse evidence README. Sminos-Session: cursor235#b93055dd (cua on macbook)
…stablishes it first, and an element with an AXWebArea child is never outside (refs #288) #288's hosted spike: before any role read a page point hit-tests to a coarse AXScrollArea that walks to the window; after the application's role read a window search finds the AXWebArea in 11-29 ms, but the point can still answer the web-contents AXScrollArea (the web area's parent) for 40-350 ms. pointerView now counts a hit, or any element on its walk, with an AXWebArea child as a possible web area. A route-3 left click (coordinate, or an element click's synthesized path) into a Chromium process with hasSeenWebArea false first reads the application's AXRole, searches the window for an AXWebArea (noteWebArea when found), and hit-tests the point again, re-hitting a container every 25 ms for up to 500 ms, the step bounded at 600 ms, nothing activated or posted. The meta records pointerEstablish {ms, webAreaFound, rehits}, which the service passes as cua/pointerEstablish. Sminos-Session: cursor235#b93055dd (cua on macbook)
… when it searches (refs #288) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ut, an input after a release re-enables it fresh, and the re-reads wait out Chrome's debounce (refs #292) The design session's limits text is "30 s after cua's last action on that Chrome": each observation, input, and request end arms a per-process timer token, and the newest one releases even while a connection stays open (a model that never calls end_task keeps it until the 15-minute idle stop). A close without end_task releases only a process with no timer armed (a failed release, retried). A released process still observed is kept, and its next observation re-enables it, owned. An input to a Chromium-family process takes the observation's enablement step (inputEnablement), so an action after a release sets EUI again, owned, and moves freshSince. #282's action re-read and #283's box re-read now run until the later of 2 s and freshSince + 2.6 s, capped at 3 s, since complete mode lands about 2.2 s after the write. The first-click limits say about 3 s. Sminos-Session: cursor235#b93055dd (cua on macbook)
… and unknown is a possible web area, never outside (refs #288) The review of d2568c7..96c6f09: a failed children read counted as no AXWebArea child, so a web-contents AXScrollArea whose children could not be read walked to AXWindow and, with a web area seen, a page point counted as accepting first mouse. hasWebAreaChild now answers nil for unknown, the walk takes it as incomplete, and the establishment keeps re-hitting an unknown hit. Sminos-Session: cursor235#b93055dd (cua on macbook)
…e release re-checks its token under the entry's lock (refs #292) The review of d2568c7..96c6f09. releaseAll (the shutdown request and a termination signal) now sets a stopping state under the class lock before taking the processes; from then on enableReporting writes nothing (checked again under the entry's lock) and noteActivity records nothing, and every owned entry is reset whatever its observers, so a request still running cannot register or re-enable after the stop's reset. A grace timer's token is now checked again under the entry's lock before the reset, so activity landing between its first check and the reset makes it stale. Sminos-Session: cursor235#b93055dd (cua on macbook)
…he engine still handles an endTask buffered behind a failed write (refs #292) The review of d2568c7..96c6f09: the relay closes fully (end, then destroy), and Server.serve stopped reading once an earlier answer's write failed, so an endTask buffered behind the cursor hide could be lost and EUI left to the grace. The client now unpublishes the connection, fails its waiting requests at once, sends the hide unawaited and endTask, and closes on endTask's answer, an error, or after 1 s (end_task's hook stays bounded at 2 s). The server, after a failed write, reads the frames already buffered (each read bounded at 1 s) and handles an endTask among them. Tests: a fully closing relay in the client suite, a buffered endTask behind a closed peer in the engine's. Decision Log: the review's four findings in #292's entry and #288's container rule. Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
marked this pull request as ready for review
November 6, 2026 06:01
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 6, 2026
Owner
Author
|
Update from #287: the configs this PR's Limits named as unmeasured are now measured (hosted macOS, main's engine at 51b473f, 2 reps).
Findings: #287 (comment) |
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
cua turned on Chrome's full accessibility mode and never turned it off (#292). Chrome has no AXManualAccessibility, which is Electron's attribute. It lists AXEnhancedUserInterface (EUI), so the engine has always written EUI to Chrome. Chrome answers the write with −25208 (not implemented), yet acts on it: 2.2 s later it turns on its complete mode and its screen-reader flag. The engine counted −25208 as a failed write, so it never owned EUI and never released it. Chrome kept the mode for its whole life. While it does, AX-driven moves and resizes of Chrome's windows animate.
The owner ruled that EUI is acceptable while cua drives that Chrome, provided cua releases it when done. This PR owns it and releases it.
#288: the first click into a fresh Chrome waits on Chrome's fixed 2.2 s debounce. #288's spike (Chromium's source plus measurement) found that EUI is the only route to complete mode on macOS, and nothing reaches it faster. So the latency limit is re-stated at its measured bound. The toolbar limit is replaced by a click-time establishment.
Closes #292
Closes #288
What changes
Own and release (#292)
endTaskand awaits its answer, bounded at 1 s, before closing. The engine still handles anendTaskbuffered behind a failed write.freshSince+ 2.6 s, capped at 3 s from their start. Complete mode lands about 2.2 s after the write.enablementWrite successwithenablementWriteError −25208for such a write.The toolbar step (#288)
pointerEstablish {ms, webAreaFound, rehits}(cua/pointerEstablish).Docs
Live proof (hosted macOS runner)
docs/evidence/2026-11-06-eui-release/holds run https://github.com/SSFSKIM/cua/actions/runs/42168334138 at 6392694, and the earlier 42167787338 at 96c6f09. Chrome for Testing 156 behind a frontmost TextEdit, 2 reps each, all alike.{released: 1}in 2 ms; EUI false, checkbox AXPress and text boxes gone 12–15 ms later; a window move settles in 2 frames (8–55 ms) against main's 4–6 frames (94–159 ms)#288's spike (runs 42161269408 and 42162367095) measured each candidate trigger.
Limits
Tests and review
EnablementOwnershipAndGraceTests,RereadDeadlineTestsandPointerEstablishTests. The JS engine-client and service suites pass, with a transport that closes like the real relay.Sminos-Session: cursor235#b93055dd (cua on macbook)