Skip to content

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
SSFSKIM merged 22 commits into
mainfrom
fix/587-590-typereadback
Nov 28, 2026

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

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.

  • A field's classification is ReadbackIdentity: its role, its subrole when one was read, and whether it is open or secure.
  • The baseline is the lookup's classification when the lookup made one: the walk's (role only) or the marker route's (role and subrole from one reply). Otherwise it is the snapshot's first read.
  • Every classification point in type_text's read-back goes through one function, readbackClassify:
  • Outside R1 until its ticket lands: the paste transport's own effect reading (focusedEffectReading, which lets runPaste skip 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).
  • Any difference ends the read-back:
    • secure now but not before: becameSecure;
    • secure before but not now: noLongerSecure;
    • anything else, including a role-only or subrole-only change while still secure: fieldChanged.
  • Only what the baseline read is compared. A subrole the walk never read, on the same role, becomes the baseline's and decides the secure path as before; it is not a transition.
  • A role that changed is a transition whatever the subrole read answered.
  • A failed read is not a transition. Each point answers it as before: retried within macOS engine: type_text into a text field throws typeUnconfirmed 'could not be read back' after the text landed exactly #590's bound, then fieldUnreadable (roleUnreadable at 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.
  • There is no exception for a field the lookup already classified.

R2, the selection gate at the snapshot's exit. Under a pending select_text range, readbackSnapshot lets exactly one outcome through: a field whose range it read and verified as select_text's (.expect). Every other outcome becomes selectionChanged there, 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:

  • (I1) A retry or fallback never reads more than its first try could. A value or range retry is preceded by R1's re-classification.
  • (I2) A type_text answers ok with a note only for a directly found focused element whose role is not a text field's, and only on a request that is not concealed.
  • (d) Once any part of a secret may have gone in where it can be seen, no answer suggests observing the app: no screenshot and no accessibility state, by name or otherwise.

#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-5 finder/…/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 AXFocusedUIElement names an element whose role is not a text field's, a literal request now answers ok, with a note:

The text was typed, but the focused element is not a text field, so the text could not be read back to confirm it. Observe the app (take a screenshot or call getAXState()) before relying on it or typing it again.

Unchanged:

  • a real text field's read-back and its typeUnconfirmed;
  • every password-field reason.

Declared limit: noFocusedElement (#597). cua won't vouch for typing it can't place, so noFocusedElement still throws typeUnconfirmed exactly as before #587. The vendor answers ok here:

  • its targetForKeyboardEvent (0x1006f645c) falls back to the app's pid when focusedUIElement is nil (0x1006f65cc);
  • performKeyboardAction posts with no read-back;
  • the text does land: 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 selectionChanged before 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:

Because it is a secret and may have gone in where it can be seen, do not capture the screen or read the app's accessibility state to check, and do not type it again; ask the person to check where it went.

A password field that may now show the secret gets a different ending instead:

The field may now show its text: do not capture the screen or read the app's accessibility state; put it right with setValue, and do not type the text again.

In the service's wrapper (src/services/secret-input.mjs), which withholds the engine's text:

  • secretMayShow classifies a failure as passwordField (as before) or unplaced. unplaced covers notTextField, noFocusedElement, fieldChanged and every other reason posted without confirmation.
  • Every failure that may have entered part of the secret carries that kind of warning.
  • A userChanged intervention after a key now asks the user to check where the secret went, instead of re-querying the app.
  • Only refusals that entered nothing keep their old instructions.

#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-6 textedit/latin/typeText.latin and in split rerun 46052931439's concurrent.sheet@electron.

Which reads:

The bound:

  • At most 2 retries, 15 ms apart: the settle's interval.
  • A retry, and its read after the classification before it, starts only while its phase has time: at the snapshot, the request's time left minus one messaging timeout (both routes, from context.deadline); in a poll, the poll's own budget.
  • A read that keeps failing answers at most 230 ms later than before.

I1 in practice:

  • A value or range retry runs only after R1's re-classification. Its read starts only while its bound allows.
  • A field the lookup took for a password field is classified by one role read and never retried.

Only a failed read is retried. A mismatch never becomes ok.

Diagnostics. A typeUnconfirmed whose reason came from a failed read carries typeReadback.readFailure:

{phase: "snapshot"|"poll", read: "role"|"subrole"|"value"|"range", axError, retries, msSinceLastKey?, role?, subrole?}
  • role and subrole are the values as last read successfully.
  • It never carries a value or a range.
  • Concealed and password-field records leave out the retries and the time.
  • readsRetried counts 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

  • Swift engine suite: 1823 tests, 2 skipped (main's existing two), 0 failures. Tests, by review finding:
    • Round 1:
      • P1-1: testAConcealedRequestsUnconfirmedAnswersNeverAdviseObservingTheApp.
      • P1-3: testARetryClassifiesTheFieldAgainFirst.
      • P1-4: testARoleChangeSeenInAPollIsTheEndWhateverItsSubroleReads.
      • P2-5: testAPasswordFieldsClassifyingReadIsNeverRetried.
      • P2-6: testNoFieldUnderSelectTextsRangeTypesNothing, and on the paste route testTypeTextsPasteRouteIntoANonTextFieldUnderSelectTextsRangePastesNothing.
      • P2-7: testTheSnapshotsRetryFitsTheRequestsTimeLeft, through keyTextReadBack.
      • P2-8: testAReadThatKeepsFailingIsUnconfirmedWithItsRecord.
      • P1-2 is superseded by ruling 1247.
    • Round 2:
      • 1: testNoFocusedElementStillThrows. The odd-reply marker cells throw with no note.
      • b: TypeReadbackMarkerTests.testAPasswordFieldTheRouteCannotVouchForStopsTheReadBack.
      • c: superseded by R1 (round 4); covered by the table.
      • d:
        • every typeUnconfirmed reason, concealed, in testAConcealedRequestsUnconfirmedAnswersNeverAdviseObservingTheApp;
        • the wrapper's every branch after a key, in 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.
      • e: testNoFieldUnderSelectTextsRangeTypesNothing (0 keys), and the paste-route test with no focused element (no ⌘V, pasteboard untouched).
      • h: testARetryChecksItsBoundAgainAfterTheClassification, where the classification reads take 30 ms each.
    • Kept:
      • the note's exact text;
      • Finder's four roles answer ok, with the note after the cut-off notice, within 500 characters;
      • a mismatch and the password reasons still throw;
      • a read failing once confirms, in each phase and attribute;
      • a mismatch next to a transient failure still throws;
      • the paste route's note, and a failed read timed from the ⌘V.
  • Node: services-sky, services-engine-service and doctor-engine, 100/100; accept-chrome, secrets-project, services-browser and native-matrix, 175/175.
  • ci-gate: GREEN on 6a4041b (run https://github.com/SSFSKIM/cua/actions/runs/46091654549), all seven gates.
  • Nothing GUI or live AX ran on the MacBook.
  • Live proof: the matrix cell finder/frontmost/typeText.typeSelect (and C-6's background typeSelect cells) must pass on cua in the next sitting, with the note recorded. The TextEdit typeText.latin cell must pass, or a readFailure must 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.typeSelect and finder/background/typeText.typeSelect@textedit and @electron: equal, 3/3 on both engines. On cua the row was found and selected with no typeUnconfirmed; 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 no readFailure.
    • textedit/concurrent.sheet@electron, openPanel/background/getAXState.panel@finder and click.cancel@finder: equal, 3/3.
    • Not interfering: 15 of 15 on both engines.

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.

    • Ruling 1247 dropped ok-with-note for noFocusedElement. That made findings a, f and g moot: the code they concerned (the noFocusedElement ok-with-note path, .noField and the walk's three-way outcome) is removed.
    • b, c, d, e and h are fixed in ef383ad..75481fd (d20a280 engine, 644dee7 secret wrapper, 75481fd spec).
  • 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):

    • (1) The lookup role was carried but never compared. It is now compared with the snapshot's role before anything else is read. A password field's role or subrole answers becameSecure; any other difference answers fieldChanged. No value, range or length is read. A field the lookup took for a password field keeps its own noLongerSecure check. (Superseded by R1 in round 4; that test is replaced by the table.)
    • (2) select_text's range comes first. Under a pending range, a changed role, a non-text or secure non-field element, the nil lookup, or a closed claim answers selectionChanged before any key or ⌘V. (Superseded by R2 in round 4; the keyed test is replaced by the table. PasteActivationTests.testTypeTextsPasteRouteIntoANonTextFieldUnderSelectTextsRangePastesNothing stays.)
    • (3) Logged, not fixed: the native engine's input-source and in-flight intervention errors still advise get_app_state after a secret's first key. This is pre-existing, and the wrapper withholds them for every concealed request.
  • 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:

    • wave 3's skip for an already-classified field, and the foundRole comparison;
    • every per-path selection check from waves 2 and 3;
    • ReadbackRetry.fieldClosed's own role and secure-role branches;
    • readbackFieldClosed;
    • readbackLength's own noLongerSecure and fieldChanged checks;
    • ReadbackFound.field's password and role, now one identity.

    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.testTypeTextsPasteRouteHoldsTheSnapshotsClassificationAndTheRange runs 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 in testRoundFoursCases, and testTheClassificationComparison tests 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):

    • P1-1: the walk's focus check after the poll compared only element identity. Now the role it read goes through 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 fake stillFocused reads the field's role, asserting outcome and keys.
    • P2-2: at the concealed final batch, AXGroup with an unread subrole answered fieldUnreadable. It now answers noLongerSecure again, as macOS engine: a null subrole marks a non-text group 'value unread', so Finder's toolbar group is not pruned (#501 regression) #525's neverSecureRoles classifies it. AXGroup still secure by a subrole that was read stays fieldChanged. Tests: two transitions on every password-field row of the table, and testTheClassificationComparison.
    • P2-1, logged: a walk-claimed open field whose first subrole read fails is taken for a password field. This fails closed and matches main.
    • P1-2, filed as macOS engine: type_text's paste route posts a Return across a classification change its effect reading saw #600: the paste transport's effect reading (see R1's scope above).
  • 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

Sminos-Session: cursor235#b93055dd (cua on macbook)

…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)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 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-28T01:32:10.361975Z c1e1d8f 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.

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)
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
@SSFSKIM
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
SSFSKIM merged commit 03c1ed9 into main Nov 28, 2026
26 of 30 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant