Documentation / Examples

Keep a Lake current with the live stream

1. Goal: Follow complete source bytes as agents append them, without periodic rescans. 2. Risk: Local mutation and provider-facing reads. 3. Environment: macOS terminal with installed Transcript Lake and one existing valid Lake. 4. Preconditions: No other writ

  1. Goal: Follow complete source records, including rewritten journals, without periodic rescans.
  2. Risk: Local Lake mutation and vendor-source reads.
  3. Environment: macOS terminal with installed Transcript Lake and an existing valid Lake.
  4. Preconditions: No other writer owns the Lake; source files use a supported runtime format.
  5. Inputs: Existing LAKE_DATA and subsequent local agent activity.
  6. Artifacts and side effects: Masked canonical events and affected Oko rows reach disk before the source cursor advances. Vendor files remain unchanged. Rewrites recover missing occurrences without deleting or duplicating retained history.
  7. Steps:
sh
LAKE="/absolute/operator-owned/lake"
transcript-lake --data-dir "$LAKE" doctor
transcript-lake --data-dir "$LAKE" stream --json

In another terminal:

sh
transcript-lake --data-dir "$LAKE" status --json
transcript-lake --data-dir "$LAKE" events --limit 20
  1. Observable result: The stream prints start and commit records with file, failure, and duration counts. Replacement recovery names the source, reason, previous offset, and observed size; per-runtime summaries include replayedFiles. Inspect events or show to confirm the recovered instructions rather than treating a running process as proof.
  2. Failure path: An invalid segment, parser failure, unreadable file, or corrupt canonical recovery input names the failed path and does not advance past failed output. Recovery retains its pre-replay cursor until the whole source succeeds. Preserve damaged authoritative state and use separate-root reconstruction when necessary.
  3. Off-switch: Send SIGINT or SIGTERM through the owning supervisor. The process records state: stopped; retention is independent.
  4. Related operations: Query sessions, compact to Parquet, or reconstruct the Oko projection.