execute

Executes the full-chain audit (seq 0 to Long.MAX_VALUE) for the run identified in this AuditCommand.

This function is suspend — call from a coroutine or runTest block.

Usage

when (val r = (saga audit "order-42").execute()) {
is AuditResult.Intact -> log("chain ok, head=${r.headHash}")
is AuditResult.Tampered -> alert("tamper at seq ${r.atSeq}")
is AuditResult.Incomplete -> resume(r.resumeFromSeq)
}

Desugars to: journal.verify(RunId(id), 0, Long.MAX_VALUE) → mapped to AuditResult.

Return

AuditResult.Intact, AuditResult.Tampered, or AuditResult.Incomplete.

Throws

if the executor was built without a journal.