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.
1.5 KiB
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;
terraformtreats its state as local/remote-backend concern, not versioned source. - Ownership of these paths is fixed to uid 10001 (ADR-0007).
- Recovery from earlier state drift is documented in
../../infra/terraform/README.md(terraform import).