Creates the checkpoint directory structure for a new simulation run. This includes the base result path, checkpoints and outcomes subdirectories, run manifest, and initial latest pointer. The ledger subdirectory is created lazily at the first delta write.
Usage
init_checkpoint_dir(
result_path,
config_fingerprint,
config_spec = NULL,
checkpoint_format = "rds",
retention_spec = NULL,
run_policy_spec = NULL
)Arguments
- result_path
Character string giving the base path for results. If NULL, the function returns NULL immediately (no checkpointing).
- config_fingerprint
Character string containing a hash of the configuration. This is stored in the manifest for validation during resume operations.
- config_spec
Optional normalized configuration spec to persist in the run manifest for future rehydration.
- checkpoint_format
Character scalar naming the checkpoint storage format.
Details
The directory structure created is:
result_path/
+-- run_manifest.json # run-level metadata and schema versions
+-- latest.json # pointer to latest valid checkpoint ID
+-- checkpoints/ # atomic checkpoint commit directories
+-- outcomes/ # immutable, redundantly mirrored outcome shards
+-- ledger/ # base ledger plus status deltas (lazy)
The run manifest contains:
run_schema_version- Schema version for the run structureresult_schema_version- Schema version for result filesconfig_fingerprint- Hash of the configurationcreated- Timestamp when the run was created