- Goal: Reconstruct history after cursor or canonical-state damage while preserving the failed Lake.
- Risk: Vendor-source reads and writes to a distinct destination. The command deletes nothing.
- Environment: macOS, installed Transcript Lake, and sufficient disk for a second full Lake.
- Preconditions: Preserve the failed Lake and vendor sources; select a genuinely empty replacement root; capture the original error and status.
- Inputs: The old
LAKE_DATAand a different empty absolute destination. - Artifacts and side effects:
rebuildreads complete selected vendor histories and writes a separate Lake, cursors, and Oko projection. The old root remains untouched. Vendor history no longer present in the sources cannot be reconstructed from those sources. - Steps:
sh
OLD="/absolute/operator-owned/lake-failed"
NEW="/absolute/operator-owned/lake-rebuild"
transcript-lake --data-dir "$OLD" doctor --json
transcript-lake --data-dir "$OLD" rebuild --to "$NEW"
transcript-lake --data-dir "$NEW" doctor
transcript-lake --data-dir "$NEW" status- Observable result: The replacement root did not exist before the command. A complete rebuild reports
full: true,partial: false, zero failures, fresh cursors, and partition inventory. - Failure path: A non-empty target is rejected before replay. Insufficient space, unreadable source, or parser failure preserves both roots; recovery uses another empty root after correction.
- Off-switch: After comparing aggregate inventory and intended date/runtime coverage, point the stream service at the replacement root. Retain or remove the old root according to local policy.
- Related operation: Start the live stream only after the replacement root is authoritative.