Skip to content

macOS engine: the stale-point guard refuses a kept decoration that now lies in a different control than the one the screenshot showed (0.28.29) - #477

Merged
SSFSKIM merged 6 commits into
mainfrom
fix/443-decoration-control-gone
Nov 22, 2026

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Closes #443. Version 0.28.29. Design rulings 1059, 1060 and 1061.

The bug

The observation recorded an inert decoration inside link A. The page then replaced A with link B and moved the decoration into B. The decoration's handle was still alive and in place, so the stale-point guard kept the click (sameElement), and the click landed on B. Main dfe6f44 did this 20/20 on Chrome for Testing and 20/20 on Electron (#433 measured 40/40 on 870dd11).

The fix

controlGoneVerdict in StalePoint.swift runs once the recorded node's recorded control (ScreenshotNode.control) is confirmed gone, meaning its handle answers kAXErrorInvalidUIElement. It reads the control the decoration lies in now: its nearest live ancestor with an interactive role or AXPress.

It refuses with screenChangedSinceScreenshot (stalePoint.reason: controlGone, controlRole) only when all of these hold:

It keeps main's verdict in every other case:

  • there is no live acting ancestor;
  • an ancestor can't be classified;
  • a label or frame is unread;
  • a live control matches the recorded one's label and place, whatever its role;
  • a recorded control, actionable in the record and in place, holds the hit or the decoration;
  • the hit is the exact, in-place recorded content of such a control.

The model-facing docs already say "is gone", so they are unchanged. There are Decision Log entries for the rule, the review fix, the narrowing after the smoke, and the last review wave.

Evidence

docs/evidence/2026-11-22-decoration-control-gone/README.md. The kit is probe/443-qual, README §"#443 qual" at a314e4f. The fix df38312 ran against main dfe6f44: 3,720 rows over three lanes, 10 rows per head per unit. Runs 45003171589 (A), 45035915969 (B) and 45040636364 (C). The head adds only the evidence commit.

Review. reviewer-medium ran three rounds:

  • 1 P2, a false refusal for overlapping recorded links, fixed in 2a3c7e5.
  • After the hosted smoke on 2a3c7e5 found two more false refusals, the rule was narrowed in f394677 (ruling 1061). The re-review of that head found 2 P2 and 2 P3, all fixed in df38312 as the last wave.
  • After that, the counted qual was the check (ruling 1061).
  • swift test: 1607 run, 0 failures, 1 skipped.

Limits

  • What the narrowing gives up (ruling 1061): a re-created control with the same label and place keeps main's verdict. That includes a replacement link that reads like the one it replaced, because the rule can't tell it from the same control re-created. Safari's role change re-creates the control's AX object, and that is what keeps rolechange landing.
  • Main's baseline: on CfT, overcontrol, overlaprow/link, rebuildunder and bgbutton never land on either head (backgroundClickRefused). On Safari, both heads refuse the overlap cells. The fix changes none of these.
  • The own-handle condition is not separated by any test, because a node re-created together with its control already keeps. It is a cheap guard.

Sminos-Session: cursor235#b93055dd (cua on macbook)

…trol is confirmed destroyed refuses controlGone (refs #443)

decomove (kit probe/433-qual, run 44715767925): a decoration moved from a replaced
link A into its replacement B kept its handle, so the guard answered sameElement and
main landed on B 40/40 on CfT and Electron. The guard now refuses a point #296 keeps
when the node, inert and found by its own handle, has a recorded control (#431's
ScreenshotNode.control) whose handle answers kAXErrorInvalidUIElement. A live control,
a control unreadable for any other reason, a re-created node, a node acting on its own
and #305's recordedHit keep main's verdict. Meta reason controlGone with controlRole,
its own sentence; the observation records nothing new.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…rded control is confirmed gone (refs #443)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…hes before controlGone refuses (refs #443)

Review of dfe6f44..1d3b096 (P2): with links A and B overlapping at the point, the
record can take a decoration of the back link A while the front link B takes the click.
Once A is removed, a hit on B's text (nonInteractiveHit) or on B holding the moved
decoration (hitAboveNode) refused controlGone though main lands on B. Before refusing,
the hit's control (the hit or its nearest acting ancestor below its document) now
vouches when it is a recorded node by handle, shown at the point and in place.
decomove's B, a replacement not recorded there, still refuses.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…erent control (refs #443)

Hosted smoke 44997131965 (main dfe6f44 vs 2a3c7e5) found two false refusals:
overlaprow (Electron), the decoration left in its row under no control beneath the
front link, hit on the decoration itself; and rolechange (Safari), WebKit re-creating
link A's object as an AXButton with the decoration inside. With the recorded control
confirmed gone, the guard now reads the node's live nearest acting ancestor below its
document and refuses only when it exists and differs from the recorded control by label
or by a frame more than 2 pt off; the role is not compared. The vouch by a recorded
control in place at the point now checks the node's live control as well as the hit's.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…k stop on what they cannot confirm (refs #443)

Re-review of f394677 (2 P2, 2 P3): an ancestor whose role or actions do not read ends
the live-control search, inconclusive, so a farther clickable card is never compared;
a vouching control must be a control in the record, so an inert wrapper that gained
AXPress never vouches; an unread title (then or now) ends the label comparison with
no difference, a confirmed frame difference still refusing; and the hit vouches as
recorded content in place whose recorded and live owner is the same control in place
(a front link's text drawn outside its frame).

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ve control refused (refs #443)

Sminos-Session: cursor235#b93055dd (cua on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T16:37:08.829228Z 3ed5561 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 5580ac2 into main Nov 22, 2026
6 checks passed
SSFSKIM added a commit that referenced this pull request Nov 22, 2026
…click (refs #453)

StalePoint.swift merged without conflict: #443's controlGoneVerdict, liveControl, controlDiffers, controlVouches and
contentVouches sit beside #453's overlay fields on the verdict, guardedPointVerdict's answered listing, the gate's overlay
hook and check's verdict. The spec's one conflict (both sides appended Decision Log entries) keeps both: #443's entries,
then #453's.

Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM added a commit that referenced this pull request Nov 23, 2026
Main since dfe6f44: the macOS engine's stale-point guard on a kept decoration in another control (#477, 0.28.29),
and a click on a row of Chrome's omnibox popup, its permission bubble or an AppKit popover carried by the row's own
action (#484, 0.28.30), with its agent-cursor document, the docs oracle and the macOS engine service's meta key.

Conflict, resolved for both sides: docs/cua-api/PROVENANCE.md (main's agent-cursor row, feat's linux-engine row). The
plugin stays main's 0.28.30.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
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.

Stale-point guard keeps a click on an inert decoration that moved from a replaced link into its replacement

1 participant