IDSS storage module: an S3-compatible store that runs on an ordinary Linux box (no nix, no clan, no VM) #1754
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1754
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Design and build the IDSS storage module: a self-contained, S3-compatible object store that runs on an ordinary Linux box — no nix, no clan, no VM required.
This is the thing that holds every community's "IDSS offsite storage" copies (DDR 0268 decision 4). Nothing holds those bytes today: the backup engine's offsite resolver is never armed (#310,
deferred) and the Broker has no bucket to hand out.Why it cannot be a clan/NixOS module
ADR 0269 ruled the first host:
bens-mac-04, which is Ubuntu 24.04 on Mac hardware, not NixOS — a swarm host and local-guest drive host brought up by hand. Every other piece of IDSS server software is a NixOS module rendered by clan onto a clan-managed machine. None of that machinery exists on this host, and Ben ruled it must not be required.A clan/NixOS module may exist later, in addition (e.g. a community hosting storage for a partner community). It must never be the only way to run this.
Scope
Design
inventory.json(ADR 0082 §2, ADR 0104).bens-mac-042026-09-22: 60 GB free of 229 GB (73% used), 15 GB RAM / ~12 GB available — shared with swarm workers and drive images that churn tens of GB. Backups must not starve the drives; drives must not eat a community's only offsite copy.Build
storage.idss.nz→ Mātou infrastructure (Broker droplet) →bens-mac-04over NetBird (100.98.33.81). No router port-forward at Ben's house; no home address published. The*.idss.nzwildcard resolves everything, so the route must be explicit, never inherited from the wildcard.Acceptance criteria
bens-mac-04(Ubuntu 24.04, x86_64) with no nix, no clan and no VM anywhere in the procedure, and the procedure is written down and repeatable on a second plain box.storage.idss.nzserves the S3-compatible API from outside Mātou's network, with no port forwarded at the host's router.internal/backupengine'sS3Storedrives it end to end against a real bucket:Put/Get/List/Delete, and a sealed artifact +inventory.jsonland as plain objects readable with the community's keys and standard tooling.S3Store.Freereports real headroom (it answersmath.MaxInt64today), so a run refuses before it fills a target.Not in scope
Decisions
storage.idss.nz(the host ruling and the no-nix/no-clan/no-VM constraint).Why session
Host credentials for
bens-mac-04, Mātou's mesh and the Broker droplet, plus a new public DNS name in theidss.nzzone — live infrastructure, not swarm-sandbox work.Session report (ADR 0174) — two-way parts landed, public edge routed to Ben
Worked under the standing-session drainer on
bens-mac-04. This ticket bundles a two-way design + engine build with a one-way public-infrastructure edge; the two-way parts are landed and proven, the one-way edge stops on the human (below).Landed — commit
2d938d1bonmainDesign (ruled by agent under ADR 0174 — veto anytime):
docs/adr/0268-design-the-hosted-offsite-storage-target.md— the hosted offsite target: plain sealed objects besideinventory.json(ADR 0082 §2), one bucket + one scoped key + one quota per community, the Broker drives provisioning. The member-facing free-tier figure and the "Turn on" row copy are explicitly left to Ben (a trust-surface accept), not decided here.docs/adr/0269-idss-storage-runs-garage-on-an-ordinary-box-behind-storage-idss-nz.md— the host + store ruling: store = Garage (rationale recorded in the ADR 0104 line of reasoning: a frugal single static binary that fits a shared ~12 GB-RAM/60 GB-free box, whose per-bucket scoped keys +max_sizequota are exactly the Broker's model, keeping the sovereignty stance — the S3 object is the community's sealed file). Install/upgrade/supervise story, disk-accounting model, and the reachability design.docs/ops/idss-storage-install.md— a repeatable Ubuntu 24.04 procedure (dedicatedidss-storageuser, pinned + sha-checked binary,garage.tomlbound to the mesh address only, systemd unit, filesystem-enforced ceiling, and the by-hand bucket/scoped-key/quota commands the Broker verb will automate). Written to repeat on a second plain box.Build (acceptance 6):
OffsiteConfig.Quota+ a quota-awareS3Store.Free. It answeredmath.MaxInt64unconditionally; now, when a target carries a quota, it reports real headroom (quota − measured bucket usage, via a sharedeachObjectwalk, floored at 0) so a run refuses before it fills a community's only offsite copy. The generic-provider no-quota path staysMaxInt64(documented). Red-firstTestS3Store_FreeReportsQuotaHeadroom;internal/backup+internal/backupenginegreen,go vet+gofmtclean.Proven — live, against real Garage (acceptances 3, 4, 5)
A transient Garage
v1.1.0was stood up onbens-mac-04on loopback (high ports, so it never touched the pre-existing garage/services on this shared host) and torn down afterward — nothing persistent installed. Driven by the engine's ownS3Store:inventory.jsonlanded as plain objects;Get/List/Deleteround-tripped them;Freetracked944/1000→1000back;Putwas refused server-side by Garage (AccessDenied: Bucket size quota is reached, maximum total size of objects for this bucket: 1000. The bucket is already 56 bytes, and this object would add 2000 bytes).This also confirms the engine's hand-signed SigV4 path-style client speaks Garage's S3 surface with no third-party SDK. The production offsite resolver stays unarmed (#310, the Broker verb's job — out of scope;
WithOffsitestill has no caller).Proves it: the Go unit test (in tree) for the quota-aware
Free; the live Garage drive above for the store choice + credential/quota model + plain-object contract. Why two-way: the store pick is a config + a userspace install a session can revert, the code is additive, and the docs are docs.Why human
The remaining acceptance criteria are ADR 0174 one-way doors — Ben's hands, not a session's:
storage.idss.nzserving the S3 API from outside Mātou's network. New public surface = the #329-class security-posture widening the one-way-door list reserves for the human.idss.nzzone — the route must be explicit, never inherited from the*.idss.nzwildcard (ADR 0269 decision 2). Zone credentials are Ben's.storage.idss.nzover NetBird tobens-mac-04at100.98.33.81(no router port-forward at the house, no home address published). Mātou-infra config, not revertible-by-commit from a session.The proposed default for all three is written up in ADR 0269 "Reachability" + runbook §7 for Ben to accept or veto. Executing the persistent install on
bens-mac-04(acceptance 1) is best done in the same deliberate infra session as the public route — the transient drive above proved the procedure; standing the daemon up for real on the shared production host has no point until its public edge exists.Acceptances 1 and 2 are the human residue; 3, 4, 5, 6 are landed/proven above. Routing
ready-for-session→ready-for-human.unauthorizedfor every tag/digest) — every fresh founding reds at enroll-activate on podman-anysync-minio #1859unauthorizedfor every tag/digest) — every fresh founding reds at enroll-activate on podman-anysync-minio #1859unauthorizedfor every tag/digest) — every fresh founding reds at enroll-activate on podman-anysync-minio #1859Closed 2026-10-21 (Ben's ruling in the stale sweep): the engine and design landed (
2d938d1b, DDR 0268 / ADR 0269); the Garage cluster Ben runs is the public edge this ticket routed to him, and the free-tier figure and "Turn on" row copy are settled.