feat(vmcp): expose active backend sessions on /status endpoint#4019
feat(vmcp): expose active backend sessions on /status endpoint#4019
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00fd4857c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds session visibility to the vMCP /status endpoint to support operational debugging and compliance auditing when SessionManagementV2 is enabled.
Changes:
- Extend
/statusresponse schema to optionally include active vMCP sessions and backend session ID mappings. - Add
ListActiveSessions()to the session manager and expose the data throughbuildStatusResponse. - Add unit tests for
ListActiveSessions()behavior and a regression test thatsessionsis omitted when V2 is disabled.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/vmcp/server/status.go | Adds optional sessions block to /status when SessionManagementV2 is enabled. |
| pkg/vmcp/server/status_test.go | Updates status response test DTOs; adds tests for sessions omission and backend field redaction. |
| pkg/vmcp/server/sessionmanager/session_manager.go | Introduces SessionInfo and implements ListActiveSessions(). |
| pkg/vmcp/server/sessionmanager/list_sessions_test.go | Adds tests for listing behavior across empty, placeholder-only, and populated stores. |
| pkg/vmcp/server/session_manager_interface.go | Extends the SessionManager interface with ListActiveSessions(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4019 +/- ##
==========================================
+ Coverage 68.60% 68.63% +0.02%
==========================================
Files 444 444
Lines 45178 45223 +45
==========================================
+ Hits 30995 31037 +42
- Misses 11781 11783 +2
- Partials 2402 2403 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add session visibility to the /status endpoint for operational debugging and compliance auditing when sessionManagementV2 is enabled. Closes: #3876
Add session visibility to the /status endpoint for operational debugging and compliance auditing when sessionManagementV2 is enabled.
Closes: #3876