Move legacy plain-text renditions into canonical authority - #186
Conversation
roborev: Combined Review (
|
98bd5a4 to
0df9a2c
Compare
roborev: Combined Review (
|
39ee5a2 to
002d8f7
Compare
roborev: Combined Review (
|
|
rebasing |
002d8f7 to
2112ebc
Compare
roborev: Combined Review (
|
Large legacy text could block later rendition publication because the catalog and serving manifests used different segment shapes. Trashed current versions also lost content search after restore, and the version 1 worker could replace newer cached extraction results. Use one legacy manifest representation, retain heads across trash restore, and keep extraction versions monotonic. Newer successful cache rows remain untouched and are not scheduled for older work. Generated with Codex
roborev: Combined Review (
|
Docbank only knows how to convert the released plain-text version 1 cache into rendition authority. Silently accepting a newer result could fence its search text without an equivalent rendition. Replacing a successful result with a same-version failure could also leave cache and serving heads inconsistent. Abort the cutover before authority changes when a selected result uses an unsupported newer version. Preserve successful same-version results so startup remains repeatable. The exact v0.14 schema fixture now exercises the released plain-text cutover in both SQLite modes. Generated with Codex
roborev: Combined Review (
|
## What changed Backups now include the complete catalog-authorized document authority: current source versions, rendition artifacts, and staged rendition-build sources. Snapshot metadata says which derivative classes are included, locally reconstructible, or provider-dependent, with deterministic counts, bytes, blob totals, and checksums. Restore validates the logical and physical authority after materializing loose or packed bytes, then rebuilds the lexical projection locally before any restored head can publish. Missing, corrupt, or inconsistent data leaves an existing target unchanged. ## Why The catalog was durable inside one vault, but backup still treated its bytes as generic storage. That could retain sensitive provider output without disclosing it or restore a vault whose catalog, blobs, and search head did not agree. ## Usage Use the existing backup and restore commands. Derivative authority is included and reported automatically, and restore never calls a rendition or embedding provider. Part of #176 (F7). Stacks on #186. Co-authored-by: Rusty Shackleford <salmonumbrella@users.noreply.github.com>
What changed
Existing successful
plain-textv1 records now migrate into canonical rendition builds, per-version attachments, rendition heads, and one complete lexical generation when a current or released vault opens. The cutover preserves the exact stored UTF-8 bytes and validates the replacement FTS generation against current name and text search before publishing it.Failed, missing, invalid, or obsolete rows stay outside serving authority and remain queued for fresh extraction. The legacy cache and released source database remain recoverable but stop acting as a second live search authority.
Why
Serving from both the released plain-text cache and the new derivative catalog would make upgrades and retries vulnerable to mixed or incomplete state. Existing vaults need one deterministic cutover without rewriting their extracted text or throwing away recovery data.
Usage
No manual migration command is required. Opening an older supported vault performs the cutover automatically; the previous head keeps serving until the replacement catalog and lexical generation are complete.
Part of #176 (F6). Stacks on #185.