Skip to content

fix: use JSON-RPC POST for Dewey doctor health check#17

Merged
yvonnedevlinrh merged 2 commits into
unbound-force:mainfrom
yvonnedevlinrh:opsx/fix-dewey-doctor-check
Jun 15, 2026
Merged

fix: use JSON-RPC POST for Dewey doctor health check#17
yvonnedevlinrh merged 2 commits into
unbound-force:mainfrom
yvonnedevlinrh:opsx/fix-dewey-doctor-check

Conversation

@yvonnedevlinrh

@yvonnedevlinrh yvonnedevlinrh commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Replace http.Client.Get() with memory.Client.Health() in checkDewey() to send a proper JSON-RPC 2.0 POST instead of an incompatible HTTP GET to the MCP endpoint. This eliminates spurious "Dewey returned HTTP 400" warnings when Dewey is healthy.

  • Replace raw HTTP GET with memory.NewClient().Health() JSON-RPC call
  • Add protocol-aware JSON-RPC mock handler for tests
  • Strengthen test assertions (Name, Status, Message, Duration)
  • Add TestCheckDewey_RPCError for JSON-RPC error response coverage
  • Include OpenSpec artifacts and retrospective learnings

Fixes: #16

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin [email protected]

Replace http.Client.Get() with memory.Client.Health() in checkDewey()
to send a proper JSON-RPC 2.0 POST instead of an incompatible HTTP GET
to the MCP endpoint. This eliminates spurious "Dewey returned HTTP 400"
warnings when Dewey is healthy.

- Replace raw HTTP GET with memory.NewClient().Health() JSON-RPC call
- Add protocol-aware JSON-RPC mock handler for tests
- Strengthen test assertions (Name, Status, Message, Duration)
- Add TestCheckDewey_RPCError for JSON-RPC error response coverage
- Include OpenSpec artifacts and retrospective learnings

Fixes: unbound-force#16

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>
@gxmiranda gxmiranda requested review from gxmiranda and jflowers June 11, 2026 12:12
The memory.Client.Health() approach still failed because the MCP
Streamable HTTP transport requires an Accept header with both
application/json and text/event-stream, and uses the initialize
method (not dewey_health). Replace with a direct MCP initialize
probe that properly handles SSE responses.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yvonnedevlinrh yvonnedevlinrh merged commit f6c5544 into unbound-force:main Jun 15, 2026
1 check passed
@yvonnedevlinrh yvonnedevlinrh deleted the opsx/fix-dewey-doctor-check branch June 15, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug: checkDewey doctor check uses HTTP GET against POST-only MCP endpoint

3 participants