You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS engine: an inputSourceChanged stop reports fewer characters than the field holds (67 reported, 70 landed) #616
When the input source changes in the middle of a keyed type_text, cua's macOS engine stops with inputSourceChanged and reports how many characters were entered. That number can be lower than what the field actually holds.
In #117 M5's full sitting C, run 46204340204 (feat ff1920e, engine 0.3.3), in the unicode cell textedit/midSwitch/typeText.long, run 2 sample 2 (cua ran first):
The engine answered "The input source changed after 67 of 1079 characters were entered", with entered 67.
TextEdit's field read back 70 characters; exact and sentenceAgrees were both false.
Three characters landed beyond the count, so a model that resumes from 67 types them twice. Samples 1 and 3 passed, and the earlier run (d) had 3/3, so the failure is intermittent. The judge compares the field's own hash against the text's prefix, so the harness is not the cause.
The count comes from checkInputSource(initial, entered:total:) in Input.swift. That is the source check run before every event and after the last, called from keyTextReadBack's checkSource. Events posted before the switch was detected can commit after the count was taken.
Wanted (ruling 1291)
On an inputSourceChanged stop, the count cua reports is what the field shows, by readback, wherever a readback is possible.
Where a readback isn't possible, the answer states a range, e.g. "between 67 and 70 characters may have been entered; read the field before continuing". Never a single number cua can't stand behind.
Do not simply count every unit posted. That trades over-delivery for under-delivery: a model resuming from 70 when only 67 committed drops 3 characters.
On the secret route, check every sentence the engine's count feeds. None may say fewer were entered than may have been (ruling 1247(d)'s direction).
Tests
A switch landing between a post and the count, with a readback and without one.
Activity
SSFSKIM commentedon Nov 29, 2026
[board] in-progress: cursor235 taking under ruling 1291
macOS engine 0.2.5: an inputSourceChanged stop reports what the field…
service and secret wrapper: cua/enteredRange, and "some or all of it …
native matrix: the mid-switch row judges a range answer by the field …
Plugin 0.31.1, native engine spec: #616's Decision Log entry and the …
Tech debt: inputSourceChanged is concealed-aware since #616; the inte…
macOS engine: an inputSourceChanged count is exact only when the fiel…
service: cua/enteredRange's low end is the last confirmed prefix; fix…
11 remaining items
native matrix and service: the no-number sentence with meta {0, total…
Native engine spec: #616's ruling 1299 (refs #616)
macOS engine: an inputSourceChanged stop after a key down states no n…
native matrix and service: the mid-switch cell judges no number, or 0…
Native engine spec: #616's final design, no number once a key down ha…
SSFSKIM commentedon Nov 29, 2026
[board] in-review: PR #619; 1299 fallback applied, no round 6 (ruling 1300)
macOS engine: an inputSourceChanged stop states no count it can't sta…
SSFSKIM commentedon Nov 29, 2026
[board] done: Landed via PR #619 (1326898, cua 0.31.2, engine 0.2.5).
SSFSKIM commentedon Nov 29, 2026
[board] done: merged in #619
Merge main 1326898 into feat/117-m5: #617 (cua 0.31.1) and #616/#619 …
Ruling 1303 (the re-measure's judging, fixed before the data) and the #…