carlos / platform Public

Store versioning with noncurrent retention (opt-in per store) Feature Request open

Claimed by claude~paul@keymail.dev 1 week ago

Slopbox is moving onto Carloku with Plaza as its root app (Paul, 2026-11-22). Design: slopbox/slopbox docs/superpowers/specs/2026-11-22-carloku-plaza-design.md §17, on main.

Slopbox's sealed blobs are write-once, with random ids and tombstoned deletes. Without bucket versioning, a GC bug or a stolen store credential can destroy ciphertext for good. Carloku stores are unversioned (aws.go:220-223), and the media-conversion check requires versioning off.

Ask: opt-in versioning on app, environment and private stores, with noncurrent retention (30 days), and a store credential that cannot delete versions.

Paul, 2026-11-22: we build this ourselves, here, as a platform feature. A Slopbox session will claim this and bring a branch through the platform's review.

Design and a first build are up on branch store-versioning.

  • Spec: docs/superpowers/specs/2026-11-22-store-versioning-design.md (on the branch)
  • Census card: docs/superpowers/notes/census-proposal-store-versioning.md
  • Review brief: docs/superpowers/reviews/CODEX-REVIEW-BRIEF-store-versioning.md
  • Copy deck (draft, not reviewed): docs/superpowers/notes/store-versioning-copy-deck.md

What it does:

  • Versioning is opt-in on app, environment and private stores.
  • Old versions are kept 30 days by default (30 to 365, never lowered), on one platform lifecycle rule.
  • The store's own credential is denied every route to deleting a version or changing versioning, lifecycle or the bucket policy. A MinIO contract test checks this against a real server.
  • carlos store versioning on|off|status, carlos store versions, and carlos store restore, which is a copy and never deletes.
  • carlos store create --versioning, and carlos instances enable --store-versioning so private stores are born versioned.
  • Versioned stores refuse media conversion and browser uploads, and the console refuses to start with versioning on against non-AWS endpoints.
  • Old versions are metered.

Infra: a new store_versioning switch in region-host, off by default. Nothing is applied. Turning it on for Carloku is a tofu apply that needs Paul's scoped approval, after a release tag.

Status: ready for review, not for merge. Round 1 needs an Astra reviewer (I'm Claude, so I can't be the other family), plus a census verdict on #280, plus a copy review.

Status (stopping rule 8): store-versioning is held for one ruling from Paul, not merged.

  • Code review: - Round 1, Astra: NOT READY (3 P1, 3 P2), all fixed. The main change: there is no off, because a suspended bucket lets the app's own writes replace null versions. - Round 2: NOT READY, one P1: version listings don't request URL encoding, so a control-character key breaks listing and restore. That is round 1's recovery family again, so rule 2 stops further fixes until Paul chooses. Options and the recommendation are on #1380. - Round 2's four P2s are fixed and confirmed.
  • Census: approved by Astra, posted on #280.
  • Copy review: done on Astra, two passes (Luna is refused on this Codex account), and applied.
  • CI: running on the tip 8a67586ff.

Once Paul picks an option, round 3 checks that fix, and the branch can land.

Landed: store-versioning is on main as 5ecf38b (squash).

  • Astra reviewed it in three rounds, the last READY AFTER FIXES with the fix applied. Paul ruled option 3 on round 2's P1.
  • Census approved on #280. Copy reviewed in two Astra passes. CI green on the tip.

Nothing is switched on. Paul's remaining steps:

  1. Cut a platform release tag and push it to the GitHub mirror.
  2. Bump every ?ref= in carloku-infrastructure to it, then tofu init -upgrade.
  3. Set store_versioning = true on the console box's region-host module, tofu plan (expect only the new store-versioning policy and its attachment), then tofu apply.
  4. Set CARLOS_STORE_VERSIONING=1 on the console and restart it.