Skip to content

fix: comprehensive stress test bugfix sweep#5

Merged
msilverblatt merged 6 commits intomasterfrom
fix/stress-test-bugfixes
Mar 15, 2026
Merged

fix: comprehensive stress test bugfix sweep#5
msilverblatt merged 6 commits intomasterfrom
fix/stress-test-bugfixes

Conversation

@msilverblatt
Copy link
Owner

Summary

  • 17 bugs fixed across Go runtime, Python SDK, TypeScript SDK, Rust SDK, and docs
  • 8 regression tests added to prevent recurrence
  • All test suites pass: Go (12 packages), Python (149 tests), TypeScript (102 tests), Rust (73 tests), e2e (4 tests)

Critical fixes

  • Python transport.py: Missing import os caused NameError on any compressed data send
  • Python runner.py: Exception handler referenced uninitialized variables, causing secondary crash
  • Go validator: Regex rejected dotted tool names (group.action) that the SDKs themselves generate — pmcp validate failed on its own examples
  • Rust SDK: 18/73 tests failed under parallel execution due to Mutex poisoning
  • CLI: --help and --version returned "unknown command" errors

All changes

Commit Scope What
fix(python) SDK Missing os import, uninitialized vars in except handler, missing export, unused imports
fix(go) Runtime Validator dotted names, --help/--version, file existence check, Batch() panic→error, handler body close, FormatJSON error propagation
fix(typescript) SDK Missing export, incomplete hot reload, wrong template fallback, workflow race condition
fix(rust) SDK Mutex poisoning on all global registries (13 files), test serialization locks
docs Docs Wrong brew tap name in 2 READMEs, wrong path in Go example comment

Test plan

  • go test ./cmd/... ./internal/... — all pass
  • go test ./test/e2e/... — all pass
  • python -m pytest sdk/python/tests/ -v — 149 pass (3 new regression tests)
  • npx vitest run (sdk/typescript) — 102 pass (2 new regression tests)
  • cargo test (sdk/rust) — 73 pass, 0 fail (previously 18 failures)
  • pmcp validate examples/python/tool_groups.py — pass (previously failed)
  • pmcp validate examples/python/workflow_deploy.py — pass (previously failed)
  • pmcp --help — works (previously errored)
  • pmcp --version — works (previously errored)
  • pmcp dev nonexistent.py — clean error (previously confusing python3 error)

- Add missing `import os` in transport.py (NameError on send_raw)
- Initialize start_time and action_name before try block in runner.py
  (NameError in exception handler if early failure)
- Export clear_middleware_registry from __init__.py (consistency)
- Remove unused imports in resource.py and prompt.py
- Add 3 regression tests covering each critical fix
- Allow dotted tool names in validator (SDK generates group.action)
- Add --help/-h and --version/-v flag support
- Check file existence before launching subprocess
- Return error from Batch() instead of panicking
- Close request body in playground HTTP handlers
- Propagate json.Marshal error from FormatJSON()
- Add regression tests for each fix
…flow race

- Export clearMiddlewareRegistry from index.ts
- Clear all registries on hot reload, not just groups
- Match URI against template pattern instead of blindly using first template
- Await getActiveTools() to prevent race condition in workflow init
- Add 2 regression tests
Replace .lock().unwrap() with .lock().unwrap_or_else(|e| e.into_inner())
on all global static Mutex registries. Add test-only serialization locks
to prevent parallel tests from racing on shared global state.

All 73 tests now pass consistently under parallel execution.
- Fix brew install command in SDK and examples READMEs
  (protomcp/tap -> msilverblatt/tap)
- Fix file path in Go resources_and_prompts example comment
@msilverblatt msilverblatt merged commit 5f6563f into master Mar 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant