test(proxy): isolate transfer module loading mocks
Draft
TH
8m ago+55+55+01234567890123456789-39-39-01234567890123456789
Summary
Move the two transfer-module loading cases into an isolated test file. Change 2 files. Keep all 21 cases, the 10 ms operator cap, and all response assertions. Scope remains proxy tests.
The failure is test isolation. During the failed timeout case, proxyErrorResponse imported the preceding test's throwing Vitest mock. The listener received transfer mechanics loaded and destroyed the socket. Production code does not change.
Closes #4629.
Validation
Tested head: b88e4e182bb2de7ba8fbdd8115ae127cc156bc3f.
Base: fce2fa6247c5287cfabaaeeabfda9ab946f881ff.
- Install and build passed.
pnpm exec vitest run --project unit-core packages/proxy/src/daemon-proxy-transfer.test.ts --coveragereproducedsocket hang upon base, run 2. Focused coverage used no reporter and zero global coverage thresholds.- At head, the same suite plus the isolated loading file passed 50/50 normal runs and 50/50 coverage runs. Each run passed all 21 cases. No retries.
pnpm formatpassed.pnpm check:affected --run --head b88e4e182bb2de7ba8fbdd8115ae127cc156bc3ffailed withexactCommit: true. Format passed. Lint failed:scripts/layering/package-boundaries.test.ts:1001:4,eslint(max-lines), 1001 lines, limit 1000. Fresh unchanged-basepnpm lintfailed identically. Remaining selected checks did not run. Owner: layering package-boundary tests. This draft is base-blocked.- Full hosted coverage remains required. Independent review remains required; the implementation agent reviewed the diff.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.