Artifact 8fb89ae70aafb5fab9e1bfe62463870f387bb441e4e60af3e89138173e1aec3b:
- File
cmd/quarry/analytics_duck.go
-
2026-08-25 19:24:56
— part of check-in
[564f272d3c]
on branch ops-history
— ops: history, not just a snapshot
The rings die with the process, and this fleet restarts constantly — a 4.24s render and a 546 load average both left no trace. obs.Sink had one implementation and it did nothing; this is the durable one.
DuckDB because the workload is columnar: append-only, time-ordered, aggregate-queried, never point-looked-up by a page. RFC 0001 defers the lake to 'when hydration and analytics — the things columnar is for — exist', and reserves the operational surface for SQLite. This is that analytics workload, not a second operational store. Wide flat tables, no keys and no indexes, which is also what a Parquet COPY TO wants when the lake arrives.
Isolated behind a build constraint, in its own package, imported only by the composition root. Both halves of the reason were measured rather than assumed: CGO_ENABLED=0 fails on go-duckdb's bindings, and GOOS=js reports 'build constraints exclude all Go files'. Leaving the import off the request path is not enough — any reachable import breaks a wasm build — so cmd/quarry has two files, one per side of the tag. Verified: GOOS=js GOARCH=wasm builds cmd/quarry clean at 76MB, without DuckDB.
Buffered, never a write per request, and flushed on a timer so a quiet forge still lands rows rather than holding them in memory for days.
Failure is not fatal. The first run failed on 'at' being reserved in DuckDB; the server started anyway, the panels worked, and the log said what was wrong. Analytics is derived data about a forge that works without it.
Costs, measured: +462MB module cache, binary 57MB -> 104MB, cold build +10s, and CGO_ENABLED=0 no longer builds the server. (user: dmestas, size: 1324) [annotate] [blame] [check-ins using]
- 2026-08-25 21:08:45 — part of check-in [61c32a8057] on branch trunk — Accepted. History, with the cgo cost taken knowingly and the wasm path verified intact. (user: dmestas, size: 1324) [annotate] [blame] [check-ins using]
-
2026-08-25 19:24:56
— part of check-in
[564f272d3c]
on branch ops-history
— ops: history, not just a snapshot