Skip to content

fix(gateway): keep tool errors from poisoning upstream health - #313

Merged
jmagar merged 7 commits into
mainfrom
fix/codemode-is-error-health
Aug 2, 2026
Merged

fix(gateway): keep tool errors from poisoning upstream health#313
jmagar merged 7 commits into
mainfrom
fix/codemode-is-error-health

Conversation

@jmagar

@jmagar jmagar commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • treat successful MCP CallToolResult responses as connection-health successes even when is_error=true
  • allow disabled protected routes to retain stale target references without blocking startup
  • fall back to legacy initialization when server/discover returns JSON-RPC method-not-found (-32601)
  • fail open when a locally built binary cannot access its compile-time built-in snippets path under production ProtectHome
  • update the discovery metadata compatibility test for rmcp 3.1 behavior

Verification

  • focused Code Mode health regression passes
  • focused disabled-route startup regression passes
  • lifecycle compatibility and transport fallback regressions pass
  • inaccessible snippets-path regression demonstrated red, then passes after the fix
  • config suite: 78 passed
  • gateway relevant tests pass; two load-sensitive provider tests that timed out in a broad concurrent run passed individually
  • cargo fmt --all --check
  • git diff --check
  • all-features UI-embedded build deployed and live-verified
  • live Code Mode search discovers Unifi::unifi; its safe health action returns meta.rc=ok
  • live UniFi invalid_param result leaves runtime connected with no last error

Runtime hardening

Production systemd now uses Restart=always with a 3-second delay. A controlled SIGTERM test changed the main PID and returned /ready successfully. Explicit systemctl stop remains authoritative.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 2, 2026
@jmagar
jmagar merged commit 23b75c1 into main Aug 2, 2026
151 of 160 checks passed
@jmagar
jmagar deleted the fix/codemode-is-error-health branch August 2, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant