# `Chimeway.Trigger`
[🔗](https://github.com/jonlunsford/chimeway/blob/v1.0.0/lib/chimeway/trigger.ex#L1)

Orchestrates notifier triggering with deterministic recipient normalization.

## Duplicate-trigger contract (Phase 14 / D-03)

When `trigger/3` returns `{:duplicate, event}`, `dispatch_after_trigger/4` is INERT
— it does NOT re-drive dispatch for the existing event. This means:

- No new Oban jobs are enqueued.
- No additional `Chimeway.Delivery` rows are planned.
- The pre-existing pending deliveries from the first trigger remain in their
  current state (whether already-dispatched, retrying, or terminal).

If a host application crashes between event-insert commit and the dispatcher being
called, deliveries from that aborted trigger ARE NOT recovered by a subsequent
re-fire. Recovery for that scenario is explicitly deferred to a future operability
phase. Operators investigating "why wasn't this delivered after a duplicate
trigger?" should look at the original event's deliveries via
`Chimeway.Traces.get_trace/1`, not at the duplicate.

# `normalize_recipients`

```elixir
@spec normalize_recipients([map()]) :: [map()]
```

# `trigger`

```elixir
@spec trigger(module(), map(), keyword()) ::
  {:ok, map()} | {:duplicate, struct()} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
