import type { Retry } from "@renderinc/sdk/workflows"; import { type HttpRetryOptions } from "@render-lab/tasks-core"; /** * Retry policy for the Render API — covers transient 5xx, rate limits, and * network blips on the fire/read verbs (`triggerDeploy`, `scaleService`, * `suspendService`, `resumeService`, `getService`). Backoff over ~1s, 2s, 4s. * Vendor retries are off, so this is the single source of truth (ADR-0005). * * Note: `triggerDeploy` is NOT idempotent — a retry after a network failure can * kick a second deploy. Render coalesces concurrent deploys of the same commit, * but where exactness matters, trigger once and use `render.awaitDeploy` (its own * task) to wait, rather than relying on this retry to re-fire the trigger. */ export declare const RENDER_RETRY: Retry; /** * Bounded in-process backoff for the shared Render HTTP client — a rate-limit * (429) or transient 5xx is absorbed here, honoring `Retry-After` (else * exponential backoff with jitter over ~0.5s, 1s, 2s, 4s), before the durable * task retry ever re-dispatches. * * Why this exists alongside the durable {@link RENDER_RETRY} (a bounded * exception to ADR-0005, recorded in ADR-0025): the Render control plane * rate-limits a whole *workspace*. When a provision poll re-dispatches every 15s * and re-fires a `/services` request that 429s, the retries *sustain* the limit * — it never recovers within a run (the production storm this fixes). Clearing * the burst in-process lets the window recover; capping at `maxRetries` keeps it * from becoming an unbounded hidden loop, so the durable policy still owns the * long tail. Applied client-wide, so `ensureService`, `getDeploy`, * `triggerDeploy`, etc. all benefit. Vendor retries stay off (ADR-0005). */ export declare const RENDER_HTTP_BACKOFF: HttpRetryOptions; /** * Durable "wait until a deploy is live/failed" policy for `render.awaitDeploy`. * SDK 0.6.0 has no native sleep/await, so the task polls by throwing and this * fixed-interval retry re-runs it — every 15s for up to ~30m (120 attempts). * A read-only poll, so re-running the whole task is safe. */ export declare const AWAIT_DEPLOY_RETRY: Retry; /** * Durable "create a data primitive / private service, then wait until ready" * policy for `render.provisionPostgres`, `render.provisionKeyValue`, and * `render.createPrivateService`. Every 15s for up to ~20m (80 attempts). * * The create is made idempotent by `name` (find-or-create), so re-running the * whole task while it polls does NOT provision a duplicate — it finds the * in-flight resource and keeps waiting. */ export declare const PROVISION_RETRY: Retry; //# sourceMappingURL=retry.d.ts.map