Skip to main content

Module differential_ledger

Module differential_ledger 

Source
Expand description

Durable, advisory calibration receipts for D23 differential runs.

One process owns a state directory. Every observation and adjudication is an append-only, versioned JSONL row. The derived receipt is replaceable and can always be rebuilt from those rows. No timestamp is used as evidence: observation ids are the local total order, and exact integer counts drive the < 1/1000 calculation.

Reproducibility is frozen along two axes, not one. The command file’s raw bytes are hashed so a ledger cannot silently mix command versions, and the effective environment the runs execute in — the command file’s declared env plus the small pass-through list in effective_environment — is hashed into activation.json the same way, so a ledger cannot silently mix environments either. A state directory activated before environment hashing existed adopts the current environment on its next observation and enforces it from then on; its earlier rows predate enforcement and cannot be retroactively attested.

Structs§

CommandSpec
Explicit argv loaded from a versioned JSON file.
RecordedObservation
Result of durably appending one observation.
Revisions
Commit identities recorded with one three-worktree observation.

Functions§

adjudicate
Appends one ground-truth decision for a flagged observation and rebuilds the receipt. true means a real interaction; false means spurious.
effective_environment
The complete environment a differential run executes in.
environment_hash
BLAKE3 content address of one effective environment.
load_command
Reads and validates a command specification.
record_observation
Appends a report and rebuilds the advisory receipt.
refresh
Rebuilds a receipt from the append-only source rows.