refactor(test): colocate sdk, remote and metro tests with their modules
Merged
TH
8h ago+22+22+01234567890123456789-27-27-01234567890123456789
Summary
First slice of the root test-colocation burn-down (class r, root code in the wrong place): 12 tests move from src/__tests__ (and src/commands/batch) beside the module they test.
| From | To |
|---|---|
android-adb-public, contracts-schema-public, metro-public | src/sdk/ |
commands/batch/public | src/sdk/batch-public.test.ts |
remote-config-public, upload-client, upload-client-cancellation | src/remote/__tests__/ |
client-metro, client-metro-auto-companion, client-metro-companion, client-metro-startup-cleanup, metro-session-hints | src/metro/ |
Commit 1 is a pure git mv (0 content lines). Commit 2 is relative-specifier edits plus the mutation-exclusion path in vitest.config.ts (git diff -M similarity 90โ99%). No exports change anywhere (root exports 13 โ 13, no package touched), no barrels, no new fixtures. Seeds no colocation baseline yet (rule not on main).
Validation
Head 9221fd0a6. check:quick, check:layering, check:fallow, check:gate-manifest, pnpm format pass.
- Parity: 88 tests before, 88 after, per file identical (
vitest run <files> --reporter=json): android-adb-public 1, contracts-schema-public 7, metro-public 2, batch-public 5, remote-config-public 1, upload-client 18, upload-client-cancellation 3, client-metro 20, -auto-companion 6, -companion 12, -startup-cleanup 6, metro-session-hints 7. - Selection: all run under
unit-core(src/**/*.test.ts);vitest listshows the new paths. vi.mockeffectiveness (broken once, failed, reverted):client-metro-auto-companion./client-metro-companion.tsโ real module: 6/6 fail;client-metro-companionhost-kit/commandwithoutrunCmdDetached: 8 fail;client-metro-startup-cleanupsame: 6/6 fail.check:affected --run: 1 failure,eager-closure-budgets โบ no APPROVED_OVER_CEILING row is stalenamespackages/daemon/src/index.ts(row added by #3633). Not from this diff: it passes onorigin/mainonly because the check is deferred when merge-base == head, so any branch off main fails it. For the daemon thread to drop that row.
๐ค Generated with Claude Code