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

stacklok / toolhive / 23889040631
65%

Build:
DEFAULT BRANCH: main
Ran 02 Apr 2026 07:27AM UTC
Jobs 1
Files 601
Run time 1min
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

02 Apr 2026 07:21AM UTC coverage: 65.488% (+0.005%) from 65.483%
23889040631

push

github

web-flow
Migrate session manager to DataStorage and add RestoreSession (#4464)

* Migrate session manager to DataStorage and add RestoreSession

Replace the *transportsession.Manager dependency in sessionmanager.Manager
with the DataStorage interface (introduced in split PR 1), enabling pluggable
session metadata storage (local or Redis) without coupling live session state
to the serialization layer.

Key changes:
- Add Exists() to the Storage interface with implementations for LocalStorage
  and RedisStorage; expose TTL() and Exists() on transportsession.Manager
- Add RestoreSession() to MultiSessionFactory (and decorating/mock impls);
  refactor makeSession → makeBaseSession so RestoreSession can reconstruct a
  live session from stored metadata without a bearer token
- Add RestoreHijackPrevention() in pkg/vmcp/session/internal/security to
  recreate the hijack-prevention decorator from stored hash/salt
- Rewrite sessionmanager.Manager to use DataStorage: node-local multiSessions
  sync.Map for hot-path lookups, singleflight-deduplicated RestoreSession on
  cache miss, and a background eviction loop that probes storage.Exists() to
  clean up expired MultiSession objects whose Redis TTL fired silently
- Replace *transportsession.Manager in discovery.Middleware with a
  MultiSessionGetter interface backed by the session manager; remove the 401
  for unknown sessions — the SDK now responds 404 via Validate()
- Wire server.go to create LocalSessionDataStorage and pass it to
  sessionmanager.New; route discovery middleware through vmcpSessionMgr

Closes: #4220

* fixes from review

---------

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

387 of 500 new or added lines in 8 files covered. (77.4%)

44 existing lines in 7 files now uncovered.

54176 of 82726 relevant lines covered (65.49%)

64.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
52
82.09
-4.26% pkg/vmcp/server/sessionmanager/session_manager.go
23
86.94
-7.44% pkg/vmcp/session/factory.go
20
46.67
-37.33% pkg/vmcp/session/decorating_factory.go
7
92.31
-3.95% pkg/vmcp/session/internal/security/security.go
6
80.78
-0.15% pkg/vmcp/server/server.go
4
93.33
pkg/vmcp/server/sessionmanager/cache.go
1
95.09
5.65% pkg/vmcp/discovery/middleware.go

Coverage Regressions

Lines Coverage ∆ File
14
74.44
-5.19% pkg/client/config.go
11
68.42
-14.47% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
5
82.81
0.0% pkg/vmcp/composer/workflow_engine.go
3
82.09
-4.26% pkg/vmcp/server/sessionmanager/session_manager.go
2
95.68
-1.44% pkg/vmcp/composer/template_expander.go
1
86.94
-7.44% pkg/vmcp/session/factory.go
Jobs
ID Job ID Ran Files Coverage
1 23889040631.1 02 Apr 2026 07:27AM UTC 601
65.49
GitHub Action Run
Source Files on build 23889040631
  • Tree
  • List 601
  • Changed 13
  • Source Changed 7
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23889040631
  • 47c3651a on github
  • Prev Build on main (#23870867049)
  • Next Build on main (#23903394499)
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