feat(interaction): pre-dispatch admission owner for runtime press/click

Merged
TH
20h ago
+1026-253

Summary

Slice 1 of #4456, implementing ADR 0039 (#4457) for runtime-resolved press/click.

  • One admission owner, pre-dispatch-admission.ts#admitResolvedTarget, between resolution and backend.tap.
  • Both moving-target schedules become one observeUntil loop under one hard bound: request signal plus the earlier of execution/result deadlines (daemon passes CommandContext.deadlineAtMs). Checked around every read, before every sleep, and before dispatch; reads in flight abort at the deadline; windows anchor once.
  • observeUntil gains a hard deadlineMs that minPolls/verdicts cannot extend; other consumers unchanged.
  • moving-target-gate.ts keeps only the motion check; schedules deleted.
  • Bound refusals are dispatched: no: request_canceled (signal) or daemon_request_timeout (kernel createRequestDeadlineError + REQUEST_DEADLINE_REASON, shared with host-kit).
  • Unchanged: target_still_moving, ADR 0014 precedence, bypasses, idle accept path (no extra capture/sleep).
  • Registry declaration fields proposed on #4456, not added.

15 files, ~+165 net production lines.

Validation

  • Head d974424ef4: typecheck, lint, closure budget, interaction/host-kit/daemon suites and 98 interaction-contract tests pass locally; CI is authoritative. Earlier full check:affected (b2cb2801cf) passed except unrelated subprocess timeouts under host load.
  • Routed tests: idle cost (no capture, sleep or timer), cancel during sleep/read, deadline (including a read in flight and out-of-range values), Android late settle, ref precedence, daemon deadlineAtMs hand-off; budget tests fail on main.
  • Live at d974424ef4 (iOS 27 iPhone 18 Pro sim; Android 15 emulator, android-helper 0.21.37-dev): press after a transition looked, then landed (About / Internet); idle press not slower than merge-base. Commands and outputs: see the evidence comment. Head d6e5544bfb changes only tests and the refusal hint text since.

šŸ¤– Generated with Claude Code