Skip to content
← All rules
ResourcesRetries

resources/require-retry-time-budget

Retries need a total elapsed deadline or inherited deadline-backed context; attempt limits and arbitrary cancellation signals are not total budgets.

retrydeadlinetimeout
TypeScript
await retry(request, { attempts: 5 });
Finding

Require an overall deadline for retry work.

Setup

Install the package, register its plugin factory, then enable the rule.

Install the package

pnpm add -D @scruple/resources

Register the plugin

In scruple.config.ts, register the factory under the resources namespace used by the rule ID.

import { resources } from "@scruple/resources";

plugins: {
  "resources": resources(),
},

Enable the rule

"resources/require-retry-time-budget": "warn"
Package
@scruple/resources
Default threshold
Plugin default
Minimum confidence
Plugin default

Released under the MIT License.