---
sidebar:
  hidden: true
title: 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

```python
class roboto.domain.triggers.dry_run.ConditionLeafTrace(/, **data: Any)
```

`from roboto.domain.triggers import ConditionLeafTrace`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L61-L78)

Bases: `pydantic.BaseModel`

One leaf of the trigger's condition, with the actual value it saw.

**Parameters**

- **data** (`Any`)

**Attributes**

- **ConditionLeafTrace.actual** (`Any | None`) = `None`: The value the event's namespace resolved for [`field`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.ConditionLeafTrace.field); `None` when the field did not resolve (missing entity, missing key).
- **ConditionLeafTrace.comparator** (`roboto.query.Comparator`): The leaf's comparator.
- **ConditionLeafTrace.expected** (`Any | None`) = `None`: The value the condition compares against.
- **ConditionLeafTrace.field** (`str`): The condition field, as stored on the trigger.
- **ConditionLeafTrace.passed** (`bool`): Whether this leaf held for the event.

### DispatchSlotTrace

```python
class roboto.domain.triggers.dry_run.DispatchSlotTrace(/, **data: Any)
```

`from roboto.domain.triggers import DispatchSlotTrace`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L98-L111)

Bases: `pydantic.BaseModel`

The state of one target's dispatch slot at the dry run's idempotency token.

**Parameters**

- **data** (`Any`)

**Attributes**

- **DispatchSlotTrace.occupied** (`bool`): Whether a dispatch row occupies the slot (the trigger already fired here).
- **DispatchSlotTrace.result_ref** (`str | None`) = `None`: What the occupying dispatch produced (invocation id, thread id, Slack ts).
- **DispatchSlotTrace.status** (`roboto.domain.triggers.dispatch.TriggerDispatchStatus | None`) = `None`: The occupying dispatch's status, when one exists.
- **DispatchSlotTrace.target_id** (`str`): The target within the trigger.

### TargetAcceptanceTrace

```python
class roboto.domain.triggers.dry_run.TargetAcceptanceTrace(/, **data: Any)
```

`from roboto.domain.triggers import TargetAcceptanceTrace`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L81-L95)

Bases: `pydantic.BaseModel`

One target's prefilter decision.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TargetAcceptanceTrace.accepted** (`bool`): Whether the target's `accepts` prefilter passed.
- **TargetAcceptanceTrace.reason** (`str | None`) = `None`: 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_id** (`str`): The target within the trigger.
- **TargetAcceptanceTrace.target_type** (`roboto.domain.triggers.targets.TriggerTargetType`): Kind of target.

### TriggerDryRunGate

```python
class roboto.domain.triggers.dry_run.TriggerDryRunGate(/, **data: Any)
```

`from roboto.domain.triggers import TriggerDryRunGate`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L114-L141)

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** (`Any`)

**Attributes**

- **TriggerDryRunGate.condition_leaves** (`list[ConditionLeafTrace] | None`) = `None`: Per-leaf results with actual values (`condition` gate only).
- **TriggerDryRunGate.detail** (`str | None`) = `None`: Plain-English explanation of the outcome.
- **TriggerDryRunGate.dispatches** (`list[DispatchSlotTrace] | None`) = `None`: Per-target dispatch-slot state at the token (`already_fired` gate only).
- **TriggerDryRunGate.gate** (`TriggerDryRunGateName`): Which gate this is.
- **TriggerDryRunGate.idempotency_token** (`str | None`) = `None`: The dedup token the event projects onto (`already_fired` gate only).
- **TriggerDryRunGate.status** (`TriggerDryRunGateStatus`): Whether the gate passed, failed, or was short-circuited.
- **TriggerDryRunGate.targets** (`list[TargetAcceptanceTrace] | None`) = `None`: Per-target prefilter decisions (`target_prefilter` gate only).

### TriggerDryRunGateName

```python
class roboto.domain.triggers.dry_run.TriggerDryRunGateName
```

`from roboto.domain.triggers import TriggerDryRunGateName`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L31-L47)

Bases: `roboto.compat.StrEnum`

The gates the evaluator runs, in evaluation order.

**Attributes**

- **TriggerDryRunGateName.AlreadyFired** = `'already_fired'`: Is a dispatch slot still claimable at the trigger's `once_per`?
- **TriggerDryRunGateName.Condition** = `'condition'`: Does the trigger's condition hold for the event?
- **TriggerDryRunGateName.Enabled** = `'enabled'`: Is the trigger enabled?
- **TriggerDryRunGateName.Subscribed** = `'subscribed'`: Is the trigger subscribed to the event's type?
- **TriggerDryRunGateName.TargetPrefilter** = `'target_prefilter'`: Does at least one target accept the event (pathspec and precondition gates)?

### TriggerDryRunGateStatus

```python
class roboto.domain.triggers.dry_run.TriggerDryRunGateStatus
```

`from roboto.domain.triggers import TriggerDryRunGateStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L50-L58)

Bases: `roboto.compat.StrEnum`

Outcome of one gate in a dry run.

**Attributes**

- **TriggerDryRunGateStatus.Failed** = `'failed'`
- **TriggerDryRunGateStatus.NotEvaluated** = `'not_evaluated'`: An earlier gate failed, so this one was short-circuited.
- **TriggerDryRunGateStatus.Passed** = `'passed'`

### TriggerDryRunRequest

```python
class roboto.domain.triggers.dry_run.TriggerDryRunRequest(/, **data: Any)
```

`from roboto.domain.triggers import TriggerDryRunRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L144-L205)

Bases: `pydantic.BaseModel`

Request payload for a trigger dry run.

Provide [`event`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.event) (a fully-formed platform event to evaluate) or a single reference ([`dataset_id`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.dataset_id), [`file_id`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.file_id), [`invocation_id`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.invocation_id), [`event_id`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.event_id), or [`scheduled_for`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.scheduled_for)), from which the server synthesizes an event. With an entity reference, [`event_type`](/reference/python-sdk/roboto/domain/triggers/dry_run#roboto.domain.triggers.dry_run.TriggerDryRunRequest.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** (`Any`)

**Attributes**

- **TriggerDryRunRequest.dataset_id** (`str | None`) = `None`: Synthesize an event about this dataset.
- **TriggerDryRunRequest.event** (`roboto.domain.platform_events.PlatformEvent | None`) = `None`: A platform event to evaluate as-is.
- **TriggerDryRunRequest.event_id** (`str | None`) = `None`: Synthesize a platform event about this event (the annotation on your data).
- **TriggerDryRunRequest.event_type** (`roboto.domain.platform_events.PlatformEventType | None`) = `None`: Which subscribed event type to synthesize for an entity reference.
- **TriggerDryRunRequest.file_id** (`str | None`) = `None`: Synthesize an event about this file.
- **TriggerDryRunRequest.invocation_id** (`str | None`) = `None`: Synthesize an event about this invocation.
- **TriggerDryRunRequest.scheduled_for** (`datetime.datetime | None`) = `None`: 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

```python
class roboto.domain.triggers.dry_run.TriggerDryRunResponse(/, **data: Any)
```

`from roboto.domain.triggers import TriggerDryRunResponse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/dry_run.py#L208-L228)

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** (`Any`)

**Attributes**

- **TriggerDryRunResponse.event_type** (`roboto.domain.platform_events.PlatformEventType`): Type of the (given or synthesized) event that was evaluated.
- **TriggerDryRunResponse.gates** (`list[TriggerDryRunGate]`): The gate-by-gate trace, in evaluation order.
- **TriggerDryRunResponse.trigger_id** (`str`): The trigger that was dry-run.
- **TriggerDryRunResponse.verdict** (`str`): One plain-English sentence summarizing the outcome.
- **TriggerDryRunResponse.would_fire** (`bool`): Whether the trigger would dispatch at least one target for this event.
