Skip to content
PACKAGES

evaluateFixedWindowRateLimitTransition()

Evaluate one D650 fixed-window-v1 transition.

This synchronous pure calculator owns no clock, store, transaction, receipt, outcome id, effect, Graph node, I/O, timer, polling, retry, or scheduler. A null state means the host has already confirmed first initialization inside its atomic authority boundary.

Durable hosts must order work as: strict request and identity; receipt lookup; identical material returns the stored outcome without reading time or evaluating; different material conflicts; resolve the exact policy; load exact scoped state; acquire authoritative observedAtMs; evaluate; atomically persist nextState and the outcome receipt.

import { evaluateFixedWindowRateLimitTransition } from "@graphrefly/ts/rate-limit";
function evaluateFixedWindowRateLimitTransition(value: unknown): FixedWindowRateLimitTransition
ParameterTypeDescription
valueunknownStrict fixed-window request, policy, state, and supplied observation input.

One immutable ready transition with exact nextState.

import { evaluateFixedWindowRateLimitTransition } from "@graphrefly/ts/rate-limit";

packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts