Commit Graph

1 Commits

Author SHA1 Message Date
Levi Neely e5ebf0550a test(toolsrv): add integration tests for RPC protocol
Comprehensive tests for the ollie-remote JSON-RPC 2.0 protocol:

Direct RPC dispatch tests:
- ping: liveness check returns 'pong'
- host_info: returns platform, arch, git repo status
- list_tools: empty list when no tools loaded
- set_env: environment variable injection with hook verification
- set_cwd: working directory updates
- set_allow_tools: tool restriction configuration
- is_parallel_read: parallel safety classification
- result_tier / result_tier_args: retention tier lookup
- detach: returns false when no process running
- list_detached: empty list initially
- signal_detached: error for nonexistent PID
- get_detached_output: error for nonexistent PID
- dismiss_detached: returns false for nonexistent PID
- tool call: error for unloaded tools
- invalid params: -32602 error code

Pipe-based client/server tests:
- Full roundtrip through toolsrv.Conn client
- Concurrent request handling (10 parallel pings)
- Context cancellation propagation
- Connection close detection

JSON-RPC protocol compliance:
- Table-driven tests for request/response format
- Error code verification (-32602 invalid params, -32000 server error)
2026-08-03 16:31:04 +02:00