Skip to content

ADR-003: The Stream View Is Derived and Optional

Accepted — 2026-10-23 (decided by the maintainer, Tobias Brennecke; drafted 2026-10-22)

Supersedes Decision 2 of ADR-002. ADR-002 stands as the record of what was decided on 2026-09-29; this document records the later decision rather than amending it. Decisions 1, 3 and 4 of ADR-002 are unchanged.

This record settles an obligation. It does not settle a name. It uses “stream view” for the secondary commit chain per state id, because §10.0 of the current specification already uses that phrase, and “derived” for its relation to the global stream. The name is provisional. The current specification also calls the same chain a “state stream” (§20.2) and the identifier of the chain the “state id”. None of these names is decided, and this record does not decide them.

ADR-002 Decision 2 made the stream view mandatory: the events carrying one state id, maintained as a secondary commit chain under refs/ges/<store>/streams/<encoded> (§20.2), which every conforming store maintains under conformance clause C22 (the clause that requires the global stream with its dual view). It gave two reasons: folding one entity’s history walks a short chain instead of filtering the global stream, and the Emmett binding needs the stream view.

Four facts in the specification weaken that decision.

  • §10.0 calls the stream view a materialized query, and states that a read of the query selecting a state id and a walk of the stream view return the same events in the same order. The stream view is therefore computable from the global stream. The same paragraph calls it “a performance view carrying a conformance obligation”.
  • §10.1 to §10.3 state: “Emmett compatibility is not required for GES conformance (§16.1) — a store satisfying the core tests is conformant whether or not it exposes an Emmett interface.” The second reason of Decision 2 serves a claim that conformance does not include.
  • §11 states: “The bottleneck of an event store is fsync latency, not compute. The write path is dominated by the cost of making data durable, not by serialization or the fold.” The first reason of Decision 2 is a speed argument that rests on no measurement, and optimizing for speed beyond the specification in the design phase is premature.
  • §18b.4 requires every event to carry a tag that identifies its stream view. ADR-002 recorded the consequence: the tags record field changed from MAY to MUST. An event that belongs to no entity, and a computed value without identity such as the total revenue of a year, has no state id. Such a value is the result of a query and a fold (§10.0), not a chain.

The history explains the arrangement. The specification was first designed for Emmett, a framework for classic event sourcing with one stream per aggregate. It was then changed into a store that complies with Dynamic Consistency Boundaries (DCB). A classic event store would have closed the path to DCB. The mandatory stream view is the part of the first design that remained in the core.

Decision 1 — The core requires equivalence, not existence

Section titled “Decision 1 — The core requires equivalence, not existence”

A store MAY maintain the stream view. The core does not require it. The core requires one property of every secondary stream view that a store maintains: reading the stream view returns the same events in the same order as evaluating the stream view’s query against the global stream. A stream view that diverges from that evaluation violates the specification. A stream view that does not exist does not.

Decision 2 — Tags are selectors, not routing

Section titled “Decision 2 — Tags are selectors, not routing”

An event MAY carry zero or more tags. §18b.4 no longer requires a tag that identifies the stream view. §6.2 keeps the tags field and drops its exception for that tag. An event without tags is a valid event, is totally ordered in the global stream, and is reachable by queries that do not select on tags.

Decision 3 — The Emmett binding carries the obligation

Section titled “Decision 3 — The Emmett binding carries the obligation”

A store that claims the Emmett binding (extensions/emmett-binding.md) MUST maintain one stream view per state id and MUST write the state id tag in the encoding that the binding fixes. The binding is the price of the compatibility claim. A store that does not claim the binding maintains none of it.

Decision 4 — Conformance clause C22 keeps the global stream only

Section titled “Decision 4 — Conformance clause C22 keeps the global stream only”

C22 continues to require the global stream, the sequencer designation and fast-forward-only reconciliation. It stops requiring the secondary chains per state id. The tag index of §18b.3 stays mandatory, because an append condition is evaluated against it (§9.2.2).

Keep the stream view mandatory (the state under ADR-002). Rejected: its first reason is an optimization that no measurement supports during the design phase, and its second reason serves a claim that §10.1 to §10.3 exclude from conformance.

Delete the stream view from the specification. Rejected: ADR-002 rejected it for the Emmett binding, and Decision 3 here keeps the binding workable without making the stream view mandatory for everyone.

A ladder of declared materialization levels (query only, stream views for declared tag keys, arbitrary named queries). Not chosen: it adds a conformance concept that the specification does not have, and §16 already lacks named profiles (R16 in ges-review-and-ears.md).

A registry of named queries that replaces the noun. Not chosen: it introduces a coined word where established words exist, and the glossary admits no second word for one thing.

  • The contradiction between §10.1 to §10.3 and the mandatory stream view is gone.
  • A computed state without identity needs no special case.
  • The specification no longer prescribes a storage structure for a speed gain without a measurement. A store that finds the fold slow adds a stream view and checks it against Decision 1.
  • The sentences in §20.2 and §10.0 that promise a short chain to walk become a description of a permitted stream view.
  • The state id tag lives inside the immutable record (§6.2). A store that starts without it cannot later claim the Emmett binding for its earlier history: adding the tag rewrites records, changes commit hashes and shifts global stream positions. A claim of the binding is therefore decided when the store is created, or it holds from a position onward.
  • Stores that mix writers with and without the state id tag give Emmett readers a stream view that is a subset of the events.
  • Wherever a clause cites the stream view’s ref as a unit of compare-and-swap or of merge, the clause needs an audit for a silent dependency on the ref’s existence.

These stay open until the maintainer answers them. Nothing above decides them.

  1. What is the stream view called? The names “stream view”, “state stream” and “state id” are undecided, and the glossary ges holds entries for two of them with status proposed.
  2. May an event carry more than one value of one declared routing key (for example customer:c3 and customer:c4)? If yes, the stream view stops being a partition and has no unique stream version for the Emmett expectedStreamVersion.
  3. Which requirement identifiers (the E-18b, E-10 and E-20 families), which conformance clauses and which of the 31 acceptance tests in §16.1 change, and which become “if offered”. Nobody has counted them yet.
  4. The wording of the equivalence rule needs a normative evaluation of a query (tag matching, event type filter, the after position, ordering by global stream position). Without it the check has no reference semantics.
  5. Whether the glossary entries for the stream view and the state id move into a glossary of the Emmett binding.

Git Event Store is an independent open specification for an event store that uses Git as its storage component. It is not affiliated with or endorsed by the Git Project or Software Freedom Conservancy. Git and the Git logo are either registered trademarks or trademarks of Software Freedom Conservancy, Inc., corporate home of the Git Project, in the United States and/or other countries.

Git Event Store is not affiliated with or endorsed by Kurrent, the maker of KurrentDB (formerly EventStoreDB). "Event store" is used here as the generic name of the event-sourcing storage pattern.