Before you start
Use Node.js 20.20.0+. The helper uses built-infetch, AbortSignal.timeout, and timers;
no StateSet SDK or hosted credentials are needed to run the regression tests in this repository.
For a live read, select a provisioned host and an appropriately scoped key from the
API directory.
Save the retry helper
Save this asrate-limit.mjs. The function makes at most maxAttempts requests, bounds each
request’s timeout, and refuses a server delay larger than maxWaitMs instead of retrying early.
The limits are application policy, not StateSet plan limits.
5xx, parsing service error bodies, or retrying mutations. Add those only
with operation-specific tests and a documented replay policy.
Call one read endpoint
Save this asread-agents.mjs beside the helper:
200 and prints a count. A count of zero is valid for an
empty workspace. An exhausted retry budget throws; it does not return a fabricated empty list.
Verify failure behavior
From this documentation repository, run:Operate under sustained load
One helper call controls only its own attempts. Coordinate concurrency across workers sharing a tenant or API key, bound queue length, and record throttle counts and wait times. When a read is deferred, retain its job identity so a worker can resume it intentionally.
Continue with the integration test plan before enabling
retries in production.