
Verify SHA-256 Checksum and Readability of a Chunk Checkpoint
Source:R/security.R
verify_checkpoint.RdValidates that a chunk .rds checkpoint exists, matches its recorded SHA-256
sidecar digest (and optional expected_sha256), and deserializes cleanly via
readRDS(). Protects slurm_collect() against silent corruption or partial
writes on shared HPC filesystems.
Arguments
- result_path
Path to a
chunk_XXXX.rdscheckpoint file.- expected_sha256
Optional 64-character hexadecimal SHA-256 string to verify against in addition to the
.sha256sidecar file (if present).- require_sidecar
Logical; if
TRUE, fails when no.sha256sidecar exists andexpected_sha256isNULL. DefaultFALSE(verifies whenever a sidecar orexpected_sha256is available).