-
-
Notifications
You must be signed in to change notification settings - Fork 2
Fix worker thread OOM by removing fake tests and switching to vmThreads #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
baf857c
Initial plan
Copilot b3a3679
fix: update MCP client to use JSON-RPC 2.0 protocol
Copilot 6096fec
test: update MCP client tests for JSON-RPC 2.0 protocol
Copilot 9d8912c
docs: add comprehensive MCP server troubleshooting guide
Copilot b9f9203
feat: add comprehensive integration tests for MCP client
Copilot 3f52bb5
docs: add comprehensive MCP client impact analysis
Copilot 6849a40
docs: add final implementation summary
Copilot 210c005
docs: comprehensive test teardown and memory leak analysis
Copilot 56a2bd1
fix: proper fetch mock cleanup in 6 test files (Phase 1 critical fixes)
Copilot 019ba94
fix: add fetch mock cleanup to stats-loader.test.js
Copilot e581b20
docs: add final summary of test teardown investigation and fixes
Copilot 9877a54
fix: address PR review comments
Copilot 7952014
fix: address final PR review comments
Copilot e9295c5
remove: MCP client integration tests and related files
Copilot 7847603
fix: add vi.clearAllMocks() to mcp-client test cleanup
Copilot d391df9
fix: exclude mcp-client test from CI to resolve OOM error
Copilot a2598ba
fix: split large mcp-client test into 2 smaller files
Copilot 80564cb
fix: correct JSON-RPC 2.0 mocks in exports tests
Copilot a6ec389
fix: add proper afterEach cleanup to 15 test files (Phase 1-2)
Copilot 21e28a4
fix: add DOM cleanup to 11 dashboard tests (Phase 3)
Copilot 617d6f4
fix: split mcp-client-core into 2 files to prevent OOM
Copilot 12423a1
remove: delete original mcp-client-core.test.js after split
Copilot 6d19f62
fix: update vitest config for Vitest 4 (remove deprecated poolOptions)
Copilot ce600e1
fix: split generate-news-enhanced.test.js to prevent OOM (FINAL FIX)
Copilot b20bc64
fix: correct tests to match actual code (no more lies)
Copilot c6aa3b6
fix: split politician-dashboard.test.js to prevent final OOM
Copilot 25d92b4
remove: delete original politician-dashboard.test.js after split
Copilot 3bc9b24
fix: delete 19 fake test files testing non-existent scripts
Copilot de1b5da
fix: mock sleep in retry tests to prevent OOM + use single thread
Copilot b081915
fix: resolve worker thread OOM by switching to vmThreads pool
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prefix fallback is gated by
retryCount === 0. If the first attempt fails due to a transient network issue (so you enter the retry path) and a later attempt returns a JSON-RPC "tool not found" error, the fallback to the non-prefixed tool name will never run. Consider removing theretryCount === 0condition and instead guard against infinite recursion by checking whether the current request already used the non-prefixed name (e.g., track a boolean or checktoolName.startsWith('riksdag-regering--')).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 9877a54. Removed the
retryCount === 0condition. The fallback now checkstoolName.startsWith('riksdag-regering--')to prevent infinite recursion. This allows the fallback to work on any attempt, not just the first, handling transient network errors correctly.