roboto.domain.triggers.dry_run
Wire models for the trigger dry-run endpoint (POST /v1/triggers/id/{id}/dry-run).
A dry run answers “would this trigger fire for this event, and if not, why not” by replaying the evaluator’s gates in order — subscribed, enabled, condition, target prefilter, already fired — against current platform state, without claiming a dispatch slot or running any target. The response is the structured trace the web UI’s “Test this trigger” stepper and the CLI’s dry-run command render.
Module Contents
ConditionLeafTrace
Bases: pydantic.BaseModel
One leaf of the trigger’s condition, with the actual value it saw.
Parameters
data AnyAttributes
ConditionLeafTrace.actual
The value the event’s namespace resolved for field; None when the field did not resolve (missing entity, missing key).
DispatchSlotTrace
Bases: pydantic.BaseModel
The state of one target’s dispatch slot at the dry run’s idempotency token.
Parameters
data AnyAttributes
DispatchSlotTrace.occupied
Whether a dispatch row occupies the slot (the trigger already fired here).
DispatchSlotTrace.result_ref
What the occupying dispatch produced (invocation id, thread id, Slack ts).
DispatchSlotTrace.status
The occupying dispatch’s status, when one exists.
TargetAcceptanceTrace
Bases: pydantic.BaseModel
One target’s prefilter decision.
Parameters
data AnyAttributes
TargetAcceptanceTrace.reason
Why the target declined, where determinable (e.g. which required-input pattern had no matching file). None when accepted or when no finer reason is known.
TargetAcceptanceTrace.target_type
Kind of target.
TriggerDryRunGate
Bases: pydantic.BaseModel
One gate’s result in a dry-run trace.
condition_leaves is populated only on the condition gate, targets only on target_prefilter, and idempotency_token/dispatches only on already_fired.
Parameters
data AnyAttributes
TriggerDryRunGate.condition_leaves
Per-leaf results with actual values (condition gate only).
TriggerDryRunGate.dispatches
Per-target dispatch-slot state at the token (already_fired gate only).
TriggerDryRunGate.idempotency_token
The dedup token the event projects onto (already_fired gate only).
TriggerDryRunGate.status
Whether the gate passed, failed, or was short-circuited.
TriggerDryRunGate.targets
Per-target prefilter decisions (target_prefilter gate only).
TriggerDryRunGateName
Bases: roboto.compat.StrEnum
The gates the evaluator runs, in evaluation order.
Attributes
TriggerDryRunGateName.AlreadyFired
Is a dispatch slot still claimable at the trigger’s once_per?
TriggerDryRunGateName.Condition
Does the trigger’s condition hold for the event?
TriggerDryRunGateName.Subscribed
Is the trigger subscribed to the event’s type?
TriggerDryRunGateName.TargetPrefilter
Does at least one target accept the event (pathspec and precondition gates)?
TriggerDryRunGateStatus
TriggerDryRunRequest
Bases: pydantic.BaseModel
Request payload for a trigger dry run.
Provide event (a fully-formed platform event to evaluate) or a single reference (dataset_id, file_id, invocation_id, event_id, or scheduled_for), from which the server synthesizes an event. With an entity reference, event_type optionally picks which of the trigger’s subscribed event types to synthesize; the default is the trigger’s first subscribed event type compatible with the reference. A schedule-fired trigger needs no reference: the server synthesizes its next scheduled minute.
Parameters
data AnyAttributes
TriggerDryRunRequest.dataset_id
Synthesize an event about this dataset.
TriggerDryRunRequest.event
A platform event to evaluate as-is.
TriggerDryRunRequest.event_id
Synthesize a platform event about this event (the annotation on your data).
TriggerDryRunRequest.event_type
Which subscribed event type to synthesize for an entity reference.
TriggerDryRunRequest.invocation_id
Synthesize an event about this invocation.
TriggerDryRunRequest.scheduled_for
For a schedule-fired trigger: synthesize the occurrence for this scheduled minute (UTC). With no reference at all, a schedule-fired trigger is dry-run for its next scheduled minute.
TriggerDryRunResponse
Bases: pydantic.BaseModel
The structured trace a trigger dry run produces.
Gates appear in evaluation order. The first failed gate is why the trigger would not fire; every gate after it is not_evaluated.
Parameters
data AnyAttributes
TriggerDryRunResponse.event_type
Type of the (given or synthesized) event that was evaluated.
TriggerDryRunResponse.gates
The gate-by-gate trace, in evaluation order.
TriggerDryRunResponse.would_fire
Whether the trigger would dispatch at least one target for this event.