Skip to contents

Capture checksum-verified analysis execution state and resume unfinished modules without rerunning modules already recorded as successful.

Usage

new_execution_checkpoint(executed, registry)

validate_execution_checkpoint(checkpoint, registry = NULL)

write_execution_checkpoint(checkpoint, path, overwrite = FALSE)

read_execution_checkpoint(path, registry = NULL)

resume_analysis_execution(
  checkpoint,
  registry,
  engine = new_execution_engine()
)

Arguments

executed

A complete result returned by execute_analysis_plan() or execute_analysis_registry().

registry

The analysis registry used for execution or compatibility validation.

checkpoint

A PopgenVCFExecutionCheckpoint object.

path

Destination or source checkpoint .rds path.

overwrite

Whether existing checkpoint and checksum files may be replaced.

engine

Execution engine used for unfinished modules.

Value

new_execution_checkpoint() and read_execution_checkpoint() return a PopgenVCFExecutionCheckpoint. validate_execution_checkpoint() and write_execution_checkpoint() return invisibly. resume_analysis_execution() returns a regular execution result with a combined ledger containing a checkpoint_reused column.

Details

A checkpoint binds the planned module order, dependency waves, module contract versions, declared outputs, analysis state, runtime context, artifact manifest, and execution ledger to a SHA-256 identity. The serialized RDS file has a separate SHA-256 sidecar and is installed atomically.

Resume validates the checkpoint against the current registry and rejects plan or contract drift. Only modules recorded as successful are reused. Failed, blocked, or otherwise unfinished modules are rerun through the normal execution engine and remain subject to result, artifact, and dependency validation.

Security: the SHA-256 sidecar detects accidental corruption only, not deliberate tampering – anyone able to replace the checkpoint file can equally replace its matching sidecar. read_execution_checkpoint() calls base R's readRDS(), which can execute arbitrary code embedded in a maliciously crafted file the moment it is deserialized. Only resume from a checkpoint directory produced by a run you trust; never one downloaded, received from a collaborator, or restored from storage you do not fully control.