Skip to content

Conversation

@yrobla
Copy link
Contributor

@yrobla yrobla commented Dec 18, 2025

Implement health checking and status tracking for virtual MCP server backends. This provides the foundation for monitoring backend availability and categorizing failure modes (unhealthy, degraded, unauthenticated).

Large PR Justification

This is an atomic commit, adding the core functionality for vmcp healthchecks. It includes comprehensive testing

Related-to: #3036

@yrobla yrobla requested a review from Copilot December 18, 2025 14:09
@github-actions github-actions bot added the size/XL Extra large PR: 1000+ lines changed label Dec 18, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Large PR Detected

This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.

How to unblock this PR:

Add a section to your PR description with the following format:

## Large PR Justification

[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformation

Alternative:

Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.

See our Contributing Guidelines for more details.


This review will be automatically dismissed once you add the justification section.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 76.27628% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.09%. Comparing base (aeab6bd) to head (8de8abb).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/vmcp/errors.go 0.00% 34 Missing ⚠️
pkg/vmcp/client/client.go 22.85% 20 Missing and 7 partials ⚠️
pkg/vmcp/health/checker.go 75.00% 6 Missing and 4 partials ⚠️
pkg/vmcp/health/monitor.go 94.82% 6 Missing ⚠️
pkg/vmcp/health/status.go 98.14% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3100      +/-   ##
==========================================
+ Coverage   56.89%   57.09%   +0.19%     
==========================================
  Files         337      341       +4     
  Lines       33617    33940     +323     
==========================================
+ Hits        19127    19378     +251     
- Misses      12899    12959      +60     
- Partials     1591     1603      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements core health monitoring infrastructure for virtual MCP (Model Context Protocol) server backends. It provides a foundation for tracking backend availability, detecting failure patterns, and categorizing different types of failures (unhealthy, degraded, unauthenticated).

Key changes:

  • Health checker implementation using ListCapabilities as the health check mechanism with error categorization
  • Status tracker with threshold-based failure detection and thread-safe state management
  • Periodic health monitor with configurable intervals, automatic failure tracking, and graceful lifecycle management

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/vmcp/health/checker.go Implements health checking using ListCapabilities with error categorization (auth, timeout, connection failures)
pkg/vmcp/health/checker_test.go Comprehensive tests for health checker including error categorization, timeouts, and concurrent backend scenarios
pkg/vmcp/health/status.go Status tracker for managing backend health states with threshold-based transitions and thread-safe operations
pkg/vmcp/health/status_test.go Extensive tests for status tracking including concurrency, state transitions, and edge cases
pkg/vmcp/health/monitor.go Periodic health monitor with background goroutines, configurable intervals, and lifecycle management
pkg/vmcp/health/monitor_test.go Monitor tests covering start/stop lifecycle, periodic checks, context cancellation, and health summaries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Implement health checking and status tracking for virtual MCP server
backends. This provides the foundation for monitoring backend availability
and categorizing failure modes (unhealthy, degraded, unauthenticated).

Related-to: #3036
@yrobla yrobla force-pushed the feat/issue-3036-healthcheck-1 branch from 097c9d9 to 175b685 Compare December 18, 2025 14:20
@github-actions github-actions bot added size/XL Extra large PR: 1000+ lines changed and removed size/XL Extra large PR: 1000+ lines changed labels Dec 18, 2025
@github-actions
Copy link
Contributor

✅ Large PR justification has been provided. The size review has been dismissed and this PR can now proceed with normal review.

@github-actions github-actions bot dismissed their stale review December 18, 2025 14:20

Large PR justification has been provided. Thank you!

@github-actions github-actions bot added size/XL Extra large PR: 1000+ lines changed and removed size/XL Extra large PR: 1000+ lines changed labels Dec 18, 2025
@yrobla yrobla force-pushed the feat/issue-3036-healthcheck-1 branch from 11b93a8 to a0c7244 Compare December 18, 2025 15:03
@github-actions github-actions bot added size/XL Extra large PR: 1000+ lines changed and removed size/XL Extra large PR: 1000+ lines changed labels Dec 18, 2025
@yrobla yrobla requested review from JAORMX, Copilot and jhrozek December 18, 2025 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yrobla yrobla requested a review from amirejaz December 18, 2025 15:14
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

Left a few observations from reviewing this PR. Nothing blocking, just some things to consider.

@yrobla yrobla requested a review from jhrozek December 19, 2025 14:28
@github-actions github-actions bot added size/XL Extra large PR: 1000+ lines changed and removed size/XL Extra large PR: 1000+ lines changed labels Dec 19, 2025
@yrobla yrobla merged commit fb475a8 into main Dec 19, 2025
33 checks passed
@yrobla yrobla deleted the feat/issue-3036-healthcheck-1 branch December 19, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Extra large PR: 1000+ lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants