---
digest: >
  v0.31.13 gives external shells one explicit, generic boundary for appending
  externally identified messages to an exact Mirror conversation. The contract
  is atomic and idempotent, guards Journey ownership, and remains independent of
  runtime-session routing and conversation lifecycle inference. The release also
  repairs Ariad Coherence reentry after evidence correction and closes the lazy
  SQLite WAL recovery defect that blocked this candidate. No model pin or prompt
  changed, so the model-behavior eval gate is not activated.
---

# v0.31.13 — Explicit Append and Lifecycle Recovery

**Date:** 2026-08-29

## Highlights

- Adds the public `conversations append` JSON interface for exact-destination,
  externally identified message appends.
- Commits each batch atomically, classifies canonical-equivalent retries as
  idempotent, and rejects divergent or cross-conversation message-ID reuse.
- Requires exact Journey ownership without consulting runtime sessions,
  generations, recent activity, or conversation-logger state.
- Allows explicit late append to ended conversations without reopening them or
  rerunning extraction, summaries, titles, tags, embeddings, or other semantic
  refresh.
- Lets Ariad rerun a pending Coherence checkpoint after evidence correction and
  completes D-016's lazy SQLite WAL recovery fallback.

## Where We Started

External shells could not durably reconcile messages into one known Mirror
conversation through a generic public boundary. Reusing runtime-session or
conversation-logger behavior would have coupled explicit persistence to recency,
generation, lifecycle inference, and downstream-specific assumptions. The work
also exposed two independent runtime defects: a Coherence checkpoint could create
`navigator_coherence` without any legal reentry, and SQLite 3.51 could defer a
read-only WAL-sidecar failure until the first schema query, outside the existing
fallback guard.

## What Changed

`conversations append` accepts a strict versioned JSON request on stdin and
resolves only the complete caller-supplied conversation ID. It validates bounded
message IDs, roles, canonical timestamps, UTF-8 content and metadata limits,
batch size, and exact Journey equality before entering one storage-owned
`BEGIN IMMEDIATE` transaction. Caller message IDs are the idempotency authority:
canonical-equivalent retries return `existing`; divergent or cross-conversation
reuse rejects the whole batch. Receipts and failures remain bounded and never
echo message bodies or metadata.

The append boundary does not read or mutate runtime sessions and does not route
by generation, recency, or active logger state. Explicit append remains valid
after `ended_at` is populated, but it does not reopen the conversation or rerun
memory extraction, summary, title, tag, embedding, or other semantic state.
Message reads now order deterministically by `created_at, id`.

Ariad Coherence now permits reentry only for the exact pair
`pending_confirmation=navigator_coherence` and
`last_delivery_event=coherence`. Corrected evidence is re-evaluated normally;
unrelated or inconsistent pending confirmations remain blocked, and Done never
consumes the Coherence confirmation.

D-016 is Paid. `_connect_read_only()` performs one minimal schema read after
opening `mode=ro`; if and only if that read raises the exact expected
`unable to open database file` operational error, it closes the connection and
reopens the existing database with `mode=rw` so SQLite can recover WAL sidecars.
Missing databases are never created, unrelated SQLite errors propagate, and the
normal read-only path does not fall back.

## Conscious Exclusions

- The append interface does not generate caller message IDs, infer destinations,
  route through runtime sessions, or reuse conversation-logger semantics.
- Late append does not trigger semantic re-extraction or refresh. Downstream
  consumers remain responsible for any separate reconciliation policy.
- Ended conversations are not reopened and lifecycle timestamps are not changed.
- D-006 remains the pre-existing project-wide mypy baseline; this release adds no
  typing regression and does not claim that debt is paid.
- No model pin or prompt changed. The model-behavior `eval --all` release gate is
  therefore not activated.
- Release preparation does not authorize push, tagging, stable promotion, GitHub
  Release publication, or production update.

## What We Learned

An explicit persistence boundary is safest when identity, destination, ordering,
and retry authority come from the caller while lifecycle inference stays out of
the transaction. Recovery flows need the same precision: a runtime must not only
represent a pending checkpoint or fallback condition, but also provide one
bounded path that can legally resolve it.

## Next Horizon

After the candidate commit and central verification are authorized, the release
can proceed through its separate tag, stable-promotion, GitHub publication, and
installed-runtime acceptance gates. External-shell consumers can then adopt the
append contract without coupling their reconciliation logic to Mirror runtime
sessions.
