mirror of
https://github.com/turnstonelabs/turnstone.git
synced 2026-08-23 12:24:46 -06:00
f5af4875ba
* fix: surface MCP server errors in admin UI instead of silent logging get_server_status() hardcoded error="" — connection and refresh failures were logged but never surfaced to the admin panel. Added _last_error dict to MCPClientManager: set on failure (connect, refresh, periodic refresh, notification handler), cleared on success, cleaned up on remove. Read in get_server_status(). Admin UI: error tooltip on list row status span, error text in red in detail modal per-node list. Schema already had the field. 6 new tests for error tracking lifecycle. * feat: add turnstone_mcp_server_errors Prometheus gauge Exposes the count of MCP servers currently in error state via /metrics for alerting and reliability tracking. * fix: address copilot review — sanitize error strings, clear on notification success - Add _set_error() helper: strips newlines, truncates to 256 chars - All error-setting sites now use _set_error() for consistent sanitization - Notification handler clears _last_error on successful refresh (fixes stale error for push-notification servers that skip _periodic_refresh)