feat(errors): disclose whether a failed interaction reached the device
Summary
Part of #3069. Rebased on main after #3072 (the resolution.ts split).
A failed interaction says whether a resend is safe, in error.details.dispatched: "no" (nothing reached the device; retry as is) or "unknown" (it may have landed; snapshot first). No yes: no backend can prove execution on its failure path.
{ "error": { "code": "ELEMENT_NOT_FOUND", "details": { "dispatched": "no", "reason": "selector_not_found" } } }
no comes only from a producer that refused before dispatch (selector, ref, covered, off-screen, keyboard, admission, readiness exhausted, sparse capture, RUNNER_BUSY, INVALID_ARGS, an invalid sequence step, a connect that wrote nothing). The request router owns the rest, keyed by the registry's recordingEffect: a read is no (a resend repeats no app-visible action); a mutation keeps its producer's verdict, else unknown. One ledger per request (RequestExecutionScope) records every bound mutation through the typed RUNTIME_OPERATION_EFFECTS table; nested requests (batch steps, find's delegated click/fill, replay actions) roll into it, so a no after any send becomes unknown with dispatchedSteps. The public runBatch applies the same rule for custom invokers.
Contract: contracts/fixtures/dispatch-disclosure.json, 70 rows (30 no, 40 unknown), each driven through its real producer; a gate fails on an unowned row, an ownerless driver, a missing driving loop, a bad value. The Maestro direct iOS tap falls back only on "no" (it matched message text).
85 files, production +1332/−416, over the budget by maintainer decision: table, drivers and gate are one contract. Docs: ADR 0011, commands.md, client-api.md.
Validation
Tested commit d7b442d040: full pnpm check:affected --run green (12948 tests; 5 s contention timeouts in untouched runner files pass alone). Live --json runs on a simulator and an emulator, and the BrowserStack/Device Farm runs, are in the review thread. Known gap (ADR): failures before the router's locked scope carry no field; Android dialog-recovery taps are outside the ledger; the runner restart resend is #3082.