fix(find): enforce offscreen and non-hittable guarantees on focus
Merged
SA
2h ago+843+843+012345678901234567890123456789-426-426-012345678901234567890123456789
Summary
Close the offscreen and nonHittable waivers on find-focus-dispatch in packages/contracts/src/interaction-guarantees.ts. Refs #3734.
- Move
throwIfOffscreenTargetanddescribeNonHittableTargetinto@agent-device/selectorssocommand-runtimeanddaemonshare one rule. - Refuse off-screen
find focusandfind typetargets; limit iOS rescue to one exactidorlabelprobe match and mark rescued targetshittable: true. - Expose
targetHittable: falseandhintonfindresponses,FindCommandResponseData, CLI stderr warnings, and MCP text. - Keep
targetStabilitywaived onfind-focus-dispatchpending an ADR 0039 decision.
Before / after
Before: find focus and find type dispatched off-screen points and reported silent success on non-hittable targets.
After: off-screen targets fail with a find-specific retry hint, non-hittable targets include targetHittable: false and a warning hint, and iOS rescue verifies exact target identity.
Validation
- Head
c97e5b99a:pnpm check:affected --runpassed 22/23 gates (fullunit,format,lint,typecheck,layering,fallow,build,package,vitest-related) plus all 20 other local gates;depgraphexceeded its 5 s CPU budget locally on both branch and unchanged base under host load. - Red/green proof: 3 scenarios fail on
origin/mainand pass onc97e5b99a.
Reviewed with sol-loop: 4 rounds with gpt-6.2-sol. Sol verdict: approved.
Created with Claude Opus 5.5 and Gemini 4 Neon in T3 Code.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.