Skip to main content

Module ledger

Module ledger 

Source
Expand description

Per-job durable checkpoint store. One SQLite file per job ($CUTTLEFISH_HOME/jobs/<job_id>/ledger.sqlite), matching the catalog’s existing one-thing-per-file convention. See docs/superpowers/specs/2026-08-03-dag-core-design.md’s “Durability model” for the full rationale — this module is purely storage; the resume decision logic (skip on completed/skipped, run everything else) lives in crate::runner.

Structs§

ConcludedRow
One concluded fan-out item, as the ledger recorded it.
Escalation
One thing a job gave up on after its recovery ladder was exhausted.
Ledger
A per-job checkpoint ledger, backed by a single SQLite file.

Enums§

LedgerError
Why a ledger could not be opened.
LedgerJobStatus
A job’s own terminal status, as recorded in the ledger — distinct from per-node checkpoints, which alone can’t tell “still running when the process died” apart from “finished cleanly.”

Functions§

jobs_root
The root directory jobs live under. Checks $CUTTLEFISH_JOBS_HOME first — set by cuttlefish-run’s project-scoping so a project’s jobs/ledger state lives under <project>/.cuttlefish/jobs without also redirecting the (deliberately still-global) block catalog, which $CUTTLEFISH_HOME alone continues to control. Falls back to $CUTTLEFISH_HOME/jobs (or ~/.cuttlefish/jobs) exactly as before when unset, so nothing about existing single-global-home behavior changes for a caller that never sets the new variable.