Repository navigation
fix(auth): exclude local CLI providers from tokenHealthCheck expiration (Fixes #8407) - #8426
Conversation
…aper-inference#8407) Root cause: listing "devin-cli" as refresh-capable made tokenHealthCheck force-expire local CLI connections that never have a refresh token. Remove it from the explicit set (keep windsurf) and drop the health-check provider hardcode — the existing supportsTokenRefresh=false guard is enough.
|
Follow-up push (
Ready for review. |
|
Thanks for the clean fix and for following up with the root-cause version after the discussion on #8407 — this matches the approach we confirmed there (drop One thing we noticed while reviewing: |
4528fc4
into
cheaper-inference:release/v3.8.49
|
Merged into |
… to fit frozen file-size baseline The 3-line comment added by cheaper-inference#8426 pushed tokenHealthCheck.ts to 843 LOC, 2 over its frozen baseline of 841 (base-red on release/v3.8.49). Fold the devin-cli rationale into one line — same meaning, gate green again.
check:file-size fails on the pristine release/v3.8.49 tip (3070925), which takes the whole Fast Quality Gates job down for every PR against the branch. Both offenders grew after the last rebaseline (_rebaseline_2026_07_25_v3849_basered_filesize, measured at 36f8fd1) and both came from already-merged PRs, so there is no offending branch left to fix: src/lib/tokenHealthCheck.ts 841 -> 843 (cheaper-inference#8426, 4528fc4) src/app/(dashboard)/dashboard/providers/page.tsx 1927 -> 1990 (cheaper-inference#8349, 58ab8b1) Trust-but-verify: both values measured on the pristine tip with an empty working tree. Same situation and remedy as the entry cited above and as _rebaseline_2026_07_02_5798_release_green. This commit is deliberately last and self-contained: drop it if the captain would rather move the frozen values separately. Structural reduction of the 1990-line providers page is not attempted here. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
check:file-size fails on the pristine release/v3.8.49 tip (3070925), which takes the whole Fast Quality Gates job down for every PR against the branch. Both offenders grew after the last rebaseline (_rebaseline_2026_07_25_v3849_basered_filesize, measured at 36f8fd1) and both came from already-merged PRs, so there is no offending branch left to fix: src/lib/tokenHealthCheck.ts 841 -> 843 (#8426, 4528fc4) src/app/(dashboard)/dashboard/providers/page.tsx 1927 -> 1990 (#8349, 58ab8b1) Trust-but-verify: both values measured on the pristine tip with an empty working tree. Same situation and remedy as the entry cited above and as _rebaseline_2026_07_02_5798_release_green. This commit is deliberately last and self-contained: drop it if the captain would rather move the frozen values separately. Structural reduction of the 1990-line providers page is not attempted here. Co-authored-by: alexey.nazarov@softmg.ru <alexey.nazarov@softmg.ru> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…card highlight wiring (#8524) * chore(auth): condense #8407 note in tokenHealthCheck to fit frozen file-size baseline The 3-line comment added by #8426 pushed tokenHealthCheck.ts to 843 LOC, 2 over its frozen baseline of 841 (base-red on release/v3.8.49). Fold the devin-cli rationale into one line — same meaning, gate green again. * refactor(dashboard): extract provider card highlight into HighlightableProviderCard #8349 left the back-navigation highlight concern inline in providers/page.tsx (state + two callbacks + onCardClick/ref props repeated at 18 card call sites), pushing the page to 1990 LOC over its frozen baseline of 1927. Move the concern into a HighlightableProviderCard wrapper: each card instance keeps its own copy of the highlighted id and only the card whose provider id matches scrolls into view and highlights — same semantics as the single page-level state, since resolveHighlightedCard already gates on the id match. page.tsx drops to 1917 LOC (under the frozen baseline, no rebaseline needed). * test(dashboard): cover HighlightableProviderCard wiring Direct coverage for the wrapper extracted in the previous refactor: mount-time scroll+highlight only when history.state.providerId matches, no reaction on mismatch/null state, isolation across multiple card instances, and click-time navigation recording via history.replaceState. Note: the jsdom scrollIntoView shim is a plain no-op rather than a vi.fn() — vi.restoreAllMocks() would otherwise restore the shared mock and let the next test's spy inherit its accumulated call count.
…on (Fixes cheaper-inference#8407) (cheaper-inference#8426) * fix(providers): prevent health sweep from expiring devin-cli local credentials * fix(auth): drop devin-cli from supportsTokenRefresh explicit set (cheaper-inference#8407) Root cause: listing "devin-cli" as refresh-capable made tokenHealthCheck force-expire local CLI connections that never have a refresh token. Remove it from the explicit set (keep windsurf) and drop the health-check provider hardcode — the existing supportsTokenRefresh=false guard is enough.
…er-inference#8561) check:file-size fails on the pristine release/v3.8.49 tip (df69bd1), which takes the whole Fast Quality Gates job down for every PR against the branch. Both offenders grew after the last rebaseline (_rebaseline_2026_07_25_v3849_basered_filesize, measured at d61504d) and both came from already-merged PRs, so there is no offending branch left to fix: src/lib/tokenHealthCheck.ts 841 -> 843 (cheaper-inference#8426, 903ecfa) src/app/(dashboard)/dashboard/providers/page.tsx 1927 -> 1990 (cheaper-inference#8349, e62c217) Trust-but-verify: both values measured on the pristine tip with an empty working tree. Same situation and remedy as the entry cited above and as _rebaseline_2026_07_02_5798_release_green. This commit is deliberately last and self-contained: drop it if the captain would rather move the frozen values separately. Structural reduction of the 1990-line providers page is not attempted here. Co-authored-by: alexey.nazarov@softmg.ru <alexey.nazarov@softmg.ru> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…card highlight wiring (cheaper-inference#8524) * chore(auth): condense cheaper-inference#8407 note in tokenHealthCheck to fit frozen file-size baseline The 3-line comment added by cheaper-inference#8426 pushed tokenHealthCheck.ts to 843 LOC, 2 over its frozen baseline of 841 (base-red on release/v3.8.49). Fold the devin-cli rationale into one line — same meaning, gate green again. * refactor(dashboard): extract provider card highlight into HighlightableProviderCard cheaper-inference#8349 left the back-navigation highlight concern inline in providers/page.tsx (state + two callbacks + onCardClick/ref props repeated at 18 card call sites), pushing the page to 1990 LOC over its frozen baseline of 1927. Move the concern into a HighlightableProviderCard wrapper: each card instance keeps its own copy of the highlighted id and only the card whose provider id matches scrolls into view and highlights — same semantics as the single page-level state, since resolveHighlightedCard already gates on the id match. page.tsx drops to 1917 LOC (under the frozen baseline, no rebaseline needed). * test(dashboard): cover HighlightableProviderCard wiring Direct coverage for the wrapper extracted in the previous refactor: mount-time scroll+highlight only when history.state.providerId matches, no reaction on mismatch/null state, isolation across multiple card instances, and click-time navigation recording via history.replaceState. Note: the jsdom scrollIntoView shim is a plain no-op rather than a vi.fn() — vi.restoreAllMocks() would otherwise restore the shared mock and let the next test's spy inherit its accumulated call count.
…on (Fixes cheaper-inference#8407) (cheaper-inference#8426) * fix(providers): prevent health sweep from expiring devin-cli local credentials * fix(auth): drop devin-cli from supportsTokenRefresh explicit set (cheaper-inference#8407) Root cause: listing "devin-cli" as refresh-capable made tokenHealthCheck force-expire local CLI connections that never have a refresh token. Remove it from the explicit set (keep windsurf) and drop the health-check provider hardcode — the existing supportsTokenRefresh=false guard is enough.
…er-inference#8561) check:file-size fails on the pristine release/v3.8.49 tip (400757e), which takes the whole Fast Quality Gates job down for every PR against the branch. Both offenders grew after the last rebaseline (_rebaseline_2026_07_25_v3849_basered_filesize, measured at 75eb952) and both came from already-merged PRs, so there is no offending branch left to fix: src/lib/tokenHealthCheck.ts 841 -> 843 (cheaper-inference#8426, 35b6719) src/app/(dashboard)/dashboard/providers/page.tsx 1927 -> 1990 (cheaper-inference#8349, 17aed5f) Trust-but-verify: both values measured on the pristine tip with an empty working tree. Same situation and remedy as the entry cited above and as _rebaseline_2026_07_02_5798_release_green. This commit is deliberately last and self-contained: drop it if the captain would rather move the frozen values separately. Structural reduction of the 1990-line providers page is not attempted here. Co-authored-by: alexey.nazarov@softmg.ru <alexey.nazarov@softmg.ru> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…card highlight wiring (cheaper-inference#8524) * chore(auth): condense cheaper-inference#8407 note in tokenHealthCheck to fit frozen file-size baseline The 3-line comment added by cheaper-inference#8426 pushed tokenHealthCheck.ts to 843 LOC, 2 over its frozen baseline of 841 (base-red on release/v3.8.49). Fold the devin-cli rationale into one line — same meaning, gate green again. * refactor(dashboard): extract provider card highlight into HighlightableProviderCard cheaper-inference#8349 left the back-navigation highlight concern inline in providers/page.tsx (state + two callbacks + onCardClick/ref props repeated at 18 card call sites), pushing the page to 1990 LOC over its frozen baseline of 1927. Move the concern into a HighlightableProviderCard wrapper: each card instance keeps its own copy of the highlighted id and only the card whose provider id matches scrolls into view and highlights — same semantics as the single page-level state, since resolveHighlightedCard already gates on the id match. page.tsx drops to 1917 LOC (under the frozen baseline, no rebaseline needed). * test(dashboard): cover HighlightableProviderCard wiring Direct coverage for the wrapper extracted in the previous refactor: mount-time scroll+highlight only when history.state.providerId matches, no reaction on mismatch/null state, isolation across multiple card instances, and click-time navigation recording via history.replaceState. Note: the jsdom scrollIntoView shim is a plain no-op rather than a vi.fn() — vi.restoreAllMocks() would otherwise restore the shared mock and let the next test's spy inherit its accumulated call count.
Summary
Fixes #8407
devin-cliis a local import-token / CLI-owned provider (devin auth login). It never carries a refresh token, but it was listed insupportsTokenRefresh()'sexplicitlySupportedset. That made the token health sweep treat it as refresh-capable and write terminaltestStatus="expired"/errorCode="no_refresh_token", after which routing failed withNo active credentials for provider: devin-cli.Changes
"devin-cli"fromexplicitlySupportedinopen-sse/services/tokenRefresh.ts(keepwindsurf). The existingsupportsTokenRefresh=falseguard intokenHealthCheckthen skips the expiry write.tokenHealthCheck— one source of truth is enough.supportsTokenRefresh("devin-cli") === false, and thatcheckConnectionleaves a no-refresh-tokendevin-cliconnectionactive.Test plan
node --import tsx --test tests/unit/token-health-check-devin-cli-8407.test.ts→ 2/2 passactive/ routableRelated
unsupported) — kept separate.