The tmax guard checks how much time remains in the OpenRTBDocumentation Index
Fetch the complete documentation index at: https://docs.pecta.ai/llms.txt
Use this file to discover all available pages before exploring further.
tmax window before running any other gate. If the remaining budget falls below a configurable threshold, it returns skipped: true and — because the engine runs fail-fast — all subsequent gates are bypassed. This keeps your gate pipeline from doing meaningful work on a bid that has already missed its serve deadline.
Usage
Place
tmaxGuard first in every RTB gate list. It is the only gate designed to short-circuit the entire pipeline on deadline exhaustion.Options
The minimum number of milliseconds that must remain in the
tmax window for downstream gates to run. If the remaining budget is less than this value, the gate returns skipped: true. Defaults to 15.Override the gate’s name in evaluation results and telemetry.
Required context fields
The gate reads two fields fromEvaluationContext. If either is absent, the gate passes through silently — it cannot enforce a deadline it cannot measure.
Date.now() - startedAt at the moment it runs, then checks whether tmaxMs - elapsed < bufferMs.
What “skipped” means
Askipped result is not a failure. The gate result looks like this:
When context fields are missing
IftmaxMs or startedAt is not a number on the context, the gate returns: