docs: record architecture decisions (ADR-0001..0009) and operations knowledge
Add docs/adr/ with a chronological ADR set reconstructed from the project history (no orchestrator, one storage format, derived-state sync, SQL-over-SSH contract, WireGuard beneath SSH, IaC boundaries, non-root image, runtime data paths, bounded lake scans), an index README, and a template. Distinguish repo-local ADRs from ecosystem-wide ASRs. Expand AGENTS.md with a decision-records section and a runtime/operations guide (service URLs, rebuild workflow, CPU budget knobs). Reference the ADRs from README, CONTRIBUTING, and the affected design docs, and add an open question for T1 partition pruning.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# ADR-0008: Shared `var/t1` / `var/t3` runtime paths; state out of Git
|
||||
|
||||
## Status
|
||||
|
||||
Accepted (2026-07-08)
|
||||
|
||||
## Context
|
||||
|
||||
Compose, the k3d fleet, and the ground offload job all need to read and write
|
||||
the same data lake, so that "go live" in the prototype shows the data the
|
||||
simulator just generated. Early on, Terraform state and the provider cache were
|
||||
accidentally committed (~6 MB of `*.tfstate` and a vendored provider binary),
|
||||
polluting history and risking stale/secret data in Git.
|
||||
|
||||
## Decision
|
||||
|
||||
Standardise two **gitignored** runtime directories at the repo root:
|
||||
|
||||
| Path | Tier | Contents |
|
||||
| --- | --- | --- |
|
||||
| `var/t1/` | T1 live lake | In-flight Parquet from Compose or the k3d fleet |
|
||||
| `var/t3/` | T3 warehouse | Offloaded historical partitions |
|
||||
|
||||
They are created automatically and overridable via
|
||||
`SWARM_T1_DIR` / `SWARM_WAREHOUSE_DATA` / `SWARM_SIM_DATA`. Treat `var/` as
|
||||
**runtime-only** per the ecosystem canonical layout. `.gitignore` excludes
|
||||
`*.tfstate`, `*.tfstate.backup`, and `.terraform/` while **keeping**
|
||||
`.terraform.lock.hcl` (the lock is source, the state is not).
|
||||
|
||||
## Consequences
|
||||
|
||||
- One lake feeds every component; the live prototype reflects real generated
|
||||
data.
|
||||
- Git history carries no machine state or large binaries; `terraform` treats
|
||||
its state as local/remote-backend concern, not versioned source.
|
||||
- Ownership of these paths is fixed to uid 10001
|
||||
([ADR-0007](ADR-0007-non-root-image.md)).
|
||||
- Recovery from earlier state drift is documented in
|
||||
[`../../infra/terraform/README.md`](../../infra/terraform/README.md)
|
||||
(`terraform import`).
|
||||
Reference in New Issue
Block a user