fix(mobile): revalidate input bindings before fill and clear
Merged
BH
19d ago+357+357+012345678901234567890123456789-21-21-01234567890123456789
What and why
fillandclearalways dispatch through one fresh mobile snapshot andrefind(), even when capture latency consumed the transition budget. Existing transition waits and nearest-node matching remain in use.- Follow moved fields and identical inputs using the fresh binding. Missing fields, changed security facts, or incomplete captures return
NODE_STALEbefore mutation so existing retries re-observe and rerun secret authorization. - Reuse
TEXT_INPUT_ROLES; keep the non-input refusal and shorten the docs, skill, and changeset. No dependency or agent-device changes. Replacement/empty-clear behavior is separate.
Issue
Fixes #1409
Workflow
flowchart LR
A[Resolved target] --> R{Input role?}
R -- no --> U[UNSUPPORTED_CAPABILITY]
R -- yes --> B[Existing transition wait when needed]
B --> C[One fresh snapshot and refind]
C --> D{Target present and security facts unchanged?}
D -- yes --> E[Fill or clear with fresh binding]
D -- no --> F[NODE_STALE before mutation]
F --> G[Existing re-observation and authorization retry]
G --> C
Verified
Ran it locally: yes, scripted mobile command stream and built packages, not a device.
Validation head: 7d710946a1d7175e5742b4167a97dec59aa97f6c.
main 1a7a331b | this branch |
|---|---|
| Four slow-capture freshness cases fail | All four dispatch the fresh ref with one capture |
| Six duplicate/sliding compatibility cases pass | All six still pass; no uniqueness or rect-equality refusal |
- Owning-boundary tests reproduced 13 failures on the previous PR implementation. The revised engine test file and full mobile unit suite pass, 383 tests total, including cancelled fill/clear transition waits.
- Built mobile smoke:
Built mobile smoke: moved input -> fresh @e42, 1 capture, 1 fill. - The four core fake-engine retry cases are supplemental guards, not regression proof for this fix. They pass, as do 3,060 core unit tests, with one skipped.
- Local workspace typecheck, lint, docs, mobile dead-code analysis, and package-policy checks pass.
- Exact-head spec, docs, and benchmark gate passed; benchmark suites were skipped. iOS and Android deterministic suites remain pending.
- Cubic completed its exact-head incremental review with zero issues across the five cleanup files; all review threads remain resolved.
- The earlier duplicate-identity finding was resolved after the maintainer's policy clarification. The latest cleanup keeps the original
settled()signature and separates waiting from the single input relocation.
Active blockers and limits
- Merged main (
11cffff2d) after #1297 landed: fill/clear keep one input relocation,waitForTransition()keeps #1297's keyboard-visibility check, andbind()takes the projected screen. Mobile typecheck, 408 mobile unit tests, the stale-input integration test, lint, and dead-code pass locally; CI is green on that head. #1300 and #1413 are still open and do not block this merge. - The maintainer's helper/doc-wording cleanup nits are addressed. Human approval is still outstanding.
- No local simulator/emulator or hosted-device verification. No performance claim. A fresh semantic read does not make coordinate dispatch atomic or rule out platform accessibility lag.
- The fork's Mintlify preview awaits maintainer approval. Readiness has not been changed.