Commands
The package installs three console commands. The scripts in the repository are thin backward-compatible wrappers.
Build an exact libcbm stand-state cache for one chain family.
The builder intentionally lives in fresh-cbm, not in the WS4 runtime. It imports WS4’s CarbonLedger so the cached rows are produced by the same exact path the optimizer uses.
- fresh_cbm.build.parse_offsets(text: str) list[int][source]
Parse
0-49or0,1,2into offsets.- Parameters:
text (str) – Comma-separated offsets or ranges.
- Returns:
list of int – Sorted unique offsets.
- fresh_cbm.build.build(args: Namespace) None[source]
Build the cache.
- Parameters:
args (argparse.Namespace) – Parsed builder arguments.
- Raises:
RuntimeError – When WS4 is not importable on the current path.
- fresh_cbm.build.main(argv: Sequence[str] | None = None) int[source]
Parse arguments and build the cache.
- Parameters:
argv (sequence of str or None, optional) – Command-line arguments. None reads
sys.argv.- Returns:
int – Process exit status.
Validate a fresh-cbm state cache against the exact WS4 carbon ledger.
- fresh_cbm.validate.main(argv: Sequence[str] | None = None) int[source]
Compare sampled cached rows with an exact ledger run.
- Parameters:
argv (sequence of str or None, optional) – Command-line arguments. None reads
sys.argv.- Returns:
int – Process exit status.
Validate cache completeness and write checksums for a release.