Repository navigation
macOS engine: a non-text label slot is non-text, never known absent (#519) - #523
Merged
Merged
Conversation
…rd and in the read now (refs #519) ElementData.nonText names the label attributes (title, description, value) whose slot held a value that is no text. screenshotLabelsUnknown folds it into labelsUnread, never labelsNull, and stalePointLabelRead answers .unreadable for one read now. #454's menu-item check now refuses relabelled when the recorded title is unread (failed, null or no text) instead of taking it for none. Sminos-Session: cursor235#b93055dd (cua on macbook)
…is unread (refs #519) Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…519) ElementData.nonText called stringValue, which decoded and bounded the text (a text area's whole AXValue) only to throw it away. isTextValue checks CFGetTypeID against the types stringValue reads, without touching contents. Sminos-Session: cursor235#b93055dd (cua on macbook)
… keeps vacuously (refs #519) Rulings 1146 and 1147. StalePointLabelRead gains nonText (the record's labelsNonText, the read now), so main's label walk can read a non-text part as carrying no text, as main did. relabelledLabel (#298, #433's candidate) and controlDiffers (#443) keep main's walk, and where a part is unknown or no part is known: a part read as text on both sides that differs refuses past any unread one, and the point is kept only when some part read on both sides agrees. The relabelled refusal with no label now has its own sentence. Fixes the head's keep where main refused (numeric title then, description changed) and tightens the failed, null and withheld cases. Sminos-Session: cursor235#b93055dd (cua on macbook)
…its flips (refs #519) Sminos-Session: cursor235#b93055dd (cua on macbook)
…rget (refs #519) Ruling 1150 (monotonicity), the re-review of 3481810..3a8276c: - (a) #433 and #442: a candidate refused for a reason main did not have (StalePointRelabel.added, underlyingRefusal's added) refuses, never handing the point to the next candidate. Proven through #454's menu decision. - (b) The relabel part walk reads an AXStaticText's live value only where the record holds it as non-empty text or null, after no earlier part settled it, and every live label value goes through #405's classified read (stalePointClassifiedValueRead): closed or failed is unread, never compared or quoted. Main's walk stopping at an unknown counts as unknown. - (c) A refusal with no verified label says it could not be verified against the screenshot. - (d) #296's re-created match is refused when the record has an unknown label part and no part read as non-empty text on both sides agrees (recreatedLabelVerified); the match itself is unchanged. - The part walks refuse on a difference only past an unknown part; a label read whole keeps main's rule. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d19fdf (refs #519) Every combination of label slots (absent, empty, two texts, failed, null, no text; a withheld value recorded, a closed value now) runs through the head's relabelledLabel, controlDiffers, overlayLabelsAgree, overlayDuplicate, recreatedLabelsAgree, the re-created match's label rule and #454's menu decision, beside a frozen copy of main's own functions over main's encoding: the head's verdict is main's or a refusal. Sminos-Session: cursor235#b93055dd (cua on macbook)
…exceptions and oracle (refs #519) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ose no target (refs #519) Ruling 1151, the convergence stop. StalePoint.swift returns to main's (0d19fdf) code for every consumer that chooses a target: #298's relabel, #443's controlDiffers, #431's twin search, #296's and #305's re-created match, #433's candidate loop and #442's named candidate. The 1147 refinements, the added provenance, recreatedLabelVerified and the new refusal sentences go; they read a non-text slot as absent and a value raw, as main did. Kept: ElementData.nonText (CFGetTypeID only), recorded apart as labelsNonText; the strict reads (ScreenshotNode.strictLabel, StalePointReads.readStrictLabel, stalePointStrictLabelRead) with the classified value read; and the consumers that refuse the target already chosen: #453's overlayLabelsAgree and overlayDuplicate, #454's titleUnread. Sminos-Session: cursor235#b93055dd (cua on macbook)
…get (refs #519) StalePointTests returns to main's, flipped assertions included. New: NonTextLabelSlotTests (decoder, record, strict and classified reads); #453's and #454's runs through target selection, head against main's encoding, the decision main's or a refusal naming main's target; a row whose value now classifies closed. The oracle checks the reverted consumers equal main exactly and the kept ones only add refusals, main's relabel copy with its editedInPlace exemption. Sminos-Session: cursor235#b93055dd (cua on macbook)
Ruling 1152. stalePointClassifiedValueRead could map a batch's kCFNull for an unsupported AXValue to .null where main's single read answered .text(nil), letting #453 press where main refused. #453's strict read goes back to main's single raw read for every part, AXValue included; it differs from main only in answering .nonText for a value that is no text. The classified read, its closed-value refusal and their tests move to #520. The oracle drops its closed-value slot and says it compares logical slots only. Sminos-Session: cursor235#b93055dd (cua on macbook)
…and the identical-function check (refs #519) 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 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.
Closes #519.
What changes
When a label slot (AXTitle, AXDescription, or an AXStaticText's AXValue) holds a non-text value such as a CFNumber, the macOS engine's observation decoder used to record it as known absent. The non-text value then compared equal to an absent live label (nil == nil), and #453's overlay row check could press. After this PR such a slot is non-text. It is kept apart from absent, and the checks that refuse an already-chosen target treat it as unknown.
Fetch.swift):ElementData.nonTextis classified byCFGetTypeIDalone, so it never decodes or bounds the contents. It is recorded as a separatelabelsNonTextset onScreenshotNode.StalePoint.swift):strictLabel/readStrictLabel/stalePointStrictLabelReadreturn.nonTextfor a non-text value. In every other case they answer exactly as main'sstalePointLabelRead, from the same single rawcopyAttribute.overlayLabelsAgree: a part that is non-text then or now disagrees, so the row is refused.overlayDuplicate: an acting node with a non-text part is not a repeat, so the row refusesactionableDescendant.RecordedMenuItem.titleUnread: an item whose recorded title was failed, null or non-text refusesrelabelled.Scope (rulings 1146, 1147, 1150, 1151, 1152)
The invariant is monotonicity: #519 may only turn a main verdict into a refusal. It never changes which target is chosen.
The wider version, which applied three-valued labels to the candidate-selection consumers, reversed targets twice in review, and design's pre-committed stop narrowed it. Every function outside the kept set is byte-identical to main 0d19fdf:
relabelledLabel,controlDiffers,recreatedLabelsAgree,recreatedHandle,underlyingRefusal,inertLayerVerdict,stalePointLabelsAgree,stalePointLabelRead,stalePointLabelPair, and the #433/#442 candidate loops. This was checked with a per-function diff and whole-function hashes.Follow-ups:
Tests
NonTextLabelSlotTests: the decoder, the record and the strict read.OverlayClickTests: every overlay scene, with a non-text part in each position of the row or its neighbour. The head's verdict is either main's or a refusal of the row main chose. Plus the macOS engine: deliver a click on an app's overlay window (Chrome's omnibox popup) to that window instead of refusing it #453 regression: a numeric title then, absent now, the same description, which refuseslabelChanged.MenuItemPointTests: the guard's verdict is identical under both encodings, and macOS engine: a click on a pop-up menu's item (Chrome <select>, TextEdit font menu) answers ok but the item is never taken #454 either delivers to main's item or refuses it.LabelMonotonicityTests: a frozen copy of main's label functions, including theeditedInPlaceexemption, run as an oracle over logical label slots (the exact coverage is in the Decision Log). For the kept consumers the verdict is main's or a refusal; for the reverted ones it equals main's.swift test: 1726 run, 1 skipped, 0 failures. The Xcode 27.2 release build passes.Review trail
reviewer-high, four rounds:
Per 1152, the final head is proven by the identical-function diff, the tests and the release build in place of a fifth review.
Plugin 0.29.11.
Sminos-Session: cursor235#b93055dd (cua on macbook)