Skip to main content
Source baselineNereuscommit c820391dc1de·verified 2026-08-07·authority reader-facing-summary

Stream head and commit chain

Stream head

The stream head is the authoritative summary of a stream's committed logical range. A head includes enough versioned state to let a writer prove that it is advancing the expected predecessor and let a reader establish a consistent snapshot.

Conceptually:

head(version = v, committedEnd = n, previous = v-1)

The exact encoded fields are an implementation contract; the important property is that a head update is conditional on its expected version and predecessor.

Commit chain

An append records an intent that can be found again if the caller or broker loses the response. The chain links the intent to the logical range and the physical target. Recovery can search the chain, validate exact identity, and either complete the publication or return the previously determined outcome.

Linear visibility

Before the head CAS succeeds, a new logical range is not part of the committed stream even if its bytes and intent are durable. After the CAS succeeds, the logical range is committed and every future reader must resolve it through the published metadata.

The rest of the profile-specific completion policy may require additional physical work before the producer receives success. That extra work does not move the logical commit point.

Response loss

If the head CAS request was sent but its response was lost, retrying the physical write blindly is unsafe. The caller must use the stable append identity and expected predecessor to determine whether the original operation committed, is still recoverable, or is definitively not committed.

Source anchors