Repository navigation
test(clients): spread the real connect module in the route-intent recovery mock - #8700
Conversation
…overy mock The subprocess mock of ./src/client/connect listed four functions. #8662 made src/cli/connect import assertDisconnectExpectation as well, so the CLI module failed to link and both CLI scenarios exited with a SyntaxError before running. The mock now spreads the real module and overrides only the four functions.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Maintainer integration into
|
Summary
Fixes the two failures in dev batch run 43451726885 (test 5/5, head 65ec0dd):
tests/clients/route-intent-connect-recovery.test.ts"Hub rejects generic clients before reading a credential or attempting connect"Both scenarios run in a
bun --evalsubprocess and replace./src/client/connectwithmock.module. The factory exported onlyconnectClient,disconnectClient,revokeConnectedClientKey, androtateConnectedClientKey. #8662 (63c7da7) addedassertDisconnectExpectationtosrc/client/connect.tsand imported it fromsrc/cli/connect.tsfordisconnect --expect-link, so importing the CLI module failed with:The product is correct; the test's mock was incomplete. The factory now spreads the real module and overrides only those four functions, so a future export from
src/client/connect.tscannot break the link step again. The Link scenario still asserts the mockedconnectClientreceived the selection, which shows the override takes effect.PR
test changedfollows the import graph and cannot see subprocess tests, which is why this reacheddev. This PR carriesci:fullso the full Ubuntu shards run the file.Verification
bun test tests/clients/route-intent-connect-recovery.test.tson dev 65ec0dd: 7 pass, 2 fail with the SyntaxError above (failure reproduced before the fix). With the fix: 9 pass, 0 fail.bun test tests/clients/route-intent-*.test.ts tests/cli/*connect*: 271 pass, 1 skip (Windows-only probe), 0 fail across 28 files.bun run typecheck: no type errors in 2,533 files.bun run test. The change touches one test file with nosrc/change; the full Ubuntu shards run viaci:full.Checklist
Summary by CodeRabbit