Skip to content

improvement(oauth): coalesce token refresh + cache terminal failures #17388

improvement(oauth): coalesce token refresh + cache terminal failures

improvement(oauth): coalesce token refresh + cache terminal failures #17388

Triggered via pull request May 21, 2026 22:57
Status Failure
Total duration 1m 56s
Artifacts

ci.yml

on: pull_request
Detect Version
Detect Version
Test and Build  /  Test and Build
1m 47s
Test and Build / Test and Build
Check Docs Changes
Check Docs Changes
Matrix: Build Dev ECR
Matrix: Build ARM64 (GHCR Only)
Matrix: Build AMD64
Migrate Dev DB  /  Apply Database Migrations
Migrate Dev DB / Apply Database Migrations
Matrix: Create GHCR Manifests
Process Docs  /  Process Documentation Embeddings
Process Docs / Process Documentation Embeddings
Create GitHub Release
Create GitHub Release
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 9 warnings
Test and Build / Test and Build
Process completed with exit code 1.
app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshAccessTokenIfNeeded > should return null if refresh fails: apps/sim/app/api/auth/oauth/utils.ts#L385
TypeError: Cannot read properties of null (reading 'ok') ❯ onLeader app/api/auth/oauth/utils.ts:385:21 ❯ withLeaderLock lib/concurrency/leader-lock.ts:64:14 ❯ lib/concurrency/singleflight.ts:22:14 ❯ Module.refreshAccessTokenIfNeeded app/api/auth/oauth/utils.ts:549:19 ❯ app/api/auth/oauth/utils.test.ts:242:21
app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshAccessTokenIfNeeded > should refresh token when expired: apps/sim/app/api/auth/oauth/utils.test.ts#L209
AssertionError: expected "spy" to be called at least once ❯ app/api/auth/oauth/utils.test.ts:209:29
app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshTokenIfNeeded > should handle refresh token error: apps/sim/app/api/auth/oauth/utils.test.ts#L135
AssertionError: expected [Function] to throw error including 'Failed to refresh token' but got 'Cannot read properties of null (readi…' Expected: "Failed to refresh token" Received: "Cannot read properties of null (reading 'ok')" ❯ app/api/auth/oauth/utils.test.ts:135:7
app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshTokenIfNeeded > should refresh token when expired: apps/sim/app/api/auth/oauth/utils.ts#L628
Error: Failed to refresh token ❯ Module.refreshTokenIfNeeded app/api/auth/oauth/utils.ts:628:9 ❯ app/api/auth/oauth/utils.test.ts:117:22
Test and Build / Test and Build
sim#test: command (/home/runner/_work/sim/sim/apps/sim) /home/runner/.bun/bin/bun run test exited (1)
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
Test and Build / Test and Build
- Step: unknown (failed)
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
Test and Build / Test and Build
- Step: unknown (failed)
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
Test and Build / Test and Build
- Step: unknown (failed)
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps