Architecture Decision Records
This directory holds Architecture Decision Records (ADRs) — short, dated, append-only records of material decisions made about the project, its workflow, or its architecture.
Why ADRs
When a project compounds over months, decisions get lost. People forget why something was structured a certain way, then accidentally undo a deliberate choice. ADRs are a cheap, durable record of:
- What was decided.
- Why it was decided (context, alternatives considered, tradeoffs).
- When it was decided.
- Whether it's still in effect (Accepted / Superseded / Deprecated).
When a future PR challenges a past decision, the ADR is what we read first. If the decision is wrong now, we supersede it with a new ADR — we don't rewrite the old one.
Numbers carry the labels defined in Labels on numbers.
When to write an ADR
Write one when the decision:
- Constrains future work in a non-obvious way.
- Closes a question that someone might reasonably re-open later.
- Picks one of several plausible alternatives.
- Affects multiple modules or the workflow itself.
You do NOT need an ADR for: typical implementation choices that follow established patterns, single-file refactors, dependency bumps, or anything obviously revisitable inside a single PR.
Naming + numbering
docs/adr/NNNN-short-kebab-slug.md
NNNN— zero-padded sequence number, allocated in PR order. The next number is one greater than the highest existing.short-kebab-slug— 3–6 words.
Status lifecycle
- Proposed — drafted in a PR, not yet merged. The PR is the discussion.
- Accepted — merged. The decision is in effect.
- Superseded by ADR-NNNN — replaced by a later ADR; the new one explains what changed and why. The old one stays in the repo unchanged.
- Deprecated — no longer in effect, and not directly superseded (e.g., the constraint that motivated the decision no longer exists).
ADRs are append-only: once accepted, the text doesn't change — only the status header may change when a later ADR supersedes it.
To supersede an ADR: write a new one. In the new ADR's metadata header, set Supersedes: ADR-NNNN. In a follow-up commit on the same PR, update the OLD ADR's status header to Superseded by ADR-MMMM — but make no other changes to the old text.
Template
Copy template.md and fill in the sections. Keep ADRs short — 1 page is the target, 2 pages the cap. If the explanation is longer, the decision is probably too big for one ADR.
Index
Numbers 0001–0003 are unused: they recorded how the project itself was set up, not decisions about the software. Numbers 0004–0036 keep the numbering the decisions had when they were made; 0037–0039 record three earlier decisions that had no number. The design and its current state are in architecture.md and compatibility.md.
| # | Title | Status |
|---|---|---|
| 0004 | Paged messages for the add_messages reducer |
Superseded by ADR-0025 |
| 0005 | Acceptance bars for speed, disk and memory | Accepted (amended by ADR-0030, ADR-0035) |
| 0006 | PostgreSQL versions | Accepted |
| 0007 | Python versions | Accepted |
| 0008 | Patch placement in upstream's blob table | Accepted |
| 0009 | Rolling deploys through full-copies mode | Accepted |
| 0010 | Disk needed by rehydrate |
Accepted |
| 0011 | The saver leaves allocator settings alone | Accepted |
| 0012 | delete_for_runs is not an erasure guarantee |
Accepted |
| 0013 | Lifecycle on DeltaChannel threads keeps each chain |
Accepted |
| 0014 | Thinning keeps the newest N and each run's newest | Accepted |
| 0015 | copy_thread refuses a destination that has rows |
Accepted |
| 0016 | No index on the run id | Accepted |
| 0017 | Fence scope and what the loser sees | Accepted |
| 0018 | The fence token | Accepted |
| 0019 | Expiry by inactivity on the database clock | Accepted |
| 0020 | Head rows for threads only upstream wrote | Accepted |
| 0021 | rehydrate leaves head rows in place |
Accepted |
| 0022 | Head rows are written in every mode | Accepted |
| 0023 | A thread that expires under a live run is deleted | Accepted |
| 0024 | No index on the head row's last-write time | Accepted |
| 0025 | Convenience reads: thread listing only | Accepted |
| 0026 | History of one channel, deferred until measured | Superseded by ADR-0034 |
| 0027 | Thread listing is a function taking the saver | Accepted |
| 0028 | Listing's filter and order | Accepted |
| 0029 | The listing index | Superseded by ADR-0040 |
| 0030 | The large-thread put bar is judged on one saver |
Accepted |
| 0031 | A floor below which values are never patched | Accepted |
| 0032 | The base cache stays at 64 MiB | Accepted |
| 0033 | Cross-namespace bases, deferred | Accepted |
| 0034 | History of one channel, to be built | Accepted (not yet implemented) |
| 0035 | The concurrency bar compares with upstream | Accepted |
| 0036 | Compressed pending writes | Accepted |
| 0037 | Patch storage is on by default; rollback is a command | Accepted |
| 0038 | Deferred: compression as a serde wrapper, synchronous_commit = off |
Accepted |
| 0039 | Out of scope: element decomposition, projection, run leases, relay, blob cache | Accepted |
| 0040 | Include thread_id in the listing index |
Accepted |
| 0041 | Default zero-RTT pool checkout check in from_conn_string |
Accepted |
| 0042 | The savers take a pool, not a connection, a pipeline or a sync pool | Accepted |
| 0043 | Migration statements wait one second for a table lock, then retry | Accepted |