• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 22620509927 / 1
64%
main: 64%

Build:
DEFAULT BRANCH: main
Ran 03 Mar 2026 11:24AM UTC
Files 529
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Mar 2026 11:15AM UTC coverage: 63.388% (+0.1%) from 63.284%
22620509927.1

push

github

web-flow
Add SessionManager behind sessionManagementV2 flag (Phase 2) (#3906)

* Add SessionManager behind sessionManagementV2 flag (Phase 2)

Implement RFC THV-0038 Phase 2: a vmcpSessionManager that bridges
the MultiSession/MultiSessionFactory domain logic to the MCP SDK's
SessionIdManager interface. The feature is gated behind a
sessionManagementV2 config flag (default false), leaving the
existing code path completely unchanged when disabled.

Key changes:
  - pkg/vmcp/server/session_manager.go: new vmcpSessionManager with
    two-phase creation — Generate() stores a placeholder, CreateSession()
    (called from OnRegisterSession hook) replaces it with a fully-formed
    MultiSession via MakeSessionWithID(). Terminate() calls Close() before
    deleting to release backend connections. GetAdaptedTools() returns
    SDK tools with session-scoped handlers delegating to CallTool().
  - pkg/vmcp/session/factory.go: add MakeSessionWithID() to the
    MultiSessionFactory interface; refactor MakeSession to share a private
    makeSession() implementation.
  - pkg/transport/session/manager.go: add ReplaceSession() upsert to
    swap a placeholder with a fully-formed MultiSession.
  - pkg/vmcp/config/config.go: add SessionManagementV2 bool field.
  - pkg/vmcp/server/server.go: wire vmcpSessionManager when flag+factory
    are set; add handleSessionRegistrationV2() hook handler.
  - pkg/vmcp/discovery/middleware.go: skip Phase 1 routing-table
    reconstruction for Phase 2 MultiSession sessions.
  - Tests: unit tests for all new methods, ReplaceSession coverage in
    transport/session, and an end-to-end integration test covering
    initialize, tool call routing, and the old-path-unaffected case.

Closes: #3866

* changes from review

---------

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

45881 of 72381 relevant lines covered (63.39%)

76.4 hits per line

Source Files on job 22620509927.1
  • Tree
  • List 529
  • Changed 14
  • Source Changed 9
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22620509927
  • a6ccdf1d on github
  • Prev Job for on main (#22619626791.1)
  • Next Job for on main (#22621178892.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc