# `MishkaCmsCore.Activity.Sources.RuntimeCompile`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/activity/sources/runtime_compile.ex#L5)

Activity source for on-demand (lazy) runtime module compiles.

A lazy runtime part (`precompile: false`, e.g. a Page) is compiled inside the
visitor's web request on first hit — there is no Oban job, so neither the
runtime status panel nor the activity feed would otherwise hear about it. The
compiler emits a lightweight telemetry event (`[:mishka_cms, :runtime, :compiler,
:compiled]`) — fire-and-forget, no blocking, no side effects in the compile path
— and this source bridges it to PubSub, exactly like
`MishkaCmsCore.Activity.Sources.Oban` bridges Oban job telemetry.

Attached once on boot via `attach/0` (from `MishkaCmsCore.Application.start/2`).

## Topics
  * `runtime_compiled:res:<resource>` — compiles of one resource (any site)
  * `runtime_compiled:site:<id>:res:<resource>` — one resource on one site

No `initial_fetch/2` history: lazy compiles are ephemeral (not persisted), so
the feed shows them live but they do not appear in the historical activity log.

# `attach`

Attach the compiler telemetry → PubSub bridge. Idempotent.

---

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