test(daemon): fold the touch-forwarding command-surface fake into the touch fake
Merged
TH
5h ago+202+202+012345678901234567890123456789-289-289-012345678901234567890123456789
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:
observeSettleandmembersoptions (amatchSelectoroption, defaulting to the||key=value grammar);- a
@refresolves 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_foundreason anddispatched: '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
observeSettlefails 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:fallowandcheck:gate-manifestpass.- No
vi.mockis added or changed; no packageexportschange; no barrels.
🤖 Generated with Claude Code