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

stacklok / toolhive / 45644636220
75%

Build:
DEFAULT BRANCH: main
Ran 25 Nov 2026 03:34PM UTC
Jobs 1
Files 1067
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

25 Nov 2026 03:23PM UTC coverage: 74.168% (-0.004%) from 74.172%
45644636220

push

github

web-flow
Make Redis per-provider upstream delete atomic (#7303)

DeleteUpstreamTokensForProvider ran GET, DEL and two SREMs as separate
commands. A write to the same row landing between the DEL and the SREMs
left a live row missing from the session index and the user set, so
GetAllUpstreamTokens, GetLatestUpstreamTokensForUser and DeleteUser
could not see it until the next write. Writes were already atomic Lua
scripts; the delete was the odd one out.

Replace the sequence with one Lua script that reads the stored user ID,
deletes the row and removes it from both index sets. Rows with no
usable user ID (placeholder, undecodable, empty or null user_id) are
still deleted and removed from the session index. Any Redis error now
fails the call instead of being logged.

The script checks that both index keys are sets (or absent) before
changing anything and fails with WRONGTYPE otherwise. Redis does not
roll back a script that errors partway, and the row is the only record
of which user set to clean up, so deleting it first would leave a stale
user-set member that DeleteUser later trusts.

Tests cover both index sets, the unusable-row cases, a wrong-type
index key on each side, and a go-redis hook that stores the row under
another user right after any standalone command on it. The hook fails
on the old implementation and on one that reads the owner before the
script, and never fires on the script itself.

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

5 of 5 new or added lines in 1 file covered. (100.0%)

11 existing lines in 5 files now uncovered.

100349 of 135299 relevant lines covered (74.17%)

869.35 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
84.32
0.03% pkg/authserver/storage/redis.go
3
64.29
-21.43% pkg/authserver/upstream/tokens.go
2
91.94
-1.61% pkg/vmcp/aggregator/caching_aggregator.go
2
59.63
0.0% pkg/workloads/manager.go
1
96.77
-3.23% pkg/foreach/foreach.go
Jobs
ID Job ID Ran Files Coverage
1 45644636220.1 25 Nov 2026 03:34PM UTC 1067
74.17
GitHub Action Run
Source Files on build 45644636220
  • Tree
  • List 1067
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45644636220
  • 8eccc0f2 on github
  • Prev Build on main (#45641696927)
  • Next Build on main (#45662930464)
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