refactor(test-kit): move the interaction-targeting node fixtures out of selectors

Merged
TH
12h ago
+25-16

What

The interaction-targeting node fixtures (nine RawSnapshotNode[] trees captured from live iOS and React Native snapshots) are used by selectors' own tests and by tests in replay-port and root. They were published from @agent-device/selectors/interaction-targeting-fixtures; they now live in @agent-device/test-kit as nine named exports.

  • Commit 1: pure git mv of interaction-targeting.fixtures.ts from packages/selectors/src to packages/test-kit/src (the file imports only a kernel type, so it needs no edits).
  • Commit 2: the five importers read the names from @agent-device/test-kit; selectors declares test-kit in devDependencies and tsconfig references (test-kit no longer reaches selectors after #3686/#3687, so no reference cycle); the ./interaction-targeting-fixtures export and its line in the layering test are removed; one duplicate test-kit import in replay-port's test is merged.

Fixture decision

FixtureImporters by packageOutcomeReason
selectors/interaction-targeting-fixturesselectors 2 tests, replay-port 1, root src 2 (test-utils/index.ts, selector-action-resolution.test.ts)case 3: test-kitshared by three packages' tests; plain node data over kernel types

Parity

vitest run <files> --reporter=json, origin/main against this branch, over the 4 direct importers plus every test that imports the root test-utils helper: 28 files, 265 / 265 -> 265 / 265. No test file moved; unit-core selects them as before. No vi.mock involved.

Surface

exports: selectors 18 -> 17 (./interaction-targeting-fixtures removed); test-kit stays one "." entry, +9 named exports; no barrels or export *. Selectors gains a test-kit devDependency + reference; the R83 isolation walk and tsc -b stay acyclic.

Gates

check:quick, check:layering, check:fallow, check:gate-manifest, pnpm format pass. check:affected --run (full set, since a package manifest changed) passes except one test, test/integration/smoke-web-platform.test.ts > web shutdown cleanup reaps the exact daemon that survived graceful shutdown. It fails identically on a clean origin/main (reproduced alone under the host lock on both), so it is a pre-existing, host-dependent failure unrelated to this diff.

The gates ran on the pre-rebase head; after rebasing onto #3704 I re-ran lint, format, install and the 265-test parity set.

🤖 Generated with Claude Code