GES Extension: Stream export (JSONL interchange)
Part of the Git Event Store specification family. Extends the core specification
(../git-event-store-spec.md); RFC-2119 keywords per core §0.1. An implementation claims this extension per core §1.
Section and requirement numbering is retained from the pre-family document for E-ID and
cross-reference stability.
16d. Stream export (JSONL interchange)
Section titled “16d. Stream export (JSONL interchange)”16d.1. Implementations SHOULD provide export of a stream (or range) as JSONL — one event record per line — produced entirely by plumbing over the object store, without checking out any branch (no HEAD, index, or working-tree change). This is the sanctioned way to obtain a file-/stream-shaped, tool-friendly view and replaces working-tree materialization (§6.3.5.4).
16d.2. Mechanism. Enumerate the stream’s commits in ancestry (event) order (git rev-list --reverse <stream-ref>, optionally bounded by <snapshot>..<tip> or by position); resolve each commit’s single event blob (git ls-tree); and stream blob contents through a single long-lived git cat-file --batch to avoid per-event process forks (§11.6), emitting each record minified to one line terminated by \n. Output MUST be streamed, not buffered whole.
16d.3. Self-contained lines. Each emitted line MUST be a complete event record (§6.2). If the stored record was minimized (§6.3.3), the exporter MUST re-inject the header-derived fields so every line stands alone.
16d.4. Ordering and range. Lines MUST be in event order; range export maps to readStream bounds (§10.2).
16d.5. Interchange seam. The JSONL stream is the seam to external tooling — jq, DuckDB (read_json), other event stores, backups. A symmetric import (JSONL → appendToStream) MAY be provided for seeding/migration and, if provided, MUST honor concurrency (§9.2) and idempotency (§8.2.2).
Requirements (EARS)
Section titled “Requirements (EARS)”Moved verbatim from the companion catalog (../ges-review-and-ears.md); IDs unchanged.
- E-16d-1a Where export is offered, the exporter shall produce one self-contained JSON record per line in event order. (test 23)
- E-16d-1b Where export is offered, the exporter shall not perform any checkout. (test 23)
- E-16d-2 The exporter shall stream output rather than buffer the whole stream.
- E-16d-3 When the stored record was minimized, the exporter shall re-inject the header-derived fields so each line stands alone.
- E-16d-4a Where import is offered, the store shall apply each imported event through the append path under concurrency control (§9.2).
- E-16d-4b Where import is offered, the store shall deduplicate imported events by id (§8.2.2).
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.