Repository navigation
Engine: a control relabelled in place is refused as relabelled, its label's words compared with numbers set aside (#298) - #355
Merged
Merged
Conversation
…over the point since the screenshot, as newElementOverPoint (refs #330) The design session's ruling 11bec0ed on #330's spike (rule dL, "dL hit chain, listed"): - The observation keeps, beside the stale-point record, every element its walk recorded, framed or frameless, with whether the walk recorded all of its children (screenshotChildrenRecorded, ObservedScreenshot.recorded). - Where the recorded node lies in an AXWebArea and #296's checks and rule G keep the point, rule G's walk of the hit's parents (liesIn now returns the chain) is read from the web area down: the topmost element the record lacks whose parent the record holds with every child refuses when that parent's AXChildren lists it now. A budget-cut parent, an unlisted element (Chrome's button-label text) and anything the record holds stay silent. A refusal #296 or G already made keeps its reason. - The recorded node as found now, or an element holding it, is not new (#296's re-created control, and a wrapper re-created around it). - The refusal is screenChangedSinceScreenshot with its own sentence: a new element, such as a suggestion list or popup, has appeared over the recorded element; take a new screenshot or press Escape before clicking. The meta's stalePoint carries reason newElementOverPoint and newElementReads. NewElementGuardTests (7); 1,063 engine tests pass, 1 skipped as before. Sminos-Session: cursor235#b93055dd (cua on macbook)
…refs #330) testTheScreenshotKeepsItsRecordedElements, as #316's window list is: it kills the one mutation of mutate-330.py that the guard's suite could reach but did not. 20 of the script's 24 mutations failed a test before; now 21, the three left only a live click reaches (the observation not keeping the elements, the guard's and the recheck's call not passing them). Sminos-Session: cursor235#b93055dd (cua on macbook)
…ent refusal and its limits, plugin 0.27.16 (refs #330) The entry records the spike's findings and candidates, rule dL as built (the record's elements, the chain from G's walk, "every child recorded", "listed"), what the build settled (the node as found now and what holds it are not new; a refusal keeps its reason; every kept reason judged when G walked; newElementReads), the refusal, the cost, the limits, and the merge gate of rulings 11bec0ed and 31a62775. #316's item 8 notes the amendment; the Interfaces' stalePoint reasons gain #316's two and newElementOverPoint, and its fields #316's costs and newElementReads. agent-cursor.md's stale-point paragraph now says the guard refuses a web page's new element over the point, carries the ruling's limit text as approved and Chrome's <datalist> popup passing a click through; the docs test, repl-parity's docs oracle, PROVENANCE.md and the surface inventory's Table 3 addition (2026-11-08, #330) carry it. Sminos-Session: cursor235#b93055dd (cua on macbook)
…w, nor counts a failed AXChildren read as complete (refs #330) The review of 364e017..51ce413, two P2s: - A hit #305 keeps as a recorded control (recordedHit), its own handle or one re-created in place, now counts as a recorded node as found now, beside the node at the point: dL is silent on it and on anything holding it. newElementOverPoint takes the list of found nodes. testARecordedHitReCreatedInPlaceIsNotNew is the reviewer's repro (#305's code view in a web area, the textarea re-created at its role, frame and label), with a re-created wrapper too. - ElementData.childrenRead says whether AXChildren was read (an error slot decodes as no children), the walk carries it into the record (ScreenshotNodeRead.childrenRead, both emit sites), and screenshotChildrenRecorded never counts an element whose read failed as complete. testSilentWhenTheParentsChildrenWereNotRead (a button whose children read failed at the observation, its label listed at the click) and testTheWalkRecordsAFailedChildrenRead (over WalkTests' fake tree; FakeTree.childrenUnread). NewElementGuardTests 11; 1,067 engine tests pass, 1 skipped as before. Sminos-Session: cursor235#b93055dd (cua on macbook)
…#330's entry records the review's fixes and the acceptance cd365f0e (refs #330) testTheGuardsRecordOnlyReadsCarryAFailedChildrenRead (VisibleFirstTests, over the width-rule list now built by omittedList) kills the one review mutation the first fix's tests left: the walk's record-only emit site dropping childrenRead. mutate-330.py: 29 mutations, 26 fail a test, the 3 live-only survive. The Decision Log's #330 entry notes the design session's acceptance of the found-node narrowing (cd365f0e), its extension to a recordedHit, the failed AXChildren read, the cost on a recordedHit, and the counts: 1,068 engine tests pass, 1 skipped as before. Sminos-Session: cursor235#b93055dd (cua on macbook)
… recorded (refs #330) Sminos-Session: cursor235#b93055dd (cua on macbook)
…he version waits for the merge turn (refs #330) Sminos-Session: cursor235#b93055dd (cua on macbook)
… relabelled, its label's words compared with numbers set aside (refs #298) The design session's ruling 31a62775 on #298's findings. The record keeps each node's subrole and an AXStaticText's value. When the node at the point is found by its own handle and its frame read now holds the point, the guard refuses with reason `relabelled` if both labels are non-empty and their words differ: the lowercased letter runs, with every number and the words after it up to the next punctuation mark set aside (the spike's `besideNumbers` rule, ported as measured). The window, the web area and Chrome's tab (subrole AXTabButton) are not compared. #296's re-created match now also requires an AXStaticText's value to have the same words when neither side has a title or description; titles and descriptions keep exact equality. The refusal names the old label and the new one and asks for a new screenshot. Sminos-Session: cursor235#b93055dd (cua on macbook)
…el changes it misses; #298's Decision Log entry (refs #298) agent-cursor.md's stale-point paragraph now says a click or drag is refused when what the screenshot showed at the point has been relabelled, and that the check cannot see a label that changed only in its numbers or a toggle switched with its label unchanged (the ruling's limits 1 and 5). The docs test, parity's docs oracle, PROVENANCE.md and the surface inventory's Table 3 addition (2026-11-09, #298) carry it. The native engine spec gains the #298 Decision Log entry (the findings, the ruling, the build's gaps, the cost, limits 1-5 with limit 4 as ruling (b) changed it, the merge gate), notes #296's limits (ii) and (v) as closed by it, and lists the `relabelled` reason in the meta's interface. Sminos-Session: cursor235#b93055dd (cua on macbook)
…on result (refs #298) Two lines of StalePoint.swift reflowed to the file's width (no change in behavior), and #298's entry states what the mutation run found: 37 of 39 mutants fail a test, and the two survivors are by design (an equivalent mutant and the live-only value read). Sminos-Session: cursor235#b93055dd (cua on macbook)
… a relabel, while a link or chip there still is (refs #298) The design session's ruling 1ea561bc:553, and the review of 7f6eb3d..b2f00ad (P2 1). An AXStaticText, or a text run inside one, whose nearest editable ancestor is the one recorded for it is exempt from rule `relabelled`, on its own handle and on the re-created match (where it is matched without its value, its title and description still compared). The editable ancestor is the text's AXEditableAncestor where exposed, else its nearest AXTextArea or contenteditable group. The walk reads AXEditableAncestor in its batch, and the record keeps it for each AXStaticText. Anything actionable between the text and the region (an interactive role, or AXPress: a link, a button, a mention or chip) keeps the text judged, and so does a text whose editable ancestor now differs from the recorded one. #298's Decision Log entry states the exemption and its ruling. Sminos-Session: cursor235#b93055dd (cua on macbook)
… one, at the observation or now (refs #298) The review of 7f6eb3d..b2f00ad (P2 2). The live seam's attribute read answers nil both for an attribute the element lacks and for a read that failed, and the label fell through to the next source on either: a button titled "Save" and described "Save changes" whose title read failed at the click compared its description with the recorded title and refused, and the inverse when the title failed at the observation. The walk's batch now keeps which attributes failed with an error other than their absence (failedSlot, ElementData.unreadable), the record keeps that for the label's attributes, and the click reads each label attribute with its error. The label falls past an absent or empty attribute only; where it would depend on an unreadable higher-priority one, on either side, the rule keeps the point. Sminos-Session: cursor235#b93055dd (cua on macbook)
…escription is still refused; the Decision Log names the mutation result (refs #298) The extended mutation run found the re-created path's exemption untested on its condition that the title and description still agree; a test now pins it. #298's entry states the run: 65 of 72 mutants fail a test, and seven survive by design (two equivalent, five reached only by a live click). Sminos-Session: cursor235#b93055dd (cua on macbook)
…cestor names, never the element answering it (refs #298) The review of b2f00ad..25b23fb (P2 1). Where a text answered no AXEditableAncestor, the record and the click took the nearest ancestor answering one as the region. A link answering the editor was then recorded as the region, and its relabelled text was exempted, because the walk stopped at the link before checking it. A text whose own read failed on one side only resolved to its paragraph there, so typed text refused. Both sides now resolve to the region the attribute names (`stalePointRegion`), or an AXTextArea itself, so an actionable wrapper stays on the checked path. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ion Log, plugin 0.27.23 (refs #330) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ons cannot be read withholds the edited-text exemption (refs #298) The review of b2f00ad..25b23fb (P2 2). `actionNames(of:)` answers an empty list when AXUIElementCopyActionNames fails, so a wrapper whose actions could not be read counted as inert and its text was exempted. The live seam now reads `establishedActionNames` (nil on failure, an empty list for none), and an element between the text and the region whose role or action names cannot be read keeps the text judged. An empty list read is inert. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d; the Decision Log names the mutation result (refs #298) The extended mutation run found the record's use of a text's own AXEditableAncestor untested where no ancestor names the region; a case now pins it. #298's entry states the run: 70 of 77 mutants fail a test, and seven survive by design (one equivalent, six reached only by a live click). Sminos-Session: cursor235#b93055dd (cua on macbook)
…310 and #341) into fix/298-relabelled (refs #298) #330's branch moved to 494857c and brought main's #310 and #341. The only conflict was the Decision Log's tail, where both sides had appended entries. All are kept: #310's and #341's (2026-11-08), then #298's (2026-11-09). The plugin version is #330's 0.27.23; #298's bump waits for the merge turn. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d (refs #298) main's tree is #330's final head e46319b, squash-merged, which this branch held up to 494857c. Every file #330 touched conflicted with that history. Each was resolved to this branch's side, plus #330's last delta (494857c..e46319b: its Decision Log entry and its evidence README). The merged tree differs from main only by #298's own changes. Sminos-Session: cursor235#b93055dd (cua on macbook)
…298's entry carries the post-merge test count (refs #298) The document the server serves changed (agent-cursor.md's stale-point paragraph), so the plugin goes from #330's 0.27.23 to 0.27.24 in plugin.json and marketplace.json. #298's Decision Log entry now names the version and the engine's 1,127 tests after the merge of main. Sminos-Session: cursor235#b93055dd (cua on macbook)
…es a text's region from text-entry roles, and the click reads it live (refs #298) The design session's ruling 1ea561bc:565 on #298's walk cost: the hosted gate measured walk p50 rising from 174 to 385 ms in Firefox and from 177 to 313 ms in Finder with AXEditableAncestor in the batch. That attribute is out of `observedAttributes` and ElementData. The record now takes an AXStaticText's region from its nearest recorded ancestor of an editable text role (AXTextArea, AXTextField). The click alone reads AXEditableAncestor, and only where the value comparison would refuse: the text's attribute must name that region, else the region its nearest parent names. What the review settled is kept: a link or chip that answers the editor stays on the checked path, a failed role or action read never grants the exemption, and a text whose own read fails still reaches the region through its paragraph. A contenteditable group that the browsers expose as a plain group is no longer told apart from any group, so its text stays judged. Sminos-Session: cursor235#b93055dd (cua on macbook)
…s AXEditableAncestor at the click; linkmono refuses as nodeGone (refs #298) #298's Decision Log entry, item 7, now states ruling 1ea561bc:565: the measured walk cost, the record deriving a text's region from text-entry roles, the live read at the click, the plain-group limit, and the cost. The ruling's lazy per-record fallback was not needed. A new item 9 records that linkmono (Save -> Send, same width, re-created) refuses as `nodeGone` on the branch where main keeps it: the extended re-created match rejects the new text's words, which is the safe side. The merge gate now asks for the walk's cost back at main's. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d's stays judged; the Decision Log names the mutation result (refs #298) The updated mutation run (ruling 1ea561bc:565) found the live check of a parent's AXEditableAncestor untested where it names another region than the one the record derived by role. A case now pins it. #298's entry states the run: 67 of 74 mutants fail a test, and seven survive by design (one equivalent, six reached only by a live click). Sminos-Session: cursor235#b93055dd (cua on macbook)
…Log (refs #298) docs/evidence/2026-11-10-relabelled/README.md records the spike (probe/298-measure and its three runs), the refusals gate (run 42732128619: 36 expected relabelled refusals, 0 on kept or shared cells), the editor gate (run 42749519072: the link inside the edited region refuses in 3 of 3 browsers, 0 refusals on the 9 typed-editor cells, every editor an AXTextArea), the paired cost (run 42749562318: walk p50 within -2.6% to +1.2% of main), and the limits. #298's Decision Log entry gains a "Proven live" section with the same results and the plain-AXGroup limit the design session asked for (1ea561bc:569).
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 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
When an app relabels a control in place, keeping the same element (Save becomes Delete), the stale-point guard used to let the click through. The click landed on what was now Delete. Now, when the recorded node is found by its own handle and its label's words have changed, the click is refused before anything is posted, as
screenChangedSinceScreenshotwith the reasonrelabelled. The sentence names the old and new labels, and tells the model to take a new screenshot.Closes #298
The rule (design session rulings 31a62775, 1ea561bc:553, 1ea561bc:565; the spec's #298 Decision Log entry)
stalePointLabelsAgreealso compares an AXStaticText's value by words. Titles and descriptions keep exact equality.Docs:
docs/cua-api/agent-cursor.md's stale-point paragraph names the refusal and the label changes it misses. The surface inventory, the docs test, parity's docs oracle and PROVENANCE.md carry it.Plugin 0.27.24.
Live proof (GitHub-hosted macOS 26.7.2: Safari, Chrome for Testing, Firefox, Finder, TextEdit, and AppKit fixtures)
The evidence is in
docs/evidence/2026-11-10-relabelled/.relabelledrefusals, all expected (Save→Delete 21, Delete→Delete all 4, Follow→Following 4, Play→Pause 4, "Save changes?"→"Delete file?" 3); 0 on kept or shared cellsrelabelledon 9 typed-editor cells; the Save→Delete link inside the edited region refuses 3/3; every editor reads as AXTextAreaThe spike:
probe/298-measure, runs https://github.com/SSFSKIM/cua/actions/runs/42557315991, https://github.com/SSFSKIM/cua/actions/runs/42558915827 and https://github.com/SSFSKIM/cua/actions/runs/42559900886. A replay of #296's false-positive spike refused 0 of 132 kept cells.Limits
nodeGonerather thanrelabelled. Main keeps it.Tests and review
RelabelledGuardTests,RelabelledEditableTests(7) andUnreadableLabelTests, plusVisibleFirstTestsfor the record-only reads. Docs node tests: 35/35.