Skip to main content

Module replace

Module replace 

Source
Expand description

Multi-file replace and delete in one transaction (Phase 5a-2b, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md §6.3.7 item 4).

A transcript output has sidecars that describe its bytes (output.idx line offsets, output.tsidx receive times). Replacing or deleting output and its sidecars in separate steps leaves a window — or, after a crash, a permanent state — where a sidecar describes content that no longer exists, and a reader trusts it by coincidence of size. These do the whole change in one transaction.

Structs§

DerivedSnapshot
See FileStore::derived_snapshot.
DerivedView
SnapshotFile
A file as a SnapshotReader sees it.
SnapshotReader
Reads inside one FileStore::read_snapshot: every call sees the same moment of the database.

Functions§

patch_range_in 🔒
Write data at byte offset of a file’s stored parts, inside tx, reading and rewriting only the parts the range touches. A part shorter than the range is extended (with zeros up to offset, which callers never leave as a gap). Leaves the file’s recorded size to the caller.
truncate_parts_in 🔒
Drop a file’s stored bytes from new_size on, inside tx.