Skip to content

fix: reload hang, workflow visibility, and comprehensive test coverage#9

Merged
msilverblatt merged 2 commits intomasterfrom
fix/round4-tests-and-bugs
Mar 15, 2026
Merged

fix: reload hang, workflow visibility, and comprehensive test coverage#9
msilverblatt merged 2 commits intomasterfrom
fix/round4-tests-and-bugs

Conversation

@msilverblatt
Copy link
Owner

Summary

Fixes hot reload hanging in Python/TypeScript, workflow tool visibility across all SDKs, and adds 36 new tests including e2e coverage for resources and prompts.

Bug fixes

  • Hot reload hang (Python + TypeScript): Post-reload tool list was sent with the reload's request_id instead of empty. The Go runtime routes non-empty IDs to pending channels, but the reload channel was already consumed — so the tool list was silently dropped and reload timed out. Fixed by sending with empty request_id.
  • Go SDK resource template matching: handleReadResource called every template handler without checking if the URI matched the template pattern. Added uriMatchesTemplate guard.
  • TypeScript workflow disableTools always empty: Non-terminal transitions only enabled new step tools but never disabled old ones. Now computes the full disable set.
  • TypeScript workflow async handlers: stepDef.handler() was not awaited, so async handlers returned "[object Promise]".
  • Go SDK workflow empty EnableTools/DisableTools: transitionToSteps relied on a nil ToolManagerAdapter. Refactored to return tools via ToolResult.

New tests (36 total)

Suite New Total Coverage added
Python +21 170 Hidden tool detection (workflow/group), URI template matching, hot reload clearing
TypeScript +5 107 Workflow tool snapshot/restore, hot reload clearing, hidden tools
Go SDK +4 HiddenHint option
Rust +2 75 Hidden field defaults
E2E +4 8 Resource read, prompt get, tool call verification

Test plan

  • Go runtime — all pass
  • Go e2e — 8/8 pass
  • Go SDK — all pass
  • Python — 170/170 pass
  • TypeScript — 107/107 pass (tsc + vitest)
  • Rust — 75/75 pass

- Python/TypeScript reload now sends post-reload tool list with empty
  request_id so the Go runtime routes it correctly (fixes reload hang)
- Go SDK resource template matching checks URI before calling handler
- TypeScript workflow computes disableTools on transitions (was empty)
- TypeScript workflow awaits async step handlers (was dropping Promises)
- Go SDK workflow returns enable/disable lists via ToolResult instead
  of relying on nil ToolManagerAdapter
Python (21 new tests):
- Hidden tool detection includes workflow/group hidden tools
- Resource template URI matching patterns
- Hot reload clears all registries

TypeScript (5 new tests):
- Workflow preWorkflowTools snapshot and restore
- Hot reload registry clearing
- Hidden tool detection across sources

Go SDK (4 new tests):
- HiddenHint option behavior

Rust (2 new tests):
- Hidden field defaults and construction

E2E (4 new tests):
- Python resource read
- Python prompt get
- Python tool call echo + add verification
@msilverblatt msilverblatt merged commit 5016318 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