# `Continuum.Runtime.SignalRouter`
[🔗](https://github.com/Yyeger/Continuum/blob/main/lib/continuum/runtime/signal_router.ex#L1)

Routes external signals and child-completion wakeups to workflow processes.

With the Postgres journal, signals are durable: delivery inserts a row into
`continuum_signals`, emits `pg_notify('continuum_signal', run_id)`, and wakes
a local engine when one is registered. The engine consumes the mailbox row
into a journaled `signal_received` event during replay.

This process also listens on `continuum_run_wake` — emitted when a child run
reaches a terminal state — and wakes the parent's local engine so an awaiting
parent resumes promptly. No separate listener process: a parent wakeup routes
through the same "find local pid in Registry, wake it, else rely on the
Dispatcher poll" path as a signal.

# `catch_up_once`

```elixir
@spec catch_up_once(keyword()) :: :ok
```

Scan `continuum_signals` for undelivered rows whose runs have a local engine
and wake them. The LISTEN path is best-effort (notifications can be dropped,
the listener can be down); this is the poll backstop the router runs
periodically while listening, exposed for tests and operators.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `deliver`

```elixir
@spec deliver(binary(), atom(), term()) :: :ok | {:error, term()}
```

Deliver a signal to a run.

# `deliver`

```elixir
@spec deliver(binary(), atom(), term(), keyword()) :: :ok | {:error, term()}
```

# `start_link`

---

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