Skip to content

macOS engine: type_text into a text field throws typeUnconfirmed 'could not be read back' after the text landed exactly #590

Done

Description

@SSFSKIM

Problem

On macOS, cua's type_text can throw typeUnconfirmed ("the field's text could not be read back") on an ordinary text field after the text went in exactly. The model is told the text "is not confirmed and some or all of it may have gone in". The message does say not to type again, but it presents the typing as failed, which invites a retry that duplicates the text. The vendor answered ok on the same cell.

Evidence

Pilot C-6 (run 45408876276 @0b039ce50, artifacts ~/.local/share/cua-m5-pilot/c-6/sitting/cua/run-1/result.json), cell textedit/latin/typeText.latin (unicode section, TextEdit frontmost, Latin input source, keyed route 2′, 44 characters):

  • cua: the outcome is exact: true, nfcEqual: true, length 44/44, the expected hash, effect: true. It threw typeUnconfirmed (-10005): "The text was typed, but the field's text could not be read back, so it is not confirmed…". inCellMs 402.
  • vendor: ok, exact 44/44, same hash.
  • Pilot C-5: the same cell passed on cua. So it is intermittent: seen once in two pilots.

"Could not be read back" is the message for the read-back reasons roleUnreadable, fieldUnreadable, valueUnreadable and rangeUnreadable (TypeReadback.swift, typeUnconfirmed). Which read failed, and when, is not recorded, so the specific AX read (role, value or selected range) and its timing relative to the last key are unknown. Likely candidates: an AX messaging timeout or a transient AX error on a read while TextEdit was still processing the keys.

Wanted

  1. Diagnose first. Pilot C-7 records, on every typeUnconfirmed row: which read failed, its AX error code, its time after the last key, and the retry count. Ruling 1223 says that if this shows a harness cause, the ticket is unblocked.
  2. Fix. A transient read failure on a text field gets a bounded retry within the type_text request's settle before answering typeUnconfirmed. Only a persistent read failure answers it, so text that landed is confirmed instead of reported unconfirmed. What doesn't change:
    • password fields (secure and friends);
    • valueMismatch, unchanged and fieldChanged, where the read worked and disagreed.
  3. Tests. A read that fails once and then succeeds answers ok. A read that keeps failing answers typeUnconfirmed, as today. A mismatch still throws.

Board

P2, bug. Blocks #506 (ruling 1223). Parent #117. Relates to #587, a sibling: that one is typeUnconfirmed on a non-text field after effect, this one on a text field.

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

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P2
    on Nov 24, 2026
  2. SSFSKIM commented on Nov 24, 2026

    @SSFSKIM
    OwnerAuthor

    Wanted (addendum, ruling 1225): today the engine's typeReadback record can't say what failed. On typeUnconfirmed, the engine records the failing read's phase (pre-key snapshot or post-key poll), its AXError code, the time since the last key, the retry count for that read, and the element's role and subrole. The snapshot read gets the same bounded retry as the poll; today a failed snapshot throws at once (TypeReadback.swift ~L765). Mismatches and password fields keep today's behaviour. C-7 adds a harness-side read straight after the call (role, character count, selected range, per-read AXError, device clock; never the value).

  3. SSFSKIM commented on Nov 27, 2026

    @SSFSKIM
    OwnerAuthor

    Second occurrence (split rerun 46052931439, judged in 46069842660): textedit/concurrent.sheet@electron, cua run 1, threw typeUnconfirmed in the same shape. The fix rides with #587's in one PR (ruling 1236): the diagnostic fields from the addendum, and the snapshot read's bounded retry.

  4. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 27, 2026
  5. SSFSKIM commented on Nov 27, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: cursor235 taking under ruling 1236 (one PR for #587+#590)

  6. added
    status:in-review
    and removed
    status:in-progress
    on Nov 28, 2026
  7. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: PR #601 open; review converged (round 6 correct); live proof pending

  8. added 2 commits that reference this issue on Nov 28, 2026
  9. removed
    status:in-review
    on Nov 28, 2026
  10. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: merged in #601

  11. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #601 (cua 0.30.3, engine 0.2.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions