- Goal: Rebuild masked per-session JSONL from authoritative Lake partitions after projection loss or damage.
- Risk: Derived local mutation. Oko is not invoked unless
--reindexis supplied. - Environment: macOS terminal and valid Lake partitions. Oko installation is optional.
- Preconditions: No stream commit or other writer in flight; enough disk for one staged per-session copy.
- Inputs:
LAKE_DATA; reconstruction always covers the complete authoritative Lake. - Artifacts and side effects: Rebuilds
exports/oko/runtime=<runtime>/<session-hash>.jsonlthrough staging, atomically replaces projection metadata, and prunes derived files absent from authoritative partitions. - Steps:
sh
LAKE="/absolute/operator-owned/lake"
transcript-lake --data-dir "$LAKE" rebuild-oko
transcript-lake --data-dir "$LAKE" paths- Observable result: The summary reports
mode: full, materialized session and record counts, malformed input count, and pruned derived files. Rows declarelake_schema: oko-import-v1and deterministic event UUIDs. - Failure path: A malformed Lake row aborts reconstruction, removes staging, and preserves the prior projection. Authoritative NDJSON and source cursors are never changed.
- Off-switch: The live stream already maintains this projection. After disconnecting Oko and other readers,
clean --target okopreviews derived removal;--applyperforms it. - Related operation: Reindex Oko.