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

lsm / neokai / 26801534950
82%

Build:
DEFAULT BRANCH: dev
Ran 02 Jun 2026 06:00AM UTC
Jobs 28
Files 583
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

02 Jun 2026 06:00AM UTC coverage: 82.717% (-0.1%) from 82.866%
26801534950

push

github

web-flow
fix(codex-auth): stale token refresh, re-add after removal, logout/login cycle (#2052)

* fix(codex-auth): stale token refresh, re-add after removal, logout/login cycle

Three related fixes for the OpenAI Codex provider auth flow:

1. **Stale OAuth token**: When token refresh fails (invalid/revoked refresh
token), clear stale credentials via logout() so the user is prompted to
re-authenticate instead of getting repeated 401s.

2. **Cannot re-add provider after removal**: Built-in providers were
unregistered on delete but never re-registered on re-add. Now
initializeProviders() is called in auth.login and syncProviderToRegistry
to restore missing core providers to the registry.

3. **Logout button broken flow**: ProviderCredentialManager.removeCredentials
was updating auth_type to 'none', causing the UI to show "No authentication
required" instead of a Login button after logout. Removed the auth_type
mutation so the provider's required auth type is preserved.

Tests added/updated for all three fixes.

* fix(codex-auth): address review feedback on refresh, re-register, logout

1. Distinguish transient vs definitive token refresh failures:
   - refreshCodexToken now returns CodexRefreshResult with a `definitive` flag
   - 4xx errors (except 408/429) = definitive (invalid/revoked token)
   - 5xx, 429, network errors = transient (preserve credentials)
   - Only clear credentials on definitive failures

2. Re-register only the provider being restored:
   - Added registerBuiltInProvider(factory) that registers a single provider by ID
   - Used in auth.login and syncProviderToRegistry instead of initializeProviders()
   - Prevents deleted providers from being resurrected when unrelated built-ins are added

3. Remove persisted stale credential rows:
   - auth.refresh now calls credentialManager.removeCredentials() on definitive failure
   - auth.logout now always calls removeCredentials() after provider.logout()
   - syncProviderToRegistry skips applying store... (continued)

9896 of 14446 branches covered (68.5%)

Branch coverage included in aggregate %.

55 of 106 new or added lines in 4 files covered. (51.89%)

208 existing lines in 1 file now uncovered.

82884 of 97719 relevant lines covered (84.82%)

296.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
66.82
-9.14% packages/daemon/src/lib/providers/factory.ts
18
8.8
-89.82% packages/daemon/src/lib/rpc-handlers/auth-handlers.ts
5
56.67
17.71% packages/daemon/src/lib/providers/provider-sync.ts

Coverage Regressions

Lines Coverage ∆ File
208
8.8
-89.82% packages/daemon/src/lib/rpc-handlers/auth-handlers.ts
Jobs
ID Job ID Ran Files Coverage
1 daemon-4-space-migrations-b - 26801534950.1 02 Jun 2026 06:01AM UTC 44
59.96
GitHub Action Run
2 daemon-5-space-runtime-a - 26801534950.2 02 Jun 2026 06:00AM UTC 117
40.26
GitHub Action Run
3 daemon-5-space-runtime-b - 26801534950.3 02 Jun 2026 06:01AM UTC 166
44.4
GitHub Action Run
4 daemon-online-agent-sdk - 26801534950.4 02 Jun 2026 06:01AM UTC 334
22.66
GitHub Action Run
5 daemon-online-sdk - 26801534950.5 02 Jun 2026 06:01AM UTC 334
22.67
GitHub Action Run
6 daemon-online-convo - 26801534950.6 02 Jun 2026 06:01AM UTC 334
22.56
GitHub Action Run
7 daemon-online-websocket - 26801534950.7 02 Jun 2026 06:01AM UTC 334
18.61
GitHub Action Run
8 daemon-online-rpc-3 - 26801534950.8 02 Jun 2026 06:01AM UTC 334
20.12
GitHub Action Run
9 daemon-4-space-storage - 26801534950.9 02 Jun 2026 06:01AM UTC 152
55.87
GitHub Action Run
10 daemon-online-features-1 - 26801534950.10 02 Jun 2026 06:01AM UTC 334
23.44
GitHub Action Run
11 web - 26801534950.11 02 Jun 2026 06:02AM UTC 239
73.8
GitHub Action Run
12 daemon-5-space-agent-other - 26801534950.12 02 Jun 2026 06:01AM UTC 260
27.19
GitHub Action Run
13 daemon-online-git - 26801534950.13 02 Jun 2026 06:01AM UTC 334
19.49
GitHub Action Run
14 daemon-online-rewind-2 - 26801534950.14 02 Jun 2026 06:01AM UTC 334
23.26
GitHub Action Run
15 daemon-online-rpc-2 - 26801534950.15 02 Jun 2026 06:02AM UTC 334
23.81
GitHub Action Run
16 daemon-online-coordinator - 26801534950.16 02 Jun 2026 06:01AM UTC 323
7.77
GitHub Action Run
17 daemon-online-lifecycle - 26801534950.17 02 Jun 2026 06:01AM UTC 334
23.07
GitHub Action Run
18 daemon-online-rpc-1 - 26801534950.18 02 Jun 2026 06:01AM UTC 334
19.73
GitHub Action Run
19 daemon-online-features-2 - 26801534950.19 02 Jun 2026 06:01AM UTC 334
23.0
GitHub Action Run
20 daemon-online-space-2 - 26801534950.20 02 Jun 2026 06:02AM UTC 334
32.88
GitHub Action Run
21 daemon-4-space-migrations-a - 26801534950.21 02 Jun 2026 06:01AM UTC 69
38.51
GitHub Action Run
22 daemon-online-rewind-1 - 26801534950.22 02 Jun 2026 06:01AM UTC 334
22.81
GitHub Action Run
23 daemon-online-rpc-4 - 26801534950.23 02 Jun 2026 06:02AM UTC 334
23.64
GitHub Action Run
24 daemon-0-shared-handlers-workflow - 26801534950.24 02 Jun 2026 06:01AM UTC 166
62.61
GitHub Action Run
25 daemon-1-core - 26801534950.25 02 Jun 2026 06:01AM UTC 340
36.35
GitHub Action Run
26 daemon-online-space-1 - 26801534950.26 02 Jun 2026 06:01AM UTC 334
33.96
GitHub Action Run
27 daemon-online-components - 26801534950.27 02 Jun 2026 06:01AM UTC 334
18.51
GitHub Action Run
28 daemon-online-mcp - 26801534950.28 02 Jun 2026 06:00AM UTC 334
18.87
GitHub Action Run
Source Files on build 26801534950
  • Tree
  • List 583
  • Changed 6
  • Source Changed 5
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26801534950
  • db9cf46e on github
  • Prev Build on dev (#26801282614)
  • Next Build on dev (#26826748007)
  • Delete
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