Skip to content

feat(toolkit-core): Share the API transport with the CLI - #1719

Merged
BYK merged 1 commit into
mainfrom
feat/toolkit-core-api-transport
Oct 29, 2026
Merged

BYK merged 1 commit into
mainfrom
feat/toolkit-core-api-transport

feat(toolkit-core): Share the API transport with the CLI

f430f9d
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Oct 29, 2026 in 0s

1 issue

code-review: Found 1 issue (1 medium)

Medium

401 credential refresh consumes api-retry attempt budget - `packages/toolkit-core/src/api-transport.ts:478-494`

A 401 refresh is gated on attempt < retry.maxRetries and reuses the same attempt counter as transient retries, so an expired-token refresh leaves one fewer 5xx/timeout retry and starts backoff at the next step. Gate refresh only on !refreshed and keep that replay out of the retry budget.


⏱ 24m 12s · 16.5M in / 362.2k out · $9.65

Annotations

Check warning on line 494 in packages/toolkit-core/src/api-transport.ts

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

401 credential refresh consumes api-retry attempt budget

A 401 refresh is gated on `attempt < retry.maxRetries` and reuses the same attempt counter as transient retries, so an expired-token refresh leaves one fewer 5xx/timeout retry and starts backoff at the next step. Gate refresh only on `!refreshed` and keep that replay out of the retry budget.