fix: round 2 stress test — deadlocks, race conditions, repo cleanup#6
Merged
msilverblatt merged 7 commits intomasterfrom Mar 15, 2026
Merged
fix: round 2 stress test — deadlocks, race conditions, repo cleanup#6msilverblatt merged 7 commits intomasterfrom
msilverblatt merged 7 commits intomasterfrom
Conversation
The stream reassembly map was accessed in readLoop without holding m.mu, causing potential "concurrent map read and map write" panics when CallToolStream runs concurrently.
…car guard - Replace toolManager.setAllowed() calls in workflow with ToolResult enable/disable lists to prevent deadlock in single-threaded runner - Add hidden tool disable after handshake (matching Python SDK) - Add first-tool-call flag to prevent starting sidecars on every call
… hot reload - Resource template handler now matches URI against template pattern instead of blindly using the first template - Hot reload discovery clears all registries (tool, group, workflow, context, local_middleware) instead of only groups
Add sendDisableHiddenTools() and HiddenHint() option, matching the Python SDK's behavior of disabling hidden tools after the list_tools handshake.
Changed ToolDef handler from Box<dyn Fn> to Arc<dyn Fn> so the handler can be cloned out of the registry lock and called outside it. Previously, the handler closure called with_registry() while the registry Mutex was already held, causing instant deadlock.
- Add MIT LICENSE file (was referenced but missing) - Add SDK install instructions to README Quick Start - Add performance overhead note (~0.5ms per call) - Fix multi-language claim to accurately describe cross-lang API parity - Create sdk/typescript/README.md for npm package page - Fix workflow example run command - Remove .pyc files from tracking - Remove internal planning docs from public repo
The previous commit removed the toolManager import but left a call to toolManager.getActiveTools(), breaking tsc compilation.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Second pass of stress testing. Fixes deadlocks, race conditions, and cross-SDK consistency issues found in round 2. Also cleans up repo presentation.
Code fixes
fix(process)m.streamsmap access in readLoop — data race causing potential panicfix(typescript)fix(python)fix(go)fix(rust)Repo cleanup
Test plan
go test ./cmd/... ./internal/...— all passgo test ./test/e2e/...— all passgit ls-files '*.pyc'— returns nothingls LICENSE— exists