Repository navigation
Engine: the stale-point guard refuses a click when the app opened a window over the screenshot or the point left the screenshot's page (#316) - #332
Merged
Conversation
…opened a new window over the screenshot's, or when the point has left the screenshot's web area (refs #316) The design session's ruling 4701abd8 on the spike's findings, two rules in the stale-point guard: - W: the screenshot keeps the on-screen window numbers its capture already read (ShareableWindowCache's list). At a coordinate click or a drag's start, in every app and both desktop modes, the window list is read once, and a window of the app's at layer 0 above the click's window that the screenshot's list did not hold refuses before the tree is read (reason newWindow, the window's number in the meta). The refusal reuses screenChangedSinceScreenshot, with a sentence of its own: the remedy is the guard's (a new screenshot first), and no recorded element is at fault. - G: each recorded node keeps its nearest AXWebArea at or above it in the record. A hit at the point must be that web area or lie inside it, its parents walked (parent reads only, bounded by stalePointAncestorLevels), else otherWebArea, refused. An iframe's hit passes inside the page's area; a node inside an iframe needs the iframe's document. An empty hit, and a node outside every web area, are judged as before. The meta's stalePoint adds windowsMs (W's read) and webAreaReads (G's walk). NewWindowGuardTests, 4; WebAreaGuardTests, 6; the existing guard suites unchanged. Sminos-Session: cursor235#b93055dd (cua on macbook)
… agent-cursor.md, plugin 0.27.9 (refs #316) The entry records the candidate withdrawn (61% false refusals), rules W and G as built with their emulated catches and costs on run 2 (76 of 104 wrong clicks caught, 37 of 449 false refusals), the window-list read's measured cost, the residue they still miss (#330's page suggestion lists, #331's TextEdit reflow, Safari after a re-observation), and what the hosted check must verify. The paragraph's second half is a draft, final after the hosted A/B; the docs test, repl-parity's docs oracle, PROVENANCE.md and the surface inventory's Table 3 addition (2026-11-08, #316) carry it. Sminos-Session: cursor235#b93055dd (cua on macbook)
…t and iframes of both origins pass (refs #316) Sminos-Session: cursor235#b93055dd (cua on macbook)
…heck's windowsMs and the walk's webAreaReads (refs #316) The review of 73b4456..e62a745 (one P2): a shared-mode Chromium or Firefox click carried by #282's element route replaces meta.stalePoint with StalePointGate.check's record, which kept only the first verdict and the total time, so windowsMs never reached the meta on those clicks, recheck or not. The gate is now built from the first check's record (init(first:record:recheck:)) and its record carries that windowsMs; stalePointPressVerdict's rebuilt verdict carries the webAreaReads it was judged after. WebAreaGuardTests' new test fails without either part (mutate-316.py, 3 more). Sminos-Session: cursor235#b93055dd (cua on macbook)
… Log entry records the A/B and the accepted gate exception (refs #316) Sminos-Session: cursor235#b93055dd (cua on macbook)
Codex Review Summary: ✅ CompletedThis 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 9, 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
After ⌘L in Safari, a coordinate click on the page answered success but landed on the address field's panel, which the accessibility tree doesn't show. The stale-point guard now refuses that click, and two other wrong-target cases with it, with nothing posted:
Both refuse as
screenChangedSinceScreenshot. The meta's reason isnewWindoworotherWebArea.Closes #316
The rules (design session rulings 4701abd8 and 17dd203e; the spec's #316 Decision Log entry)
stalePoint.windowsMsandstalePoint.webAreaReadssurvive the element route's record.docs/cua-api/agent-cursor.mdnow states what is refused, and what is still missed with what to do about it. The surface inventory, the docs test and parity's docs oracle carry the same text.Plugin 0.27.9.
Live proof (GitHub-hosted macOS 26.7.2: Safari 27.2, Chrome for Testing, stable Chrome 156, Firefox 159, TextEdit, Finder; main 73b4456 against the branch's ca4652a)
The evidence is in
docs/evidence/2026-11-08-overlay-guard/. The A/B scored the engine's own refusals.newWindowotherWebAreanewWindownewWindowstalePoint.msp50 / p95 / maxThe still-page gate
The gate is live clicks on unchanged pages and apps, with no key and no navigation.
The 3 refusals. They are all Wikipedia links in Chrome for Testing, whose recorded frame was a 1 pt sliver at the web area's bottom edge. There, Chrome's hit-test answers its own view group, outside the web area.
nonInteractiveHit. The page got no event, and the engine answered success.Runs:
The kit is
probe/316-measure(af721d0), off main.Limits: what W and G still miss (unchanged on both heads)
Tests and review
NewWindowGuardTestsholds 4 andWebAreaGuardTestsholds 7. The Engine: refuse a coordinate click whose screenshot target has moved or been replaced (stale-point guard) #296, Stale-point guard may refuse ordinary clicks on still pages (GitHub code view, Safari toolbar, Finder title bar): live check #305 and Engine: when the node budget cuts, keep what the screenshot shows (visible-first walk) #301 suites are unchanged. The focused node tests pass: docs 35/35, the service 38/38.Sminos-Session: cursor235#b93055dd (cua on macbook)