Skip to content

macOS engine: a non-text label slot is non-text, never known absent (#519) - #523

Merged
SSFSKIM merged 16 commits into
mainfrom
fix/519-nontext-label
Nov 23, 2026
Merged

SSFSKIM merged 16 commits into
mainfrom
fix/519-nontext-label

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 23, 2026

Copy link
Copy Markdown
Owner

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.

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

Review trail

reviewer-high, four rounds:

  1. 0d19fdf..3481810: an introduced Engine: a control relabelled in place (same handle, Save to Delete) passes the stale-point guard #298 relabel press, and the decoder cost. Both fixed.
  2. ..3a8276c: a Stale-point guard keeps a click recorded on a click-through overlay, which lands on a different control under it #433 neighbour promotion, and the AXValue read without classification. Both fixed.
  3. ..3fd27fe: two Stale-point guard keeps a click recorded on a click-through overlay, which lands on a different control under it #433 target reversals, which triggered the convergence stop. The PR was narrowed (1151).
  4. ..158e94c: one P1 in the classified read. The read was removed and moved to macOS engine: a live AXValue is compared and quoted without #405's classification (possible secure-value leak) #520 (1152).

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)

…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)
Brings #501 (#518). screenshotLabelsUnknown keeps both: #501's withheld value
and #519's non-text slots go in labelsUnread.

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)
…), follow-ups #520-#522 (refs #519)

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)
…et on this branch (refs #519)

origin/main is still 0d19fdf at 0.29.10, so .claude-plugin/plugin.json and
marketplace.json keep 0.29.11 (set in 3481810); this commit only marks the
version as the branch's last step.

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

chatgpt-codex-connector Bot commented Nov 23, 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-23T16:43:37.440220Z 6664470 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 82ac93f into main Nov 23, 2026
7 checks passed
@SSFSKIM
SSFSKIM deleted the fix/519-nontext-label branch November 23, 2026 17:01
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.

macOS engine: a non-text label slot at observation is recorded as known absent

1 participant