# Append-Only Log

> A design pattern that records history as immutable entries added at the end of the log.

Record: `architecture:append-only-log`
Kind: pattern
Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)
Severity: contextual
Scope: event store, audit, stream
Canonical: https://banes-lab.com/ontology#architecture-append-only-log

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Compensating Transaction](https://banes-lab.com/records/architecture/compensating-transaction.md) and before [Dead-Letter Queue](https://banes-lab.com/records/architecture/dead-letter-queue.md).

## Repair

- Refactored by: Append Events, Add Snapshot/Compaction
- Detected by: mutable event rows
- Violated by: updating historical records destructively
- Measured by: append-only compliance
- Enforced by: database constraints

## Requires

- [Immutable Events](https://banes-lab.com/records/lexicon/immutable-events.md)

## Reinforces

- [Auditability](https://banes-lab.com/records/architecture/auditability.md)
- [Event Sourcing](https://banes-lab.com/records/architecture/event-sourcing.md)

## Enables

- [Replay](https://banes-lab.com/records/lexicon/replay.md)
- [Temporal Queries](https://banes-lab.com/records/lexicon/temporal-queries.md)

## Conflicts with

- [In-Place Mutation](https://banes-lab.com/records/lexicon/in-place-mutation.md)

## In tension with

- [Storage Growth](https://banes-lab.com/records/lexicon/storage-growth.md)

## Tensions

- [Append-Only Log / Storage Growth](https://banes-lab.com/records/tension/append-only-log-storage-growth.md)

## Severity

- [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)

## Category

- [Event / Messaging / Asynchronous Architecture](https://banes-lab.com/records/architecture-category/event-messaging-asynchronous-architecture.md)

## Linked from

- [Coordination is software](https://banes-lab.com/disciplined-methodology/collaborate/coordination-is-software.md)
- [The board and the venue](https://banes-lab.com/disciplined-methodology/collaborate/the-board-and-the-venue.md)
- [Execution joins the halves](https://banes-lab.com/software-architecture/principles/execution-joins-the-halves.md)
- [Event / Messaging / Asynchronous Architecture](https://banes-lab.com/ontology/principles/architecture-category-event-messaging-asynchronous-architecture.md)
- [Observability / Auditability / Traceability](https://banes-lab.com/ontology/principles/architecture-category-observability-auditability-traceability.md)
- [Core Vocabulary](https://banes-lab.com/ontology/lexicon/lexicon-category-core-vocabulary.md)
- [Event Messaging Async](https://banes-lab.com/ontology/lexicon/lexicon-category-event-messaging-async.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)

## Evidence in the code

- [appendSection](https://banes-lab.com/source/coordination/tools/core/formatters/text.formatter.ts.md)
