test(daemon): fold the touch-forwarding command-surface fake into the touch fake

Merged
TH
5h ago
+202-289

Summary

Follow-up to #3698's review note: the daemon package had two touch command-surface fakes. touch-forwarding-surface-fake.ts is folded into touch-command-surface-fake.ts, which now serves every touch suite through createTouchCommandSurface(options); touchCreateCommandSurface is createTouchCommandSurface().

What the folded fake takes from the forwarding one:

  • observeSettle and members options (a matchSelector option, defaulting to the || key=value grammar);
  • a @ref resolves against the authorized ref frame before the latest observation;
  • each selector capture is stored as the session snapshot (captureAndStoreSnapshot);
  • a missing target refuses with the typed ref_not_found / selector_not_found reason and dispatched: 'no';
  • the selector chain is built action-aware (click / fill) for press and fill.

No test file changes beyond the import and identifier rename (git diff origin/main -- '*.test.ts' shows only those lines), so no assertion changed and none was dropped.

Evidence

  • Parity for every caller: the 21 test files that use either fake run 149 tests before and after, with identical per-file counts and 0 failures (before: touch callers on the new fake, forwarding callers on the old one; after: all on the folded fake).
  • Break-proofs (fake mutated once, restored): ignoring observeSettle fails 7 tests (interaction-settle*); dropping the ref-frame preference fails 3 (interaction-common, selector-runtime-get-reads, interaction-touch-android-freshness); dropping the typed selector refusal fails 2 (interaction-capture-disclosure, interaction-touch-android-freshness).
  • check:quick, check:layering (no new R83/R84 entries), check:fallow and check:gate-manifest pass.
  • No vi.mock is added or changed; no package exports change; no barrels.

🤖 Generated with Claude Code