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

stacklok / toolhive / 33531463669
70%

Build:
DEFAULT BRANCH: main
Ran 01 Sep 2026 04:30PM UTC
Jobs 1
Files 904
Run time 2min
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

01 Sep 2026 04:23PM UTC coverage: 69.783% (+0.05%) from 69.732%
33531463669

push

github

web-flow
fix(authserver): scope upstream-token callback cleanup to the chain's providers (#6476)

* fix(authserver): scope upstream-token callback cleanup to the chain's providers

The /oauth/callback error paths cleaned up "the tokens this authorization
collected" by calling the session-wide DeleteUpstreamTokens(ctx, sessionID),
which removes every provider row under that session. That is correct for the
native (session, provider) storage scheme, where each authorization mints its
own session.

It is wrong under a storage decorator that re-keys upstream tokens by
(gateway, user) so a session-independent caller (e.g. a user-facing UI) can
find a user's tokens. Under that scheme every one of a user's connector tokens
shares the session slot, so a session-wide delete on any failing login leg
deletes the user's entire connector set — a transient Directory/storage blip on
the most-traversed leg (chain resolution) wipes a user's whole historical token
set, and correlated failures widen that to every user logging in during the
window. It fails safe (never grants access) and is largely self-healing, but the
availability hit is real.

The callback is the only production caller of the session-wide delete, so:

- Route all nine callback cleanup sites through a new cleanupUpstreamTokens
  helper that deletes per provider via DeleteUpstreamTokensForProvider (already
  on the storage interface, implemented by memory and redis), sourcing the
  provider list from the chain config — never a storage read, which a
  broadening decorator cannot scope. Sites with the resolved chain pass it;
  pre-resolve sites pass pending.ChainUpstreams plus the current leg.
- A user-keyed decorator can now scope each delete to exactly this chain's
  providers, so a connector outside the chain is never touched.

Behavior note: a stale subsequent-leg pending with no ChainUpstreams can only
name the leg just processed; an earlier leg it cannot name is left to expire by
TTL rather than risk a sessi... (continued)

22 of 23 new or added lines in 1 file covered. (95.65%)

22 existing lines in 7 files now uncovered.

76703 of 109917 relevant lines covered (69.78%)

91.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
92.54
5.57% pkg/authserver/server/handlers/callback.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
5
56.93
0.51% pkg/authserver/storage/mocks/mock_storage.go
3
96.18
-0.57% pkg/authz/authorizers/cedar/core.go
3
61.43
-4.29% pkg/state/runconfig.go
2
87.77
-0.27% pkg/transport/proxy/transparent/transparent_proxy.go
2
63.89
4.47% pkg/workloads/manager.go
1
80.59
0.59% pkg/vmcp/cli/embedding_manager.go
Jobs
ID Job ID Ran Files Coverage
1 33531463669.1 01 Sep 2026 04:30PM UTC 904
69.78
GitHub Action Run
Source Files on build 33531463669
  • Tree
  • List 904
  • Changed 9
  • Source Changed 1
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33531463669
  • 5250f41f on github
  • Prev Build on main (#33511308889)
  • Next Build on main (#33575220040)
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