Repository navigation
macOS engine: set_value writes a background Chromium page's field without the pointer and confirms only an exact read-back (#390) - #403
Merged
Conversation
…t the refused focus fallback and reads the value back (refs #390) In a background Chromium or Electron window, set_value on a page text field that needed focus was refused as backgroundClickRefused before any write: focusFieldIfNeeded's AXFocused re-read comes too soon for Chromium, and its fallback click is refused in a web area in shared mode. Such a field (needs focus, inside an AXWebArea, Chromium-family process, route 3, shared mode, no route-4 override) now takes no focus hold and no fallback click: the AXFocused write alone by route 1, the value written, then read back every 5 ms within 1 s. Ok only on an exact read (UTF-16 equal, or a strict prefix at Chromium's 10,000 cap). A rejected write is refused as before; an accepted one not read back as written, a concealed value or a password field (never read) answer valueUnconfirmed. Every other field, app, route and mode keeps main's preparation. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d read back (refs #390) agent-cursor.md's fourth paragraph gains a closing sentence: such a setValue succeeds only once the field reads the new value, else valueUnconfirmed, always so for a secret or a password field. The docs oracle and the core-documentation test carry it byte for byte; PROVENANCE.md and the surface inventory's "Table 3 addition (2026-11-17, #390)" record it. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ocus (refs #390) #359's wait before set_value's write and its watch after it stay as they are around #390's route: the read-back runs after the accepted write and before the watch, a refused write runs neither, and after the re-fetch the watch's drift answers before #390's unconfirmed answer. #390's copy of the cut-prefix rule goes; it uses #359's writtenValueRead. The docs keep #359's sentence after the valueUnconfirmed one and close the paragraph with #390's. Sminos-Session: cursor235#b93055dd (cua on macbook)
…alue never reads a secret's or a password field's value (refs #390) The review of c236f26 (two P2s). First, the unfocused read-back took #359's rule, under which a 10,000-character prefix at Chromium's cap confirmed a longer write; here the read is the only proof the write landed, so only an exact read confirms, and a cut read answers valueUnconfirmed (possiblyTruncated). #359's watch keeps its rule. Second, main read AXValue on every route of a sensitive set_value: the token's re-reads before the write, the coercion and the .ignoringValue re-check, whose walk read every element's value. For a concealed request or a password field (recorded, or live once resolved) those resolutions now take a source that requests no AXValue, the coercion takes the string type unread, and the renewed identity keeps no value, its match leaving the value out so the token still resolves later. Sminos-Session: cursor235#b93055dd (cua on macbook)
…t_value's token re-reads never read AXValue (refs #390) The review of 2532a1b (two P2s). A write of exactly 10,000 characters read back equal may sit in a field holding more, so any read at the cap now answers valueUnconfirmed (possiblyTruncated), as type_text counts it. The sensitivity was decided ahead of the reads, from the recorded identity and once after the scroll, so a field that turned secure since, or in the focus step, could still be read. Now set_value's resolutions (re-reads, the scroll's, the re-check and its walk) always take the valueless source, the value left out of their match, and the coercion classifies the field (concealed, password, unclassifiable) in its own step, just before its read. Sminos-Session: cursor235#b93055dd (cua on macbook)
…he pointer and confirms only an exact read-back (refs #390) Sminos-Session: cursor235#b93055dd (cua on macbook)
… 60/60 by exact read-back with no pointer, key or raise (refs #390) Sminos-Session: cursor235#b93055dd (cua on macbook)
…r blur event (refs #390) Ruling 1ea561bc:793: the hosted qualification found the field becomes the page's focused element with no focus, focusin, blur or focusout event, so the docs line next to set_value says so. 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. |
SSFSKIM
added a commit
that referenced
this pull request
Nov 18, 2026
…sibility; keep 0.28.11 Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 18, 2026
… plugin 0.28.12 The only conflicts were the plugin version in plugin.json and marketplace.json (main 0.28.11, this branch 0.28.10), resolved to 0.28.12. Main's changes (the macOS engine's set_value without focus, the secrets docs and the surface text) touch no file of this branch. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
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.
What changes
On macOS,
set_valueon a web page's text field in a background Chromium or Electron window was refused withbackgroundClickRefusedbefore anything was written. The refusal came from the field-focus preparation (route 3's click fallback), not from the write: skipping that preparation, the write delivered. So the agent was told it couldn't set a value it could.The fix (
native/engine/Sources/Engine/ValueWithoutFocus.swift):AXFocusedon the field and writes the value. There is no hold, no pointer event, no key and no activation.backgroundClickRefused, as before;valueUnconfirmed;valueUnconfirmed(possiblyTruncated), because a capped read can't show what follows it.{{secret:…}}value or a concealed field is written and always answersvalueUnconfirmed(concealed). Review found that main also read those values on every route, while resolving the element and while choosing how to type. That is fixed everywhere: every set_value element resolution is now valueless (ElementSource.readsValuefalse,ElementIdentity.valueUnread), and the type choice classifies role and subrole within the same step as its single AXValue read (setValueClosed), so a field that turns secure mid-call isn't read.Foreground set_value, Safari (its background route is still posted, route 3), Firefox, and native apps are unchanged.
agent-cursor.md adds two sentences to its fourth paragraph (and the docs oracle and core-documentation test that pin its text follow). The first: in the background, a Chromium page's setValue is set without a click and read back; it succeeds only once the field reads the new value, otherwise it fails with
valueUnconfirmed, as it always does for a secret or a password field. The second (ruling 1ea561bc:793): the field becomes the page's focused element with no focus or blur event, so anything a page does only on focus doesn't happen.Evidence
docs/evidence/2026-11-17-value-without-focus/README.md. The kit is on
probe/390-qual(2f479ec). Everything ran on GitHub-hosted macOS against fix e417be4 and main 290303c, both unmodified, on the same browser per job. Each cell was judged against the page's own DOM value and React state at 0/50/250/1000 ms after the reply. An ok counts as false if any checkpoint disagrees.{{secret:…}}(test store, temp HOME)backgroundClickRefusedwith nothing written. Default-titlebar Electron on main delivers through route 3's pointer fallback, with transient raises in 40/40 (engine meta); the fix delivers there with none.input→ handler →change;document.activeElementmoves to the field, anddocument.hasFocus()stays false.Limits
focusorfocusin. A page that reacts only to focus events (for example, opening an autocomplete on focus) won't see one. agent-cursor.md says so next to set_value.valueUnconfirmed, even when the write landed (15/15 delivered). The live secret cell proves 0 reads on this route's read-back only. Other AXValue reads are covered by source review and the unit tests (SensitiveValueTests). The observation walk still reads a password field's AXValue; that is pre-existing and outside set_value.frontmost not verifiedbefore any engine launch or RPC). It was kept, not rerun.Verification
swift test(native/engine) on e417be4; this head adds only the version bump, the evidence README and one docs sentence: 1,314 tests, 0 failures, 1 skipped (pre-existing).services-engine-*test, 220 tests: 219 pass, 0 fail, 1 skipped (test/services-engine-real.test.mjs"the untrusted engine: …", hosted-only). The doc set and package-contents re-run on this head: 24/24.Plugin 0.28.10.
Closes #390
Sminos-Session: cursor235#b93055dd (cua on macbook)