Skip to content

CrumblES ADR-001: The Store Does Not Interpret What the Caller Writes

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

One part of this record is open: the form in which the Git translation writes data into the event file. See “Open questions”.

Amended 2026-10-23: decision 2 is narrowed. See “Amendment 1”.

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.

CrumblES appends events and answers queries over them. An event carries a type, a payload called data, zero or more tags, and metadata. The first implementation step needs a decision on how much of the payload and of the tags the store understands.

Event data. The Dynamic Consistency Boundary (DCB) specification at https://dcb.events/specification/ defines Event Data as the “Opaque payload of an Event”. A search of the core specification and its four extension documents found no place that requires the store to interpret the data. The application interprets the data in its read models and in its decision models, outside the store. For Git, the data is only files: a blob that Git stores and hashes without reading it.

Tags. The specification describes a tag as a key:value pair. Section 18b.1 (tags on an event) says an event MAY carry tags: string[] of key:value pairs. The record schema of section 6.2 repeats that form. A store that enforces the form must parse every tag it receives, and must define what a key, a value and a separator are.

Git itself constrains one thing. git check-ref-format rejects a colon in a ref name, so a tag cannot appear in a ref name as written. The specification already handles this: the tag index ref is refs/ges/<store>/tags/<encoded-tag> (section 3.2, the ref layout), and the encoding makes any string usable. git check-ref-format accepts a name such as customer&&&c2.

In the entities and the use cases of CrumblES, the data of an event is opaque bytes (Vec<u8>). The store does not parse, validate or index the bytes. The caller serializes the payload and deserializes it again after a read.

A tag is a plain string. The store does not check for a key:value form and does not split a tag into a key and a value. A caller that wants customer:c2 writes customer:c2. A caller that prefers customer&&&c2 writes customer&&&c2. The choice of a separator is the caller’s. Two tags are the same tag when their strings are byte-equal.

The maintainer’s words: “Yes tags are plain strings” and “it could be customer&&&c2 instead of customer:c2 but that is left to the caller”.

Specification CrumblES
Record schema (section 6.2): data is a JSON object, requirement level MUST data is opaque bytes in the entities and use cases; the form in the event file is open
Tags on an event (section 18b.1): a tag is a key:value pair A tag is a plain string; no form is checked
Record schema (section 6.2): tags holds key:value tags tags holds plain strings

CrumblES accepts every string that a key:value implementation accepts, and more.

Typed JSON data in the store. Rejected: it makes the store parse and validate a payload that the DCB specification calls opaque, and it ties the store to one serialization.

Enforce key:value on tags. Rejected: the store would need a grammar for key, value and separator, and every caller would pay for it.

Reject only the characters that Git refuses in a ref name. Rejected: the specification already encodes the tag in the ref name (<encoded-tag>), so the restriction would protect against a problem that the encoding already solves.

  • The store has no parser for data and none for tags. Its interface says what it does: it stores bytes and strings and compares them.
  • The caller keeps full control of serialization and of the tag convention.
  • The decision follows the DCB definition of Event Data as an opaque payload.
  • A reader of the event file cannot rely on a key:value tag. A tool that expects the form must handle a string without a colon.
  • The specification’s tag search (section 16b) and any consumer written against key:value tags see tags of a form that the specification does not promise.
  • Two stores that use different separators hold tags that do not match each other. The convention is the caller’s, so interoperability between callers needs an agreement outside the store.
  • The conformance claim needs a statement of the deviations above.

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

  1. In which form does the Git translation write data into the event file? The record schema of section 6.2 requires a JSON object. The alternatives are a JSON string, base64, or a file of its own beside the event file. The recommendation on the table is a JSON object. The maintainer has not answered.

Amendment 1 — 2026-10-23: no line break and no surrounding whitespace in a tag or a type

Section titled “Amendment 1 — 2026-10-23: no line break and no surrounding whitespace in a tag or a type”

Status: accepted on 2026-10-23, decided by the maintainer. The text above stays as it was accepted; this section narrows decision 2.

CrumblES ADR-002 copies the type of an event into a GES-Event-Type trailer and each tag into a GES-Tag trailer of the commit message. A trailer is one line of the form Key: value. A test program with gix 0.90.0, the Git library that CrumblES uses, showed two effects:

  • The tag x, followed by a line break and GES-Event-Type: Forged, produced a second, forged GES-Event-Type trailer.
  • gix trims the value of a trailer, so the tag " padded " came back as "padded".

So for such strings, decision 2 (any plain string is a tag) conflicts with ADR-002 (one trailer per tag). The event type has the same problem.

CrumblES rejects an event whose type or any of whose tags contains a line break (a line feed or a carriage return), or starts or ends with whitespace. The constructor of the event returns an error. crumbles append then exits with status 1, and the store stays unchanged, because the whole input is checked before anything is written.

The maintainer’s words: “a) reject it”.

Every other string stays a valid tag, as decision 2 says. The sentence “CrumblES accepts every string that a key:value implementation accepts, and more” under “Deviations from the specification” no longer holds for a key:value tag that contains a line break or surrounding whitespace.

Encode the trailer values reversibly, the way the specification percent-encodes a stream name in a ref name. Rejected: the trailers and the first line of the commit message stop being plain to read.

Use the trailers only as a first filter, and confirm each match against the event file. Rejected: a query would have to read the event file of every match, which gives up the purpose of the trailers in ADR-002.

  • A caller cannot store a tag or a type with a line break or with surrounding whitespace.
  • The trailers stay plain text, and a query can trust them.
  • The specification does not say which characters a tag may contain. That question is open as issue #17 of this repository, and upstream in the DCB specification as dcb-events/dcb-events.github.io issue #89. An answer from either can change this amendment.

Is an empty type or an empty tag rejected? The maintainer has not answered.

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.