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

stacklok / toolhive / 40724487955
73%

Build:
DEFAULT BRANCH: main
Ran 28 Oct 2026 04:26PM UTC
Jobs 1
Files 985
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

28 Oct 2026 04:17PM UTC coverage: 71.971% (-0.01%) from 71.984%
40724487955

push

github

web-flow
Add exchange grant storage with memory backend (#6968)

* Add exchange grant storage interface

Refresh tokens issued through RFC 8693 token exchange need a server-side
record that can be revoked and that tracks which grant a child came from.
Add the ExchangeGrant record, its Live check (revoked wins over expired),
the ErrRevoked sentinel, and an ExchangeGrantStorage capability interface
with its contract for atomic create, lookup, and idempotent revocation.
The interface is not embedded in Storage, so backends opt in. Backends
arrive in later steps, so nothing uses the interface yet.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Add memory exchange grant storage

The in-memory backend needs to hold exchange grant records so the
token exchange handlers can issue and revoke refresh tokens without a
Redis dependency in single-process deployments.

MemoryStorage now implements ExchangeGrantStorage. Create checks the
signature and the (issuer, jti) replay key first, then writes the record
and marker under one lock, so a failed call leaves nothing behind.
Records are copied in and out, and the existing cleanup loop removes
them after ExpiresAt and markers after SourceExpiresAt. Markers live in
their own map and store the grant signature.

A backend-agnostic contract suite covers replay, atomicity, revocation,
expiry and copy semantics, and will be reused for the Redis backend.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Validate exchange grant shape and expiry

The CreateExchangeGrant contract says a top-level grant sets its source
and a child does not, and that a failed call writes nothing. Memory
enforced neither: a grant with no parent and no source was stored with
no replay marker, a child could consume a jti, and a grant already past
ExpiresAt was accepted after writing its marker, so a corrected retry
got ErrJTIKnown.

Move the checks into validateExchangeGrantShape, shared by every
backend, and add the parent/source exclusive-or, a required Ex... (continued)

106 of 139 new or added lines in 3 files covered. (76.26%)

23 existing lines in 6 files now uncovered.

90363 of 125554 relevant lines covered (71.97%)

130.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
31
44.2
-1.55% pkg/authserver/storage/mocks/mock_storage.go
2
97.62
-0.9% pkg/authserver/storage/types.go

Coverage Regressions

Lines Coverage ∆ File
6
19.87
-3.97% pkg/client/manager.go
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
4
59.21
-0.21% pkg/workloads/manager.go
3
83.52
-0.17% pkg/authserver/storage/redis.go
3
64.29
-21.43% pkg/authserver/upstream/tokens.go
1
81.58
-0.12% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 40724487955.1 28 Oct 2026 04:26PM UTC 985
71.97
GitHub Action Run
Source Files on build 40724487955
  • Tree
  • List 985
  • Changed 9
  • Source Changed 3
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40724487955
  • f6ccbf7f on github
  • Prev Build on main (#40708795032)
  • Next Build on main (#40747333128)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc