CrumblES ADR-002: Commit Trailers of an Event Commit
Status
Section titled “Status”Accepted — 2026-10-23 (decided by the maintainer, Tobias Brennecke)
This record concerns the implementation, CrumblES. The specification stays unedited. Where the decision deviates from the Git Event Store (GES) specification, the section “Deviations from the specification” names the deviation.
Context
Section titled “Context”We store and retrieve events from an event stream. The tension is conciseness and precision against ambiguity: a short trailer name is cheap to read and to write, and a short name can mean more than one thing.
Two earlier decisions of the same day set the frame.
- An event (type, data, tags, metadata) is one immutable Git object, addressed by its hash.
- Type and tags are copied into commit trailers. A query reads only commit messages and loads the event object only for a match. In the maintainer’s words: “We need the type and the tags for querying. And some trailers for GES. … So for the queries we need a way to query the global stream without reading the data.”
One trailer carries one tag. The tag index of section 18b.3 (one ref per tag, rebuildable from the records) comes in a later increment.
The first step has no state streams. The maintainer decided: “The “state streams” … are an increment in complexity and thus to be omitted here.” The specification’s commit model (section 7.3) lists a trailer for the stream name and one for the stream position, which exist only with state streams.
Measured facts
Section titled “Measured facts”Measured with Git 2.54.0 on 10,000 events with 3 tags each:
- Repeated trailers are kept in order, an exact duplicate included.
- Type and tag trailers add about 74 bytes per event after
git gc --aggressive. - Reading all commit objects took 71 to 78 ms. Reading commits, trees and event files took 189 to 197 ms.
- One delimited
GES-Tags:trailer, in place of one trailer per tag, saved about 1.5 bytes per event and needs an escape for a tag that contains the delimiter. - A message that consists of trailers only is accepted by
git commit-tree, but Git reads the block as the subject.git interpret-trailers --parseand%(trailers:...)ingit logreturn nothing, andgit log --onelinejoins all lines into one subject. - Git keeps no index of commit messages.
man gitformat-commit-graphlists only the object id, the root tree, the parents, the generation number, the commit date and a changed-path Bloom filter. A query over commit messages therefore reads the commit objects.
Decision
Section titled “Decision”Decision 1 — The names of the trailers (set C)
Section titled “Decision 1 — The names of the trailers (set C)”An event commit carries these trailers:
| Trailer | Value |
|---|---|
GES-Format-Version |
the format version of the record |
GES-Sequence-Position |
the sequence position of the event in the global stream |
GES-Event-Type |
the event type |
GES-Tag |
one tag; the trailer repeats once per tag |
Each name uses the established term. “Event Type”, “Tag” and “Sequence Position” are terms of
the Dynamic Consistency Boundary (DCB) specification. “Format version” is the term of the
glossary glossaries/ges.glossary.yaml, entry format-version. A word is qualified exactly where
it has two meanings in that context: “version” (format version, stream version) and “position”
(sequence position, stream position).
Decision 2 — One trailer per tag
Section titled “Decision 2 — One trailer per tag”Each tag is its own GES-Tag trailer. No delimited list. The saving of a delimited list is about
1.5 bytes per event, and it needs an escape for a tag that contains the delimiter. Because a tag
is a plain string (CrumblES ADR-001), any
delimiter can occur in a tag.
Decision 3 — The tag index comes later
Section titled “Decision 3 — The tag index comes later”The first step adds no tag index. A query reads the commit messages. The maintainer answered “yes” to adding the tag index of section 18b.3 in a later increment.
Decision 4 — The message has a first line before the trailer block
Section titled “Decision 4 — The message has a first line before the trailer block”A commit message cannot consist of trailers only (see the measured facts). An event commit therefore starts with a first line, then an empty line, then the trailer block.
Decision 5 — The first line is the event type followed by the tags
Section titled “Decision 5 — The first line is the event type followed by the tags”The first line is the event type followed by the tags, separated by spaces, with no position.
Example: OrderPlaced order:o1 customer:c1 product:p1 product:p2.
The maintainer asked “why include the position?” and answered “yes” to the form above. The reasons on the table:
- The sequence position is already in the trailer
GES-Sequence-Position. - Git shows the order through the history.
- The first line of section 7.2,
<streamName>: <Type> @<streamPosition>, carries a stream position, which the first step does not have.
The first line is a readable copy for git log --oneline. Queries read the trailers.
A full event commit message reads:
OrderPlaced order:o1 customer:c1
GES-Format-Version: 1GES-Sequence-Position: 5GES-Event-Type: OrderPlacedGES-Tag: order:o1GES-Tag: customer:c1Deviations from the specification
Section titled “Deviations from the specification”Section 7.3 (commit model) lists the trailers GES-Version, GES-Stream, GES-Position and
GES-Sequence.
| Specification | CrumblES |
|---|---|
GES-Version |
GES-Format-Version replaces it |
GES-Sequence |
GES-Sequence-Position replaces it |
| the type only in the first message line (section 7.2) | GES-Event-Type is added |
first message line <streamName>: <Type> @<streamPosition> (section 7.2, MUST) |
<Type> <tag> <tag> …: the type followed by the tags, no position |
GES-Stream, GES-Position |
absent, because the first step has no state streams |
GES-Tag: <key:value> (section 6.2.3, SHOULD) |
the name is unchanged; the value is a plain string |
Alternatives Considered
Section titled “Alternatives Considered”The maintainer weighed these sets of names.
Set A: GES-Version, GES-Sequence, GES-Type, GES-Tag. Shortest. Rejected: “version” and
“sequence” are each ambiguous. The glossary bans the bare word “version”, and “sequence” alone
does not say that it is a position.
Set B: GES-Format-Version, GES-Sequence-Position, GES-Type, GES-Tag. Qualifies the two
words that need it. Not chosen: “Type” alone is not the established term. The term is “Event
Type”.
Set D: GES-Format-Version, GES-Event-Sequence-Position, GES-Event-Type, GES-Event-Tag.
Every name carries “Event”. Not chosen: “Event Sequence Position” and “Event Tag” are not the
established terms. The established terms are “Sequence Position” and “Tag”.
Set C (chosen): qualifies a word exactly where it has two meanings, and uses the established term elsewhere.
One delimited GES-Tags: trailer. Rejected in Decision 2.
Consequences
Section titled “Consequences”Positive
Section titled “Positive”- A query selects by type and by tag from commit messages alone. It loads the event object only for a match.
- Every trailer name is an established term of the DCB specification or of the glossary.
- Tags with any content are safe, because there is no delimiter to escape.
Negative
Section titled “Negative”- A tool written against section 7.3 of the specification looks for
GES-VersionandGES-Sequenceand does not find them. - The trailers are a denormalized copy. The authoritative values are in the event object. A commit message can change by a rebase, and the event object cannot.
- A query without a tag index reads every commit object in range: 71 to 78 ms for 10,000 events in the measurement above. The cost grows with the stream until the tag index exists.
- Each tag costs one trailer line in every commit that carries it.
- The first line repeats the type and the tags that the trailers already carry. A tag that contains a space cannot be told apart in the first line. No query is affected, because queries read the trailers.
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.