Skip to content

refactor(test): colocate sdk, remote and metro tests with their modules - #3646

Merged
thymikee merged 2 commits into
mainfrom
refactor/colocate-root-sdk-remote-metro
Oct 15, 2026
Merged

thymikee merged 2 commits into
mainfrom
refactor/colocate-root-sdk-remote-metro

Conversation

@thymikee

@thymikee thymikee commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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 list shows the new paths.
  • vi.mock effectiveness (broken once, failed, reverted): client-metro-auto-companion ./client-metro-companion.ts → real module: 6/6 fail; client-metro-companion host-kit/command without runCmdDetached: 8 fail; client-metro-startup-cleanup same: 6/6 fail.
  • check:affected --run: 1 failure, eager-closure-budgets › no APPROVED_OVER_CEILING row is stale names packages/daemon/src/index.ts (row added by refactor(daemon): add the single package entry and resolve its metadata consumers #3633). Not from this diff: it passes on origin/main only 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

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 15, 2026 13:08
… (pure git mv)

Specifier fixes follow in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…neighbours

Specifier-only edits; the one other change is the mutation-lane exclusion path in vitest.config.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.25 MB 5.25 MB 0 B
Package (unpacked) 5.25 MB 5.25 MB 0 B
Package (download) 1.58 MB 1.58 MB +13 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.9 ms 27.2 ms -0.7 ms
CLI --help 81.3 ms 77.5 ms -3.8 ms

@thymikee

Copy link
Copy Markdown
Member Author

The code in 9221fd0 looks good to me. It moves the sdk, remote and metro tests next to their modules, and I found no broken relative imports or problems with the mutation-exclusion path in the vitest path string. The Repo Guards, Typecheck, Coverage and Integration jobs were still queued when I checked, so CI has not confirmed this yet. I did not run the moved tests or the typecheck, and I did not check whether the Coverage project now picks up the src/sdk test files. Coverage already excludes src/sdk/**, but that is a source-coverage exclude. There are no conflicts. Once the queued jobs pass, this is ready to merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 15, 2026
@thymikee
thymikee merged commit 80d5e22 into main Oct 15, 2026
34 of 35 checks passed
@thymikee
thymikee deleted the refactor/colocate-root-sdk-remote-metro branch October 15, 2026 12:22
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-15 12:54 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant