Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:52 • Ticket [18dae74ef1] quarry serve --data defaults into the first repository status still Fixed with 1 other change artifact: 0e75801453 user: zeitgeist
2026-08-19
15:55 • Fixed ticket [18dae74ef1]. artifact: a38eeb05f0 user: dmestas
11:04 • Ticket [18dae74ef1]: 3 changes artifact: 59da3380a6 user: dmestas
2026-08-18
18:40 • Ticket [18dae74ef1]: 1 change artifact: 8e588383f3 user: dmestas
2026-08-16
19:46 • New ticket [18dae74ef1]. artifact: 2510bfef15 user: dmestas

quarry serve --data defaults into the first repository

Fixed18dae74ef12bcfcd36bfc61e80e26f3b6ff1c6e8Created 106.2 days agoUpdated 68.0 days ago
Description2026-08-16 19:46:24
--data defaults to '.quarry' beside the FIRST --repo, so a multi-repo fleet writes its indexes, NATS state and OLTP database inside whichever repository happened to be listed first. On 2026-08-16 that put the whole derived-data directory inside the corpus that exists specifically to hold only source repositories.

The default is silent and its choice is arbitrary — the first flag, not a designated repo. Options: require --data explicitly, default to a path under the working directory, or default to a per-user location. Any of the three is more predictable than the current rule.

0001 §11 says derived data is disposable; that only helps if you can tell which directory is derived.

2026-08-19 15:55:11

Fixed, and the bug was worse than filed: "the first --repo" iterated a Go MAP, so the chosen directory was a coin flip per boot — two starts of the same command could derive into two different repositories.

The rule now lives in one function (dataDir, shared by serve and reindex) with one decision: a SINGLE repository defaults to .quarry beside it — deterministic and obviously derived — and a fleet without --data is REFUSED at startup with an error naming the repositories and the flag. No arbitrary default survives; the flag help says so at all three sites.

Chose refusal over a per-user or cwd default deliberately: any silent default migrating existing fleets would strand their current data in the old location and boot with empty indexes — a surprise rebuild. The refusal costs one explicit flag, once, and tells the operator exactly what happened. Deployments that already pass --data (ours does) see no change.