---
digest: >
  v0.40.0-next.1 is the first preview of the release train: published under npm's `next`
  dist-tag, read by no updater, for Nautilus for Mirror, which embeds this Core. It carries
  CR200: a host can delete a Journey together with every record that belongs to it, after
  a preview that counts what will go, what other Journeys keep with a link cleared, and
  which extension tables lose rows. The deletion acts only on the preview the person saw,
  in one transaction, behind a named backup verified before any write. Terminal users
  receive it with v0.40.0, when the train leaves. No schema change, no migration, and no
  model or prompt change.
---

# v0.40.0-next.1 — A Journey Can Go, Showing What Goes With It

**Date:** 2026-11-06

**A preview, not a release users receive.** It is staged under `next`, its GitHub Release is
a prerelease, and `stable`, `latest`, `mirror update` and the release-notes reader all stay
on v0.39.5. It exists so Nautilus for Mirror can ship the change below before the train
leaves ([the release train](../process/versioning.md#the-release-train)).

## Highlights

- **A Journey and its records, deleted in one act**
  ([CR200](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr200-delete-a-journey-with-its-records-after-showing-what-will-go.md)).
  `mirror-mind/desktop` gains `previewJourneyDeletion` and `deleteJourneyWithRecords`.
  `deleteJourney` still deletes only an empty leaf.
- **The preview is the contract.** It counts the Journey's own records, its Conversations'
  contents, other Journeys' records that only lose a link, and the `ext_*` rows that name
  the Journey, by owning extension, and hashes all of it. The deletion takes that digest
  and refuses any other.
- **A backup first, verified.** `backups/pre-journey-deletion-<id>-<stamp>-<random>.db`,
  owner-only, taken under the write lock and read back as the same digest before anything
  is deleted. A refused deletion removes it; a committed one keeps it.
- **One friction kept:** a Journey with child Journeys is refused, naming them.
- No schema change, no migration, and no model or prompt change.

## Where We Started

CV24.DS8 gave a host five Journey calls, and its `deleteJourney` refuses a Journey that
holds anything: conversations, memories, tasks, attachments, stories, change requests,
cursors. Nautilus for Mirror's Journey management (its RS028) asked for the act a person
means by "delete this Journey". Its Navigator decided on 2026-11-05 and 2026-11-06 that
everything that belongs to the Journey goes, that the confirmation shows it first, and,
where the Core cannot judge data it does not own, to trade refusal for transparency.

A long-lived home showed why "belongs" needed rules: 956 memories sit under a Journey other
than their conversation's, and 101 runtime sessions likewise. Deleting by reach would have
erased other Journeys' history.

## What Changed

**Four rules.** A record that belongs to the Journey goes. What belongs to a deleted
conversation or memory goes with it: messages, embeddings, provider call records, memory
access records. A record of another Journey that only points at something deleted stays,
with that link cleared. And an `ext_*` row goes when the table's `journey_id` or `journey`
column names the Journey exactly; the preview names the extension from `_ext_migrations`,
and a row an extension's own foreign key holds refuses the deletion as
`extension_rows_held`, naming the table.

**A closed inventory.** `JOURNEY_DELETION_INVENTORY` names every core table the deletion
touches, keeps or detaches, and a test reads the schema against it: a table that names a
Journey, or references a row the deletion removes, without a decision fails. Its first
run found `journey_mutation_receipts`, kept as the audit trail.

**Refusals.** `journey_changed` for a digest that no longer matches, `journey_has_children`,
`extension_rows_held`, `backup_failed`, and as before an unknown Journey, a malformed
request and a database that is not current. Every refusal writes nothing.

**Validated** in `journeyDeletion.test.ts` (11 tests, ten mutations each caught), in CI on
Ubuntu and macOS (PR #55), and end to end by Nautilus: its host drives both calls
against a scratch home, and its Navigator deleted Journeys in the app on 2026-11-06.

**Also in this preview.** [CR199](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr199-deliver-mirror-context-takes-three-to-seven-seconds-before-every-desktop-turn.md)
is captured: `deliverMirrorContext` takes three to seven seconds before every Desktop
turn, measured. And the release train itself (PR #56) is in
[versioning](../process/versioning.md#the-release-train).

## Conscious Exclusions

- No CLI command deletes a Journey with its records; a host is the only caller.
- No cascade through child Journeys: they are refused, by the Navigator's decision.
- Files on disk are the host's to decide; the Core touches only the database.
- An extension cannot yet take over its own cleanup; recorded for when the extension
  mechanism exists (CV24.DS8).
- The test suite, run with `MIRROR_HOME` or `DB_PATH` inherited from a real home, writes
  into that home. Found while validating this change; worth its own Change Request.

## What We Learned

A preview that is also the contract keeps both honest: the person confirms a list, the
digest makes the deletion that list and nothing more, and a home that changed in between
is told so instead of deleted differently.

## Upgrading

Nothing to do in the terminal: this preview is not offered by `mirror update`. A host that
embeds the Core pins `mirror-mind@0.40.0-next.1` from the registry.

## Next Horizon

v0.40.0 leaves with the next train, carrying this change to every install, with whatever
else merges before it.
