Continuum.Runtime.Journal.ReadOnly (continuum v0.8.1)

Copy Markdown View Source

A journal adapter that refuses every callback.

This is the guard that makes offline replay structurally read-only rather than read-only by convention. Continuum.Replay builds a Continuum.Runtime.Context whose history is loaded up front and whose :journal is this module, so a replay has nothing to write through — and Continuum.Runtime.Effect refuses to compute a live tail against it, so it has nothing to write about.

Both stock journals mutate on paths the code calls replay, which is why a flag would not be enough:

  • the in-memory adapter executes a real activity body inline when the workflow steps past the journaled tail, so pointing a replay at a production history could charge a card from an operator's laptop;
  • the Postgres adapter resolves a tail signal_awaited by opening a transaction and consuming a pending signal row.

Effect discriminates both of those by journal module identity, so a distinct module — not Postgres with a flag set — is what closes them.

Every callback raises Continuum.ReadOnlyJournalError, reads included: a read-only context is handed its history and snapshot before the workflow starts, so a call that reaches for the journal at all has taken a path that assumed a live run.