Verify Result
Result of a SagaJournal.verify call.
All variants are fail-soft: verify never throws. Errors (tampering, bad input, misconfiguration) are surfaced through Broken.
Variants
Valid — every entry in the requested range re-hashed and matched its stored hash.
Broken — the first entry whose recomputed hash differed from the stored hash, or a pre-condition that prevents meaningful verification (bad input range, hashing disabled, no codec attached).
Incomplete — the requested range was larger than pageSize (or the chain itself); the caller should resume from Incomplete.resumeFromSeq to continue paginating.
Pagination contract
verify(runId, 0, Long.MAX_VALUE, pageSize = 5000) on a run of N entries produces a sequence of Incomplete results (one per page) until the final page returns either Valid or Broken. Successive calls chain as:
val r1 = journal.verify(runId, 0, Long.MAX_VALUE, 5000) // Incomplete(resumeFromSeq = 5000, ...)
val r2 = journal.verify(runId, 5000, Long.MAX_VALUE, 5000) // Incomplete(resumeFromSeq = 10000, ...)
val r3 = journal.verify(runId, 10000, Long.MAX_VALUE, 5000) // Valid(...)