refactor(move): move the selector pipeline and interaction targeting into @agent-device/selectors - #2397
refactor(move): move the selector pipeline and interaction targeting into @agent-device/selectors#2397thymikee wants to merge 4 commits into
Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
|
No code findings at d8f0ff3. The selector move preserves behavior and the import gate covers relative-path bypasses. Resolve the snapshot-state test conflict by retaining the current test changes and the relocated import, then revalidate. The iOS failure is an xcrun timeout in an unchanged snapshot test and looks unrelated; the conflict still blocks readiness. |
|
Adversarial review (pre-merge): structure is sound — the R19 ownership rule is correctly hardened so an in-package relative import of One follow-up to track (not a blocker for this rename-only PR): the moved tests now carry package-local copies of the shared fixtures — |
…into @agent-device/selectors The 11 pipeline modules (selector-pipeline, selector-pipeline-policy, interaction-targeting, touch-semantics, interaction-positionals, press-retarget, interaction-touch-point, absence-observation and its errors/resolution companions, and the interaction-error vocabulary) are exposed as per-file subpaths. The two test-utils files the moved tests share with root tests are copied into the package, following the existing package-local test-utility pattern.
R19's owner constant now names the pipeline in packages/selectors, and the rule additionally refuses in-package relative routes to the engine file so the co-location cannot widen the door. The package-boundaries export/dependency pins and the fallow health baseline key follow the files.
d8f0ff3 to
2409f70
Compare
|
Addressed both review threads:
|
|
Fixture-duplication follow-up is tracked in #2402 (hoist shared snapshot/selector test fixtures to a single canonical location post-merge). |
|
The clean code verdict also covers 62caaeb: its only change is a comment path. iOS passed all 82 native tests, then the fixture flow timed out waiting for Agent Device Tester without a completed readable snapshot. This looks like an unrelated capture/readiness failure rather than a selector assertion failure, though the root cause is unconfirmed; ready-for-human remains, but CI is not green. |
Summary
Moves the selector pipeline and its interaction-targeting chain (selector-pipeline, selector-pipeline-policy, interaction-targeting, touch-semantics, interaction-positionals, press-retarget, interaction-touch-point, absence-observation and its error/resolution companions, interaction-error) out of
src/coreinto@agent-device/selectors, the package that owns the engine the pipeline drives. Twelve subpaths are added to the package manifest; the R19 ownership rule now pinspackages/selectors/src/selector-pipeline.tsand catches in-package relative imports of the engine as well as the specifier route.Destination was measured, not assumed: the eager static closure of every selectors-importing entry point (maestro 154, ad-replay 105, commands 255, interaction-find 717 modules) is byte-identical whether the chain lands in selectors or capture-kit, so ownership decides: the pipeline is the selector pipeline, and landing here adds one forward edge (selectors → capture-kit) instead of two.
press-retarget.test.tsstays in core because its oracle imports a daemon module; its import now points at the new subpath. Two fallow-surfaced dead exports were dropped: the unusedbuildNodesin the package-local snapshot-builder copy and a staleSCROLL_INPUT_DIRECTIONSre-export.Deferred follow-ups: hoisting the shared test fixtures (#2402); moving
capture-kit's snapshot-occlusion module into contracts.Validation
06773095c6); conflicts insnapshot-state.test.ts,selector-action-resolution.ts,screenshot-crop.tsresolved by keeping main's capture-kit imports alongside the relocated selectors imports.62caaebd6c:pnpm check:affected --runpassed — 544/544 related test files (4124/4124 tests), layering 187/187, fallow clean.git diff -M90% --stat origin/main...HEADshows 17 files as pure renames; the remainder is import re-pointing, the 12 subpath entries, the R19 pin, and one fallow baseline key move.daemon-entrypoint,interaction-verify); both pass in isolation and on the full re-run.