Skip to content

fix(auth): widen callback-relay registration budget and add transient retry#55

Closed
andomeder wants to merge 1 commit into
Noumena-Network:mainfrom
andomeder:fix/oauth-callback-relay-budget
Closed

fix(auth): widen callback-relay registration budget and add transient retry#55
andomeder wants to merge 1 commit into
Noumena-Network:mainfrom
andomeder:fix/oauth-callback-relay-budget

Conversation

@andomeder

Copy link
Copy Markdown
Contributor

The callback-relay registration POST ran with a 1000ms axios timeout,
shorter than a cold DNS+TLS handshake on a fresh process. After 3 attempts
a user saw "timeout of 1000ms exceeded" and pressed Enter repeatedly until
the socket warmed up.

Raise the budget to 5000ms and replace the linear 150*attempt loop with
withTransientRetry: 3 attempts, 200ms base, exponential backoff plus jitter.
The wrapper only retries transient errors (network failures, 5xx, 429) so
4xx responses fail fast.

Validation: bun test src/services/oauthServiceE2E.test.ts src/services/oauth/client.test.ts 18/18.

… retry

The 1s registration timeout was shorter than a cold DNS+TLS handshake on a
fresh process, producing a "timeout of 1000ms exceeded" loop on /login.
Bumped to 5s and replaced the linear retry withTransientRetry (3 attempts,
200ms exponential + jitter, transient-only).
@xjdr-noumena

Copy link
Copy Markdown
Contributor

Thanks for the fix. I took the same callback-relay timeout/retry direction and opened an upstream-owned replacement PR with additional retry-boundary tests: #60.

The extra test coverage pins:

  • timeout/network retry
  • 5xx retry
  • 429 retry
  • no retry for 400
  • no retry for non-Axios/programming errors

Validation on #60:

  • focused OAuth tests: 17 pass, 0 fail
  • bun run test:auth: 457 pass, 0 fail

I recommend treating #60 as the merge candidate and closing this PR once #60 lands.

@xjdr-noumena

Copy link
Copy Markdown
Contributor

Closed as superseded by #60, which keeps the same callback-relay retry direction but adds explicit retry/non-retry coverage and has passing CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants