backup: offsite target still refused at open — the only real coverage for a one-machine fleet (#310) #370

Closed
opened 2026-08-09 19:59:41 +00:00 by ben · 1 comment
Owner

Found by the #183 rehearsal ratchet's Stage-0 exploration (spec
docs/superpowers/specs/2026-08-09-183-vps-rehearsal-ratchet-design.md);
this is #310's slice surfaced as a rehearsal blocker — link them.

On a one-droplet community, backup honestly counts as nothing (DDR 0146:
backup-copy on the gateway is the principled refusal; a copy on a one-device
fleet is never coverage — internal/backup/coverage.go:310) and the UI says
so. The only real coverage — an offsite target — is refused at open:
StoreResolver.Open errors on any Offsite target
(internal/backupengine/targets.go:63) and OffsiteAvailable() is hard
false. Until it lands, the rehearsal's backup leg asserts the honest floor
message and the export valve only.

Acceptance: given a one-machine community with an offsite target configured,
when a backup runs, then the copy lands offsite and the Backups card counts
it as coverage — proven by the rehearsal drive's backup leg upgrading from
floor-assertion to offsite-assertion.

Found by the #183 rehearsal ratchet's Stage-0 exploration (spec `docs/superpowers/specs/2026-08-09-183-vps-rehearsal-ratchet-design.md`); this is #310's slice surfaced as a rehearsal blocker — link them. On a one-droplet community, backup honestly counts as nothing (DDR 0146: backup-copy on the gateway is the principled refusal; a copy on a one-device fleet is never coverage — `internal/backup/coverage.go:310`) and the UI says so. The only real coverage — an offsite target — is refused at open: `StoreResolver.Open` errors on any Offsite target (`internal/backupengine/targets.go:63`) and `OffsiteAvailable()` is hard false. Until it lands, the rehearsal's backup leg asserts the honest floor message and the export valve only. Acceptance: given a one-machine community with an offsite target configured, when a backup runs, then the copy lands offsite and the Backups card counts it as coverage — proven by the rehearsal drive's backup leg upgrading from floor-assertion to offsite-assertion.
Author
Owner

Landed in 17b8c12 on origin/main.

What was done: StoreResolver.Open no longer refuses an offsite target and OffsiteAvailable() is no longer hard-false. Armed via the new StoreResolver.WithOffsite(OffsiteConfig{...}) (endpoint / region / bucket / prefix / credentials), the resolver resolves an Offsite target to a new S3Store (internal/backupengine/targets_s3.go) — the S3-compatible offsite byte surface (ADR 0104), plain objects a cold read reads back with the keys + a JSON reader alone (ADR 0082 §2). Spoken over net/http with hand-signed AWS SigV4 and zero third-party SDK (stdlib crypto), path-style so any S3-compatible endpoint (AWS, MinIO, Garage, a partner community's site) works by URL. A half-configured target leaves the resolver unarmed (not coverage); an unarmed resolver still refuses honestly. Free reports ample room (object storage has no filesystem headroom).

Acceptance: given a one-machine community with an offsite target configured, a backup now lands the copy offsite and OffsiteAvailable() reads true, so the Backups overview's no-offsite-copy limit line (#314) retires automatically and the coverage map counts the offsite copy. Where the config comes from in production (config repo names the target, crown-jewel store holds the secret — ADR 0082) rides the family-close compose (#181); this slice makes the engine capable, unblocking the #183 rehearsal drive's backup leg to upgrade from floor-assertion to offsite-assertion.

Evidence: internal/backupengine/targets_s3_test.go — TestStoreResolver_Offsite (unarmed/half-configured refuse + read false; armed opens an *S3Store) and TestS3Store_RoundTrips (exact-byte round-trip through real SigV4 against an in-memory S3 that rejects unsigned requests). go build ./..., go vet, golangci-lint, go test (backup, backupengine) green.

Landed in `17b8c12` on `origin/main`. **What was done:** `StoreResolver.Open` no longer refuses an offsite target and `OffsiteAvailable()` is no longer hard-false. Armed via the new `StoreResolver.WithOffsite(OffsiteConfig{...})` (endpoint / region / bucket / prefix / credentials), the resolver resolves an `Offsite` target to a new `S3Store` (`internal/backupengine/targets_s3.go`) — the S3-compatible offsite byte surface (ADR 0104), plain objects a cold read reads back with the keys + a JSON reader alone (ADR 0082 §2). Spoken over net/http with **hand-signed AWS SigV4 and zero third-party SDK** (stdlib crypto), path-style so any S3-compatible endpoint (AWS, MinIO, Garage, a partner community's site) works by URL. A half-configured target leaves the resolver unarmed (not coverage); an unarmed resolver still refuses honestly. `Free` reports ample room (object storage has no filesystem headroom). **Acceptance:** given a one-machine community with an offsite target configured, a backup now lands the copy offsite and `OffsiteAvailable()` reads true, so the Backups overview's no-offsite-copy limit line (#314) retires automatically and the coverage map counts the offsite copy. Where the config comes from in production (config repo names the target, crown-jewel store holds the secret — ADR 0082) rides the family-close compose (#181); this slice makes the engine capable, unblocking the #183 rehearsal drive's backup leg to upgrade from floor-assertion to offsite-assertion. **Evidence:** `internal/backupengine/targets_s3_test.go` — `TestStoreResolver_Offsite` (unarmed/half-configured refuse + read false; armed opens an `*S3Store`) and `TestS3Store_RoundTrips` (exact-byte round-trip through real SigV4 against an in-memory S3 that rejects unsigned requests). `go build ./...`, `go vet`, `golangci-lint`, `go test` (backup, backupengine) green.
ben closed this issue 2026-08-09 20:44:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#370
No description provided.