Skip to content

fix(sdk): preserve repeatUntilOk retry results - #1156

Open
zakazaka95 wants to merge 1 commit into
relayprotocol:mainfrom
zakazaka95:fix/repeat-until-ok-result
Open

zakazaka95 wants to merge 1 commit into
relayprotocol:mainfrom
zakazaka95:fix/repeat-until-ok-result

Conversation

@zakazaka95

Copy link
Copy Markdown

Motivation

repeatUntilOk returns true when the first callback succeeds, but resolves to undefined if success comes after a retry. The recursive call is awaited without returning its result. This helper is exported from the SDK.

Changes

  • Return the recursive result, with an explicit return type for strict TypeScript inference.
  • Add seven fake-timer tests covering immediate and later success, the default interval, exhausted attempts, and callback rejection. Retry timing, limits and errors are unchanged.
  • Add an SDK patch changeset.

Related to #1150, which fixes the separate pollApi helpers. This change does not modify those functions or their tests.

Validation

  • Before the fix: 3 new regressions fail, 4 cases pass.
  • Complete SDK suite: 107 tests pass in 12 files.
  • SDK typecheck, CJS/ESM/declaration builds, scoped Prettier, changeset lint and git diff --check pass.

Tested on Windows with Node 24.14.0 and pnpm 10.33.0. UI/hooks lint and the full monorepo build were not run; this patch only changes the SDK helper, its tests and its changeset. No live transactions were sent.

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@zakazaka95 is attempting to deploy a commit to the Uneven Labs Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Fixes repeatUntilOk so success after a retry returns true instead of undefined.

  • repeatUntilOk returns success from any attempt.

No actionable issues found. Retry limits, delays, and errors remain unchanged. Tests were reviewed but not run.

Reviews (1) · Last reviewed commit: "fix(sdk): preserve repeatUntilOk retry r..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

1 participant