Skip to content

Strengthen buffered word predictions when caret text is unavailable - #812

Merged
enaboapps merged 3 commits into
mainfrom
codex/prediction-buffer-811
Sep 20, 2026
Merged

enaboapps merged 3 commits into
mainfrom
codex/prediction-buffer-811

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Strengthen word predictions when native caret text becomes unavailable. The existing worker now accepts ordered append, Backspace and reset edits, seeds its bounded field-scoped buffer from valid native context, and retains tracking across keyboard layouts. Without native context, predictions still require a typed boundary. Native context remains authoritative when available.

Backspace removes a complete Unicode grapheme only within known buffered text. Accepted prediction suffixes are recorded once after successful injection. Existing focus, protected-field, editable-target, external-input and observer-health checks remain required. Buffers stay in memory and are never logged. No settings schema or BLE changes.

Independent review found a race where an in-flight native read could already include an edit still queued by the parent. Stale suggestion replies now force a buffer reset before replaying later edits. Deterministic append and Backspace regressions cover that case.

Validation:

  • Node 24 frontend lint, build, 163 tests and 5 script tests passed.
  • Rust 1.97.1 format, Clippy, 489 unit tests and 7 configuration tests passed; one existing ignored benchmark.
  • Coverage includes native/buffer transitions, ordered edits, Unicode deletion, boundaries, buffer limits, focus resets, protected fields, stale results, one-time acceptance and stable repeated batches.
  • Independent latest-head review of 12e5f0c: no remaining actionable findings.
  • Native Mac and Windows ARM builds and switch keyboard typing ran in disposable editors. Mac fixture withheld AX caret range; Windows fixture withheld UIA TextPattern while retaining ValuePattern.
  • Native fallback qualification is unresolved: neither fixture produced visible buffered suggestions. Mac guard/fixture eligibility was not established. Windows manual navigation used Parallels Ctrl+Alt+F-key commands, which invalidate buffered context; an automatic-scanning retry was inconclusive. Native suggestion acceptance, correction and native-context recovery are not claimed as passed.
  • Restored both VMs’ settings byte-for-byte, stopped owned fixtures, restarted the prior Windows build and returned Mac to suspended. Signed local Mac app was untouched.
  • All CI checks passed, including Mac and Windows native packaging (run 35529684611).

Closes #811. No merge or release requested. Native end-to-end qualification remains required before treating this fallback as verified on either platform.

@enaboapps
enaboapps marked this pull request as ready for review September 20, 2026 18:54
@enaboapps
enaboapps merged commit 7ab879e into main Sep 20, 2026
6 checks passed
@enaboapps
enaboapps deleted the codex/prediction-buffer-811 branch September 22, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strengthen buffered word predictions when caret text is unavailable

1 participant