Prefix verification — SYNC, Tier 1+2 on [0..k−1] (B-7): the subscriber must validate the whole prefix before accepting the head. After replay, journalHead must equal head — divergence is FORK_DETECTED (the prefix itself stays valid — D27).
[0..k−1]
journalHead
head
FORK_DETECTED
The prefix events [0..k−1].
The JournalHead this prefix is claimed to end at.
Optional
Optional verification reference (additive convenience; defaults to the system clock, same skew rule as verifyJournal).
The VerifyResult of the prefix replay; ok: true only when the prefix is valid AND its head equals head.
ok: true
const result = verifyPrefix(prefix, head);if (!result.ok) throw result.error; Copy
const result = verifyPrefix(prefix, head);if (!result.ok) throw result.error;
Prefix verification — SYNC, Tier 1+2 on
[0..k−1](B-7): the subscriber must validate the whole prefix before accepting the head. After replay,journalHeadmust equalhead— divergence isFORK_DETECTED(the prefix itself stays valid — D27).