Skip to content

test(proxy): isolate transfer module loading mocks - #4631

Merged
thymikee merged 1 commit into
mainfrom
t3/fix-proxy-timeout-response
Nov 17, 2026
Merged

thymikee merged 1 commit into
mainfrom
t3/fix-proxy-timeout-response

Conversation

@thymikee

@thymikee thymikee commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

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 --coverage reproduced socket hang up on 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 format passed.
  • pnpm check:affected --run --head b88e4e182bb2de7ba8fbdd8115ae127cc156bc3f failed with exactCommit: true. Format passed. Lint failed: scripts/layering/package-boundaries.test.ts:1001:4, eslint(max-lines), 1001 lines, limit 1000. Fresh unchanged-base pnpm lint failed 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
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.37 MB 6.37 MB 0 B
Package (unpacked) 6.37 MB 6.37 MB 0 B
Package (download) 1.93 MB 1.93 MB -5 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 35.9 ms 38.2 ms +2.3 ms
CLI --help 84.0 ms 65.1 ms -18.9 ms

@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

The changes are the same as on b88e4e1, so this is that review, not a new one. Comment @apex-sentinel-staging review to review again.

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (fce2fa6247c5).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

Earlier reviews

Review of b88e4e18 · 17.11.2026 11:45 UTC

Apex Sentinel · ✅ Approve

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (fce2fa6247c5).

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at b88e4e1: it only moves the two transfer-module loading cases into an isolated proxy test file, with the same cases and assertions, and there are no conflicts. The Lint, Typecheck & Package failure is main's max-lines breakage in scripts/layering/package-boundaries.test.ts (1001 lines, also red on main at fce2fa6), which this diff does not touch; #4630 fixes it, and a rebase or re-run after that should go green. It is still a draft, so please mark it ready for review when you want it labeled.

@thymikee
thymikee marked this pull request as ready for review November 17, 2026 13:24
@thymikee
thymikee force-pushed the t3/fix-proxy-timeout-response branch from b88e4e1 to 384dfcf Compare November 17, 2026 13:24
@thymikee

Copy link
Copy Markdown
Member Author

Still ready at 384dfcf: the rebase keeps the same two-file proxy test move reviewed at b88e4e1, it is out of draft, and checks are green with no conflicts. Note that #4627 carries the same commit, so merging this first keeps #4627's diff clean.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee
thymikee merged commit 4b692e5 into main Nov 17, 2026
19 checks passed
@thymikee
thymikee deleted the t3/fix-proxy-timeout-response branch November 17, 2026 13:55
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.

Flaky test: daemon-proxy-transfer 'explicit operator cap' fails with socket hang up

1 participant