Repository navigation
refactor(daemon): move the daemon-only transport tests into the package - #3638
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
|
This PR is ready at 50382fa. The change moves the daemon-only transport tests into the package, and production code is unchanged. Not blocking: |
…ts beside Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evidence (quality bar)Pure moves,
Test-count parity. Specifier-only diffs keep the test declarations byte-identical. Run counts at the destination: boundary-cancellation 4, disconnect 3, lease-allocate 1, resumable-upload 1, transport 2, server-lifecycle 1, http-server-proxy 13 (25 total; they passed before the move at the same counts per the PR #3638 run). Lane selection. The six
Exports. |
Summary
Layer 3a of the daemon single-entrypoint work, on main after #3633: the seven test files that needed nothing from root code move into
packages/daemon/src/server/http/, each named for the module it sits beside and importing its subject relatively. Category (a) in the redesign: daemon logic, no root code. Two commits: the pure moves (renames plus specifier edits,boundary-fault-matrixevidence path), then the manifest edit@agent-device/proxyneeds.Per-file parity (before = old path at
a907a919a, after = this head; both from the vitest JSON reporter)git diff -Mtest/integration/provider-scenarios/daemon-http-boundary-cancellation.test.tsserver/http/http-server-boundary-cancellation.test.tstest/integration/provider-scenarios/daemon-http-disconnect.test.tsserver/http/http-server-disconnect.test.tstest/integration/provider-scenarios/daemon-http-lease-allocate.test.tsserver/http/http-server-lease-allocate.test.tstest/integration/provider-scenarios/daemon-http-resumable-upload.test.tsserver/http/http-server-resumable-upload.test.tstest/integration/provider-scenarios/daemon-transport.test.tsserver/http/transport.test.tstest/integration/provider-scenarios/daemon-lifecycle.test.tsserver/http/server-lifecycle.test.tssrc/__tests__/daemon-proxy.test.tsserver/http/http-server-proxy.test.tsEvery changed line in the renamed files is an import specifier (
@agent-device/daemon/testing/...and@agent-device/daemontype imports to relative paths). Test declarations are untouched.Selection
unit-coreincludespackages/*/src/**/*.test.ts;vitest list --project unit-core --filesOnlylists all seven destinations.pnpm test:unitandtest:coveragerun that project.provider-integration(test/integration/provider-scenarios/**,pnpm test:integration:provider, which still selectsdaemon-http-server.test.tsand the rest);--project provider-integrationselects none of the moved names.http-server-proxywas already inunit-core(src/**/*.test.ts).pnpm check:affected --jsonon this head selectsunit,unit-ciandprovider-integration(the manifest edit fails the selector open) and lists every moved path;check:affected --runpasses, including thevitest relatedleg.vi.mockNo
vi.mockin any moved file (rg vi.mockover the seven destinations returns nothing).Subpath exports
daemon./testing/server/server-lifecycledeleted; no importer remains)No new subpath, barrel or
export *.Follow-up
@agent-device/proxyis declared inpackages/daemondependenciesbecause R11 currently demands it for a test-file import. It belongs indevDependencies, since onlyhttp-server-proxy.test.tsuses it. Once threadmcp:231499d6lands R11 acceptingdevDependenciesfor test-file imports, a follow-up commit flips it.Validation
check:quick,check:layering,check:fallow,check:production-exports,format:checkandcheck:affected --runpass on the pre-rename head; after the renamescheck:quick,check:layeringandcheck:fallowpass again. The Coverage failure on the earlier head was the staleAPPROVED_OVER_CEILINGrow forpackages/daemon/src/index.ts(dropped by #3653); rebase after it merges.🤖 Generated with Claude Code