Skip to content

fix(mcp): preserve remote health JSON - #527

Merged
gfargo merged 1 commit into
mainfrom
fix/mcp-health-remote-json
Aug 28, 2026
Merged

fix(mcp): preserve remote health JSON#527
gfargo merged 1 commit into
mainfrom
fix/mcp-health-remote-json

Conversation

@gfargo

@gfargo gfargo commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve valid degraded/unhealthy remote health JSON in MCP responses
  • emit JSON-mode health output after on_health_fail hook chatter so the machine-readable result remains trailing
  • remove only the exact run_remote_strut failure wrapper before retaining full jq validation
  • keep plain SSH failures, malformed JSON, and arbitrary trailing diagnostics on the MCP error channel

Validation

  • bats tests/ </dev/null — 2,650 passed, 2 expected skips
  • bats tests/test_cmd_deploy.bats tests/test_cmd_status_remote.bats tests/test_mcp_tools.bats </dev/null — 140 passed
  • direct MCP fixtures for unhealthy JSON, hook chatter, leading warnings, SSH failures, malformed JSON, contextual wrappers, and arbitrary suffix rejection
  • shellcheck -x -S warning lib/cmd_deploy.sh lib/mcp/tools.sh
  • bash -n lib/cmd_deploy.sh lib/mcp/tools.sh
  • git diff --check
  • semantic review — no actionable findings

Closes #509

@gfargo
gfargo merged commit b8f831d into main Aug 28, 2026
3 checks passed
@gfargo
gfargo deleted the fix/mcp-health-remote-json branch August 28, 2026 20:41
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.

MCP: successful tool results returned via error channel on non-zero exit codes

1 participant