Repository navigation
macOS engine: type_text answers ok with a note on a non-text target (#587), and a failed read-back read is retried and diagnosed (#590) - #601
Merged
Conversation
…ith a note; a failed read is read again (refs #587) #587 (ruling 1219): a focused element that is not a text field (Finder's type-select in a list or outline) threw typeUnconfirmed (notTextField) after its keys landed; the vendor answers ok. Both routes now answer success with a note that the text could not be read back and the app should be observed before relying on it or typing it again; the record keeps confirmed: false and the reason. noFocusedElement takes the same contract: the vendor's targetForKeyboardEvent answers the app's pid when focusedUIElement is nil, with no error, and posts without reading the element (F §5.7, the pinned helper's 0x1006f645c). A text field's read-back, the password reasons and selectionChanged are unchanged. #590 (ruling 1225): a role, value or range read at the snapshot (settle and wait included), and a role or subrole read in a poll, that answers nothing is read again up to 2 times, 15 ms apart, while its phase has time (the request's time left less one messaging timeout; the poll's budget). Only a failed read is retried; a mismatch never becomes ok. On an unreadable reason the record carries readFailure {phase, read, axError, retries, msSinceLastKey, role, subrole}, never a value; concealed and password records drop the counts and time. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ilure rides as cua/typeReadback (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…try, the record's readFailure, the unretried focus check (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
…failed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…nished with no field; a retry never reads past its first try (refs #587) Ruling 1244 on the review of e54eab4..106d201, with ruling 1242's narrowing. - P1-1: a concealed request with no field stays typeUnconfirmed and its remedy never advises a screenshot or getAXState(), whatever the search found. - P1-2: the lookup has three outcomes: a field, .noField (the walk finished with none, and the marker route, when it ran, reached the web area), or nil, indeterminate, which throws as before. The walk answers ReadbackWalkOutcome; the app's own answer of no focus is never enough (background Safari answers so over a focused field). - P1-3: a value or range retry, in the snapshot and its settle, runs only after the role and subrole are read again and still classify the field. - P1-4: a poll's role read naming AXSecureTextField or another role ends the check whatever its subrole read answers. - P2-5: a field the lookup took for a password field is classified by one role read, never retried. - P2-6: no field under select_text's range is selectionChanged, nothing typed or pasted. - P2-7: the keyed route's retries and polls are bounded by the request's deadline. - P2-8: readFailure keeps the role and subrole last read successfully. Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…the invariants and the record (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
… (refs #587) The plugin manifests take main's descriptions and 0.30.0; the next commit bumps to 0.30.1. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ailed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…rows as before; a secret's answers never advise observing (refs #587) Ruling 1247 on the review of 106d201..d51ae68. - noFocusedElement throws typeUnconfirmed exactly as before #587 (a declared limit): .noField, the marker's .noField and ReadbackWalkOutcome are removed, the walk and marker route answer as before except as below. - c: a field the walk or marker found by a text-entry role (ReadbackFound.field's role) that the snapshot reads as another role answers fieldChanged, never notTextField. - b: a password field the marker classified but whose focus or place under the web area it cannot show closes as a password field's (fieldUnreadable, secure), whatever the walk finds. - d: a concealed request's typeUnconfirmed, every reason, ends with a remedy that names no observation (readbackConcealedRemedy, or readbackConcealedMayShowRemedy). - e: under select_text's range the nil lookup (and a closed password claim) answers selectionChanged before any key or ⌘V. - h: after a retry's re-classification, the retried read starts only while the bound allows. Sminos-Session: cursor235#b93055dd (cua on macbook)
…g the app (refs #587) Ruling 1247 (d). secretMayShow classifies 'passwordField' (as before) or 'unplaced' (notTextField, noFocusedElement, fieldChanged and every other reason posted without confirmation); every sky failure that may have entered part of the secret carries a warning of that kind, worded without a screenshot or getAXState; a userChanged intervention once entered asks the user to check where it went instead of re-querying. The test runs every branch after the first key. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ment a declared limit, the secret rule (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
…t's range comes before it (refs #587) Ruling 1249 on the review of ef383ad..75481fd. - (1) The role the walk or the marker route found a field by is compared with the snapshot's before anything else is read: a password field's role or subrole answers becameSecure, any other difference fieldChanged; no value, range or length is read. A field the lookup took for a password field keeps its own check (noLongerSecure); the application's focus is not compared. - (2) Under a pending select_text range, any outcome that cannot hold it (a changed role, a non-text or secure non-field element, the nil lookup, a closed claim) answers selectionChanged before any key or ⌘V. Sminos-Session: cursor235#b93055dd (cua on macbook)
…till advise get_app_state after a secret's first key (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ion gate (refs #587) Ruling 1250 on the review of 75481fd..c96a7cc, replacing the case-by-case guards. - R1: a field's classification is ReadbackIdentity (role, subrole if read, open|secure). The lookup's is the baseline when it classified the field (the walk's role, the marker's role and subrole), else the snapshot's first read. Every later classification (the snapshot's first read, #359's wait, the settle, poll and checkpoint, every retry's re-classification, each length batch) goes through readbackClassify alone; any difference ends the read-back: becameSecure, noLongerSecure, else fieldChanged. Only components the baseline read are compared; the walk's first subrole is adopted. - R2: under a pending select_text range, readbackSnapshot lets only a verified-range .expect through; every other answer is selectionChanged there, before any key or ⌘V. - Deleted: wave 3's already-classified skip and foundRole comparison, the per-path selection checks of waves 2 and 3, fieldClosed's own role branches, readbackFieldClosed, readbackLength's own classification checks, and ReadbackFound.field's password and role (now identity). - The proof: a table of 16 classification points x their transitions x selection pending (196 keyed runs; 49 on the paste route), asserting outcome, keys and ⌘V; round 4's three cases by name. Sminos-Session: cursor235#b93055dd (cua on macbook)
…R1; AXGroup's unread subrole is open at the final batch (refs #587) Ruling 1254 on the review of c96a7cc..4b07ce0. - P1-1: stillFocused now answers ReadbackRefocus, the focus and the role the walk read of the field it found again; that role goes through readbackClassify (a role-only reading), so a field that turned AXSecureTextField or another role between the last value read and the check ends the read-back, and a checkpointed Return is not posted. Two table rows. - P2-2: the concealed final batch's failed-subrole exception applies only where the role leaves security open: not AXSecureTextField, not neverSecureRoles (#525). AXGroup with an unread subrole answers noLongerSecure again; AXGroup still secure by a read subrole, fieldChanged. Sminos-Session: cursor235#b93055dd (cua on macbook)
…oes down the length path (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
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. |
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…ne fix, main's M6b, #596, #599) into feat/117-m5; engineVersion 0.3.1 over both sides' engine changes (refs #506) Conflicts, each combined so both sides' behaviour survives: - native/engine/Sources/Engine/Version.swift: feat's 0.3.0 (M5) and the fix's 0.2.2 (#587) become 0.3.1, above both. Its readers (client.mjs MIN_ENGINE_VERSION 0.1.0, doctor, engine-bundle, engine-version-check) read it or compare against 0.1.0; nothing pinned either side's string, so none changed. - src/runtime/launch.mjs nativeEngineFor: feat's R4 minimum at selection (pending, minimumVersion = MIN_MACOS_ENGINE_VERSION, the outdated remedy and its comment) kept; M6b's signature taken (no arch or vendor, Linux has no vendor engine; engineSetting gets platform). - src/services/secret-input.mjs userIntervened: #212's interruption account (interruptionOutcome, `interruption` sets entered and the outcome text) on main's placement `mayShow` ('unplaced' default, 'passwordField'), with INTERVENED.userChangedEntered and MAY_SHOW.passwordField only once entered. sky.mjs had auto-merged to that call. Feat's #212 test asserted the getAXState re-query beside an account that says the secret may be in; it now expects the user's check (ruling 1247 d), and the 1247 (d) sweep gains two branches that carry an account. - README.md CUA_NATIVE_ENGINE: main's Linux text (vendor retired, engine_retired, 0.4.5 or later) with feat's macOS minimum sentence (0.1.0, engine_outdated and its remedy). - tech-debt-tracker.md: both sides' entries. Sminos-Session: cursor235#b93055dd (cua on macbook)
This was referenced Nov 28, 2026
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
enabled auto-merge (squash)
November 28, 2026 03:39
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
….3.1, 7 cells, no base; PASS) kept in the repo, with sha256 digests (refs #506) Ruling 1248's proof run, which gates #601. The tree holds the second judge attempt's sitting/, its top-level setup files, and every run-job artifact: the three judged (run-1-1, run-2-2, run-3-1) and run-2-1, whose setup stopped on a locked TCC.db. All are byte for byte as downloaded on 2026-11-28 (diff -r identical), logs force-added past the *.log ignore. digests.sha256 covers all 8 result.json files. The README links only run 46095539139. Privacy scan of the committed tree (61 files: the artifacts, README.md and digests.sha256), with grep -E over every file: - /Users/[A-Za-z0-9._-]+ -> only /Users/runner (188) - /home/ -> 0 - e-mail addresses -> 0 - \.ts\.net|tailscale|tailnet -> 0 - MacBook|Mac mini|\.local -> 4, the runner's /Users/runner/.local/share/cua-hosted/runner.json in each setup.json - IPv4 -> 0 - ghp_|gho_|ghs_|github_pat_|sk-…|xox[abpr]-|AKIA…|eyJ… JWT -> 0 - BEGIN … PRIVATE KEY -> 0 - the owner's name -> 0 - ssfskim -> only the public bundle ids io.github.ssfskim.cua.{engine,fixture.electron,key-route-tap} and the repository's own URL - runs of 40+ non-hex characters -> only runner paths, cell ids, vendor bundle paths and spec or evidence paths Nothing was redacted, so the digests are the original artifacts'. Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…) (#609) api/browser-playwrightlocator/click's locator-contract-diagnostics-sampling clicked with timeoutMs 1000, a third of every other cell's budget, on the suite's densest page (251 matches) in a scratch tab opened inactive. It was the cell that failed most often on hosted Chrome 158: in 5 of the 9 failing parity-browser jobs, among them both of #601's runs, its first resolution's Runtime.evaluate ran past 1000 ms before the violation came back. A strict-mode violation is thrown on the first resolution, so the budget does not shape the answer; 10000 ms is the host's own bound on a CDP command. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…tive no-input record (#602) (#607) * macOS engine 0.2.2: type_text with no field to read back answers ok with a note; a failed read is read again (refs #587) #587 (ruling 1219): a focused element that is not a text field (Finder's type-select in a list or outline) threw typeUnconfirmed (notTextField) after its keys landed; the vendor answers ok. Both routes now answer success with a note that the text could not be read back and the app should be observed before relying on it or typing it again; the record keeps confirmed: false and the reason. noFocusedElement takes the same contract: the vendor's targetForKeyboardEvent answers the app's pid when focusedUIElement is nil, with no error, and posts without reading the element (F §5.7, the pinned helper's 0x1006f645c). A text field's read-back, the password reasons and selectionChanged are unchanged. #590 (ruling 1225): a role, value or range read at the snapshot (settle and wait included), and a role or subrole read in a poll, that answers nothing is read again up to 2 times, 15 ms apart, while its phase has time (the request's time left less one messaging timeout; the poll's budget). Only a failed read is retried; a mismatch never becomes ok. On an unreadable reason the record carries readFailure {phase, read, axError, retries, msSinceLastKey, role, subrole}, never a value; concealed and password records drop the counts and time. Sminos-Session: cursor235#b93055dd (cua on macbook) * service: the no-field note reaches the tool result's text, and readFailure rides as cua/typeReadback (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * Own native engine spec and tech debt: #587 and #590's Decision Log entry, the record's readFailure, the unretried focus check (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook) * Plugin 0.29.23: type_text with no field to read back answers ok, and failed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * macOS engine: ok-with-note only for a literal request whose search finished with no field; a retry never reads past its first try (refs #587) Ruling 1244 on the review of e54eab4..106d201, with ruling 1242's narrowing. - P1-1: a concealed request with no field stays typeUnconfirmed and its remedy never advises a screenshot or getAXState(), whatever the search found. - P1-2: the lookup has three outcomes: a field, .noField (the walk finished with none, and the marker route, when it ran, reached the web area), or nil, indeterminate, which throws as before. The walk answers ReadbackWalkOutcome; the app's own answer of no focus is never enough (background Safari answers so over a focused field). - P1-3: a value or range retry, in the snapshot and its settle, runs only after the role and subrole are read again and still classify the field. - P1-4: a poll's role read naming AXSecureTextField or another role ends the check whatever its subrole read answers. - P2-5: a field the lookup took for a password field is classified by one role read, never retried. - P2-6: no field under select_text's range is selectionChanged, nothing typed or pasted. - P2-7: the keyed route's retries and polls are bounded by the request's deadline. - P2-8: readFailure keeps the role and subrole last read successfully. Sminos-Session: cursor235#b93055dd (cua on macbook) * service: the no-field note's comment follows ruling 1242 (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * Own native engine spec: rulings 1242 and 1244, the three-way lookup, the invariants and the record (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook) * Plugin 0.30.1: type_text with no field to read back answers ok, and failed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * macOS engine: ok-with-note is notTextField alone; noFocusedElement throws as before; a secret's answers never advise observing (refs #587) Ruling 1247 on the review of 106d201..d51ae68. - noFocusedElement throws typeUnconfirmed exactly as before #587 (a declared limit): .noField, the marker's .noField and ReadbackWalkOutcome are removed, the walk and marker route answer as before except as below. - c: a field the walk or marker found by a text-entry role (ReadbackFound.field's role) that the snapshot reads as another role answers fieldChanged, never notTextField. - b: a password field the marker classified but whose focus or place under the web area it cannot show closes as a password field's (fieldUnreadable, secure), whatever the walk finds. - d: a concealed request's typeUnconfirmed, every reason, ends with a remedy that names no observation (readbackConcealedRemedy, or readbackConcealedMayShowRemedy). - e: under select_text's range the nil lookup (and a closed password claim) answers selectionChanged before any key or ⌘V. - h: after a retry's re-classification, the retried read starts only while the bound allows. Sminos-Session: cursor235#b93055dd (cua on macbook) * secret wrapper: no answer after a secret's first key advises observing the app (refs #587) Ruling 1247 (d). secretMayShow classifies 'passwordField' (as before) or 'unplaced' (notTextField, noFocusedElement, fieldChanged and every other reason posted without confirmation); every sky failure that may have entered part of the secret carries a warning of that kind, worded without a screenshot or getAXState; a userChanged intervention once entered asks the user to check where it went instead of re-querying. The test runs every branch after the first key. Sminos-Session: cursor235#b93055dd (cua on macbook) * Own native engine spec: ruling 1247, notTextField alone, noFocusedElement a declared limit, the secret rule (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook) * macOS engine: a found field is held to its role first, and select_text's range comes before it (refs #587) Ruling 1249 on the review of ef383ad..75481fd. - (1) The role the walk or the marker route found a field by is compared with the snapshot's before anything else is read: a password field's role or subrole answers becameSecure, any other difference fieldChanged; no value, range or length is read. A field the lookup took for a password field keeps its own check (noLongerSecure); the application's focus is not compared. - (2) Under a pending select_text range, any outcome that cannot hold it (a changed role, a non-text or secure non-field element, the nil lookup, a closed claim) answers selectionChanged before any key or ⌘V. Sminos-Session: cursor235#b93055dd (cua on macbook) * tech-debt: the native engine's input-source and intervention errors still advise get_app_state after a secret's first key (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * macOS engine: one classification identity, one comparison, one selection gate (refs #587) Ruling 1250 on the review of 75481fd..c96a7cc, replacing the case-by-case guards. - R1: a field's classification is ReadbackIdentity (role, subrole if read, open|secure). The lookup's is the baseline when it classified the field (the walk's role, the marker's role and subrole), else the snapshot's first read. Every later classification (the snapshot's first read, #359's wait, the settle, poll and checkpoint, every retry's re-classification, each length batch) goes through readbackClassify alone; any difference ends the read-back: becameSecure, noLongerSecure, else fieldChanged. Only components the baseline read are compared; the walk's first subrole is adopted. - R2: under a pending select_text range, readbackSnapshot lets only a verified-range .expect through; every other answer is selectionChanged there, before any key or ⌘V. - Deleted: wave 3's already-classified skip and foundRole comparison, the per-path selection checks of waves 2 and 3, fieldClosed's own role branches, readbackFieldClosed, readbackLength's own classification checks, and ReadbackFound.field's password and role (now identity). - The proof: a table of 16 classification points x their transitions x selection pending (196 keyed runs; 49 on the paste route), asserting outcome, keys and ⌘V; round 4's three cases by name. Sminos-Session: cursor235#b93055dd (cua on macbook) * macOS engine: the walk's focus check after the poll is classified by R1; AXGroup's unread subrole is open at the final batch (refs #587) Ruling 1254 on the review of c96a7cc..4b07ce0. - P1-1: stillFocused now answers ReadbackRefocus, the focus and the role the walk read of the field it found again; that role goes through readbackClassify (a role-only reading), so a field that turned AXSecureTextField or another role between the last value read and the check ends the read-back, and a checkpointed Return is not posted. Two table rows. - P2-2: the concealed final batch's failed-subrole exception applies only where the role leaves security open: not AXSecureTextField, not neverSecureRoles (#525). AXGroup with an unread subrole answers noLongerSecure again; AXGroup still secure by a read subrole, fieldChanged. Sminos-Session: cursor235#b93055dd (cua on macbook) * tech-debt: a walk-claimed open field whose first subrole read fails goes down the length path (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * plugin 0.30.2: #599 took 0.30.1 (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook) * engine 0.2.3: record beforeInput where nothing of the input was posted (refs #602) The input meta gains `beforeInput: true`, sent only where the engine knows the request stopped before any key, ⌘V or Return, or value write went out: keyText before its first key (a stop there is userIntervened as one between keys is), the keyed read-back's selection gate, runPaste before its first post, pasteOperation before runPaste, setElementValue before the write, each of type_text, paste and set_value before its stretch begins, and the request's prologue. Ruling 1260: never inferred from a null startedAt. Sminos-Session: cursor235#b93055dd (cua on macbook) * Secret wrapper: "nothing was entered" only on the engine's beforeInput record; plugin 0.30.3 (refs #602) secretUnentered replaces the startedAt === null inference for every error: the record, and no input or value effect in an interruption account when one is present. startedAt null alone, an unparsed meta and the vendor's or an older engine's reply answer "may have been entered", with no advice to observe the app (ruling 1247 (d), whose sweep gains the new cases). Sminos-Session: cursor235#b93055dd (cua on macbook) * engine: InputMeta.posting's comment says the wrapper no longer reads startedAt (refs #602) Sminos-Session: cursor235#b93055dd (cua on macbook) * engine: an input request past its deadline at receipt records beforeInput (refs #602) The deadline still answers first; an input method's refusal there now carries the input meta with `beforeInput: true`, since nothing was dispatched (review of 0c39038..d87702f, P2-5; ruling 1268). Sminos-Session: cursor235#b93055dd (cua on macbook) * Secret wrapper: "nothing entered" needs cua's engine selected, the record, a known phase and preparation-only effects (refs #602) Ruling 1268, the review of 0c39038..d87702f: still interacting (P1-1) and concealedInputUnavailable (P1-2) rest on the record like every other branch, an interruption account counts only with a recognized phase and effects from the engine's preparation-only list (P1-3), and the record is read only when CUA_SKY_SERVICE names cua's own engine service (P2-4). Everything else is "may have been entered", with no observe or retry advice. Sminos-Session: cursor235#b93055dd (cua on macbook) * tech-debt: the engine-trust check and the backend import can resolve different targets (refs #602) Sminos-Session: cursor235#b93055dd (cua on macbook) * plugin 0.30.4: #601 took 0.30.3 (refs #602) Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…600-paste-transport (refs #600) #601 and #607 were squash-merged: in every conflicted engine file main's content is this branch's base (0a65832), so each resolves to this branch's side. The plugin manifests take main's 0.30.4; the next commit bumps to 0.30.5. Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…) into feat/117-m5; engineVersion 0.3.2 over both sides' engine changes (refs #506) Conflicts, each combined so both sides' behaviour survives: - native/engine/Sources/Engine/Version.swift: main's 0.2.3 (#602) and feat's 0.3.1 become 0.3.2, above both. Nothing pins either string. - native/engine/Sources/Engine/Input.swift: InputMeta keeps feat's concealedRefusal (ruling 1128) and gains main's beforeInput (#602), both on the wire; posting's comment says both that "nothing entered" is read only from beforeInput and that a post is noted as its effect (#212). keyText takes main's do/catch that marks beforeInput when anything throws before the first key, around feat's count of a unit at its key down (#186). So feat's in-flight guard stopping keyText before its first key (userChanged, phase inFlight, #212's account) now carries beforeInput: true beside the account; withMeta writes both, and Engine.execute's restatement keeps it. - native/engine/Tests/EngineTests/TypeReadbackTests.swift: main's side (its beforeInput assertion); the file now equals main's. Every test function main changed since the base is verbatim in the merge. - src/services/secret-input.mjs: main's secretUnentered, PREPARATION_EFFECTS and its intervention tables. userIntervened decides entered = !unentered only (ruling 1268); feat's #212 account (interruptionOutcome, now interruptionAccount) only describes the phase and the effects, after main's sentence ("...; nothing was entered; it was stopped part-way, and what may have taken effect: ...; nothing was undone"). feat's ENTERING_EFFECTS test of the effects is gone from it. - src/services/sky.mjs: both comments, main's cuaEngine parameter beside feat's errorName; unentered is main's (cuaEngine and secretUnentered); concealedInputUnavailable needs the record (main) and names feat's concealedRefusal cause (1128); the account is read only from cua's engine, as the record is. - test/services-sky.test.mjs: main's tests, assertions unchanged; the 1247 (d) sweep keeps feat's two account branches beside main's. Feat's #212 test now runs each account with and without the record (the record decides; an unknown effect and an unread phase may have entered; the vendor's account is not repeated), and its ruling 1128 test no longer expects a cause from a refusal with no meta (main's P1-2 makes that "may have been entered"). - .claude-plugin/plugin.json, marketplace.json: main's 0.30.4; the fields are otherwise equal. - tech-debt-tracker.md: both sides' entries; #607 resolves none of feat's. Also, not a conflict: feat's #212 test in test/services-engine-service.test.mjs gives its set_value stop the engine's record (both phases stop before the write) and expects the new order of the sentence. Sminos-Session: cursor235#b93055dd (cua on macbook)
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 #587. Closes #590.
What changes
Two fixes to type_text's read-back in cua's macOS engine (
native/engine/), on both the keyed route and the paste route. They come from ruling 1236 and were narrowed over two review rounds (rulings 1244 and 1247).The design: two structural rules, each decided in one place (ruling 1250)
R1, classification identity.
ReadbackIdentity: its role, its subrole when one was read, and whether it is open or secure.readbackClassify:focusedEffectReading, which letsrunPasteskip the checkpoint before a Return). It classifies the field for paste's effect, not for the read-back. It is the same on main and is filed as macOS engine: type_text's paste route posts a Return across a classification change its effect reading saw #600 (P2, blocks #117 M5: gates, minimum engine version, hosted matrix and onboarding, the default-engine flip (T8–T14) #506).becameSecure;noLongerSecure;fieldChanged.fieldUnreadable(roleUnreadableat the snapshot's first role read). A password field's failed subrole reads on as one, except where the concealed final batch decides the reason, and there only where the role leaves security indeterminate: AXSecureTextField is secure, and AXGroup (neverSecureRoles) is open, whatever the subrole did.R2, the selection gate at the snapshot's exit. Under a pending select_text range,
readbackSnapshotlets exactly one outcome through: a field whose range it read and verified as select_text's (.expect). Every other outcome becomesselectionChangedthere, before delivery, on the keyed and paste routes alike: a refusal, a changed classification, a password field, a non-text element, the nil lookup, or a closed claim. No inner path decides it.Three further rules hold throughout:
#587: a focused element that is not a text field
A type_text into a focused element that isn't a text field used to throw
typeUnconfirmed(notTextField) after its keys had landed. Finder type-select in a list or outline is the common case (C-5finder/…/typeText.typeSelect, and C-6's background cells @textedit and @electron). The vendor answers ok. A model that got the error tended to retry, and a retried type-select can select a different row.When the application's own
AXFocusedUIElementnames an element whose role is not a text field's, a literal request now answers ok, with a note:confirmed: falseandreason: "notTextField".note, after macOS engine: keys never reach remote-view panels (Open/Save): keyboardTarget uses public AXUIElementGetPid; vendor posts to the actual pid #582's cut-off notice when there is one, and reaches the tool result's text (NOTED_METHODS, 500 characters).fieldChanged(orbecameSecure/noLongerSecure), nevernotTextField.typeUnconfirmed.selectionChanged).Unchanged:
typeUnconfirmed;Declared limit: noFocusedElement (#597). cua won't vouch for typing it can't place, so
noFocusedElementstill throwstypeUnconfirmedexactly as before #587. The vendor answers ok here:targetForKeyboardEvent(0x1006f645c) falls back to the app's pid whenfocusedUIElementis nil (0x1006f65cc);performKeyboardActionposts with no read-back;docs/evidence/2026-11-17-type-readback/L108–118, 80/80 in background Safari.Two review rounds showed that "no field" can't be certified: the walk's unfinished answers, the marker route's unvouched claims, and a background app's own "no focus" all read alike. The limit is filed as its own ticket (enhancement, P3, parent #117). The one change on this path: under select_text's range, R2 answers
selectionChangedbefore any key or ⌘V.The marker route's password claims: a password field the marker route classified, but whose focus or place under the web area it can't show, now stops the read-back as a password field's (
fieldUnreadable,secure), whatever the walk would find.Secrets: no observation advice after the first key
In the engine: a concealed request's
typeUnconfirmed, for every reason, ends with:A password field that may now show the secret gets a different ending instead:
In the service's wrapper (
src/services/secret-input.mjs), which withholds the engine's text:secretMayShowclassifies a failure aspasswordField(as before) orunplaced.unplacedcovers notTextField, noFocusedElement, fieldChanged and every other reason posted without confirmation.#590: a read that fails is read again
type_text sometimes threw "could not be read back" (
roleUnreadable,fieldUnreadable,valueUnreadable,rangeUnreadable) after the text landed exactly. This was seen in C-6textedit/latin/typeText.latinand in split rerun 46052931439'sconcurrent.sheet@electron.Which reads:
The bound:
context.deadline); in a poll, the poll's own budget.I1 in practice:
Only a failed read is retried. A mismatch never becomes ok.
Diagnostics. A typeUnconfirmed whose reason came from a failed read carries
typeReadback.readFailure:roleandsubroleare the values as last read successfully.readsRetriedcounts reads that failed and then answered.Versions
engineVersion 0.2.1 → 0.2.2; plugin 0.30.3 (#594 took 0.30.0, #599 took 0.30.1 and #605 took 0.30.2).
Verification
testAConcealedRequestsUnconfirmedAnswersNeverAdviseObservingTheApp.testARetryClassifiesTheFieldAgainFirst.testARoleChangeSeenInAPollIsTheEndWhateverItsSubroleReads.testAPasswordFieldsClassifyingReadIsNeverRetried.testNoFieldUnderSelectTextsRangeTypesNothing, and on the paste routetestTypeTextsPasteRouteIntoANonTextFieldUnderSelectTextsRangePastesNothing.testTheSnapshotsRetryFitsTheRequestsTimeLeft, throughkeyTextReadBack.testAReadThatKeepsFailingIsUnconfirmedWithItsRecord.testNoFocusedElementStillThrows. The odd-reply marker cells throw with no note.TypeReadbackMarkerTests.testAPasswordFieldTheRouteCannotVouchForStopsTheReadBack.typeUnconfirmedreason, concealed, intestAConcealedRequestsUnconfirmedAnswersNeverAdviseObservingTheApp;services-sky"ruling 1247 (d)": each read-back reason, userIntervened (changed, still interacting, other), the deadline, inputSourceChanged, eventCreationFailed, a transport timeout, a plain error, and the vendor with no meta. Each asserts that "screenshot" and "getAXState" are absent.testNoFieldUnderSelectTextsRangeTypesNothing(0 keys), and the paste-route test with no focused element (no ⌘V, pasteboard untouched).testARetryChecksItsBoundAgainAfterTheClassification, where the classification reads take 30 ms each.finder/frontmost/typeText.typeSelect(and C-6's background typeSelect cells) must pass on cua in the next sitting, with the note recorded. The TextEdittypeText.latincell must pass, or areadFailuremust say which read failed. Results: PASS. Proof run 46095539139 at feat/117-m5's 3f3792d, which merges this branch with feat's M5 engine (engine 0.3.1 there). It had 7 cells, no base, and 3 complete vendor/cua pairs each, one VM per pair. Its judge (attempt 2) gave PASS, 3/0. Run 2's attempt 1 stopped in setup on a locked TCC.db, an infrastructure stop, and its rerun passed.finder/frontmost/typeText.typeSelectandfinder/background/typeText.typeSelect@texteditand@electron: equal, 3/3 on both engines. On cua the row was found and selected with notypeUnconfirmed; these blocked as worse on cua in sitting C.textedit/latin/typeText.latin: equal, 3/3. On cua the text was exact, 44 of 44 characters, with noreadFailure.textedit/concurrent.sheet@electron,openPanel/background/getAXState.panel@finderandclick.cancel@finder: equal, 3/3.Reviews
reviewer-high round 1 (e54eab4..106d201): incorrect, 8 findings. Fixed under ruling 1244 in 106d201..d51ae68.
Merges: 93ea949 merges main 1610082 (cua 0.30.0) and ef383ad bumps the plugin to 0.30.1; c1e1d8f merges #595: accept-lib's tree-snapshot test pins its directory's mtime (ext4's coarse clock) #596; 2ba9603 merges linux-engine 0.4.6: release records say what the reply did, and the option (c) live test holds under load (#580) #599 (cua 0.30.1, no engine change) and 0c39038 bumps the plugin to 0.30.2; a merge of #598: launch_app on Linux answers when gio exits, with the launched app's output on /dev/null #605 and 6ddf6e9 bump it to 0.30.3 (no engine change).
reviewer-high round 2 (106d201..d51ae68): incorrect.
noFocusedElement. That made findings a, f and g moot: the code they concerned (thenoFocusedElementok-with-note path,.noFieldand the walk's three-way outcome) is removed.reviewer-high round 3 (ef383ad..75481fd): incorrect, 2 P1s in fix c's role and selection guard. Fixed under ruling 1249 in 75481fd..c96a7cc (6008016 engine, c96a7cc tech-debt):
becameSecure; any other difference answersfieldChanged. No value, range or length is read. A field the lookup took for a password field keeps its ownnoLongerSecurecheck. (Superseded by R1 in round 4; that test is replaced by the table.)selectionChangedbefore any key or ⌘V. (Superseded by R2 in round 4; the keyed test is replaced by the table.PasteActivationTests.testTypeTextsPasteRouteIntoANonTextFieldUnderSelectTextsRangePastesNothingstays.)reviewer-high round 4 (75481fd..c96a7cc): incorrect, 3 P1s. Each was a case next to the one the previous patch covered:
Ruling 1250 replaced the cases with R1 and R2 in c96a7cc..4b07ce0. Deleted:
foundRolecomparison;ReadbackRetry.fieldClosed's own role and secure-role branches;readbackFieldClosed;readbackLength's own noLongerSecure and fieldChanged checks;ReadbackFound.field'spasswordandrole, now oneidentity.The proof is
testEveryClassificationPointHoldsTheFieldToItsBaseline: 18 points (11 text-field, 7 password-field) × 7 transitions × selection pending or not, 252 runs (after round 5). Each run asserts the outcome and the keys posted, and that the change was reached.PasteActivationTests.testTypeTextsPasteRouteHoldsTheSnapshotsClassificationAndTheRangeruns the snapshot's points on the paste route, 49 runs, asserting the outcome, the ⌘V count and the pasteboard. The three round-4 cases are also named intestRoundFoursCases, andtestTheClassificationComparisontests the function itself.reviewer-high round 5 (c96a7cc..4b07ce0, a fresh reviewer): incorrect. Under ruling 1254, fixed in 4b07ce0..6a4041b (4f93a4e engine, 6a4041b tech-debt):
readbackClassify, so a field that became AXSecureTextField, or another role, between the last value read and the check ends the read-back. A checkpointed Return is not posted. Tests: two rows in the table ("the walk's focus check after the poll" and "… before a Tab"), whose fakestillFocusedreads the field's role, asserting outcome and keys.neverSecureRolesclassifies it. AXGroup still secure by a subrole that was read stays fieldChanged. Tests: two transitions on every password-field row of the table, andtestTheClassificationComparison.reviewer-high round 6 (4b07ce0..6a4041b, bounded to round 5's fixes): correct, no material findings. It judged the walk's missing subrole read acceptable: success confirms the value already read from the same focused element, and no path discards an observed subrole change. Review has converged.
Merged origin/main 0ef5af1 (a test-only change, #595: accept-lib's tree-snapshot test pins its directory's mtime (ext4's coarse clock) #596) as c1e1d8f.
Left, logged
tech-debt-tracker.md: after the poll, the focus check still answers an unknown focus (a failed focus read) asfieldChanged, read once, and it names no failed read.tech-debt-tracker.md: a walk-claimed open field whose first subrole read fails goes down the length path (fails closed; as main).tech-debt-tracker.md: the native engine'sinputSourceChangedand in-flight intervention sentences still advise observing the app after a concealed request's first key. The wrapper withholds them, so no model reaches them through cua.Sminos-Session: cursor235#b93055dd (cua on macbook)