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

stacklok / toolhive / 24185238500
65%

Build:
DEFAULT BRANCH: main
Ran 09 Apr 2026 10:30AM UTC
Jobs 1
Files 615
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

09 Apr 2026 10:24AM UTC coverage: 64.988% (-0.006%) from 64.994%
24185238500

push

github

web-flow
Add RestoreHijackPrevention and RestoreSession interface stub (#4405)

* Add RestoreHijackPrevention and RestoreSession interface stub (RC-15, #4216)

Add the infrastructure needed to reconstruct hijack-prevention state from
Redis-persisted metadata, enabling cross-pod token validation in horizontal
scaling scenarios.

- security.go: Add RestoreHijackPrevention(), the restore counterpart to
  PreventSessionHijacking(). Rebuilds a hijackPreventionDecorator from
  persisted tokenHash + tokenSaltHex + hmacSecret without re-hashing a
  live token. Returns errors for nil session, missing salt on authenticated
  sessions, and invalid hex salt.

- factory.go: Add RestoreSession() to the MultiSessionFactory interface with
  full doc comment (backend ID parsing, session hint lookup, routing-table
  rebuild, hijack-prevention re-application). Add a stub implementation on
  defaultMultiSessionFactory (returns "not yet implemented"); full
  reconnection logic is deferred. Document the cross-replica HMAC secret
  consistency requirement on defaultHMACSecret.

- decorating_factory.go: Forward RestoreSession() to the base factory;
  decorators are not re-applied during restore.

- mocks/mock_factory.go: Regenerate mock to include RestoreSession().

- restore_test.go: Unit tests covering nil session, missing salt, invalid
  hex, anonymous session round-trip, authenticated store→restore→validate
  round-trip, and cross-replica secret mismatch.

Closes #4216.

* changes from rebase

---------

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

13 of 13 new or added lines in 3 files covered. (100.0%)

45 existing lines in 7 files now uncovered.

55580 of 85523 relevant lines covered (64.99%)

62.82 hits per line

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
0.57% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
2
73.63
-0.64% pkg/runner/config.go
2
82.81
-0.21% pkg/vmcp/composer/workflow_engine.go
2
71.43
-1.68% pkg/vmcp/k8s/manager.go
Jobs
ID Job ID Ran Files Coverage
1 24185238500.1 09 Apr 2026 10:30AM UTC 615
64.99
GitHub Action Run
Source Files on build 24185238500
  • Tree
  • List 615
  • Changed 13
  • Source Changed 3
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24185238500
  • 1f658a24 on github
  • Prev Build on main (#24184176203)
  • Next Build on main (#24187149224)
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