store-versioning
Opt-in object-store versioning for app, environment and private stores (discussion #1372; Paul, 2026-11-22: build it here, for Slopbox).
Status: held for one ruling from Paul (stopping rule 2), not merged.
- Code review (Astra): - Round 1: NOT READY (3 P1, 3 P2), all fixed. - Round 2: NOT READY, one P1: version listings without URL encoding. It is in round 1's recovery family, so rule 2 applies and the options are on #1380. Round 2's four P2s are fixed and confirmed.
- Census: approved, posted on #280.
- Copy review: two Astra passes (Luna is refused on this account), applied.
- CI: green at
8a67586ff.
Findings: docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md.
Change from the first description: there is no off. Versioning is permanent once on, and carlos store versioning is on|status.
Spec: docs/superpowers/specs/2026-11-22-store-versioning-design.md.
What changes
- Record: an additive
versioningblock on the store record (enabled,keep_days,at,by). It is never removed; off is a suspend. - Walks (
internal/objstore): an optionalVersionerinterface (AWS and in-memory). The grant walk versions a new store's bucket before minting its first key, and converges a block added to an existing store before the healthy short-circuit.ConvergeVersioningIndoes only that step. Teardown of a versioned store empties every version and delete marker. A backend with noVersioneris refused before anything is created. - Store credential: every store user's policy gains unconditional Denies on
s3:DeleteObjectVersion, retention/legal hold/governance bypass,PutBucketVersioning,PutLifecycleConfiguration,Put/DeleteBucketPolicy, object lock, replication andDeleteBucket. The boundary is unchanged and never allowed any of these. - Lifecycle: one platform rule (
carlos-noncurrent-versions) that expires noncurrent versions afterkeep_days(30 to 365, default 30, never lowered), with noNewerNoncurrentVersionscap. A lifecycle rule the platform did not write is never replaced. - Console doors:
POST/GET .../store/versioning(the POST takes a person only),GET .../store/versions?key=,POST .../store/restore. The store create body takesversioning, the store reply carries the block, and the instances manifest gainsstore_versioning, so private stores are born versioned. - Restore is a server-side
CopyObjectof the old version as a new current version, with no tags. It never deletes. - Media conversion and browser uploads refuse a versioned store, and versioning refuses a store that uses either.
- Sizing: a versioned store is sized by every version (
ListObjectVersions), so noncurrent bytes are metered and count towards plan limits. - Deployment switch:
CARLOS_STORE_VERSIONING=1(onobjstore.Deployment). It is refused without a backend and withCARLOS_STORE_ENDPOINT(AWS S3 only). - IAM (
infra/modules/region-host):store_versioning(default false) adds a customer-managedhost_store_versioningpolicy: five bucket actions,DeleteObjectVersion/GetObjectVersion/PutObjecton store objects, and a Deny of versioning and lifecycle writes on the deployment and data buckets. It uses the same dedicated-prefix preconditions asstore_conversion. The default plans no change. - CLI:
carlos store versioning on|off|status,carlos store versions,carlos store restore,store create --versioning [--keep-days],instances enable --store-versioning. The docs and parity rows are updated.
Tests
- objstore: the history Denys hold for every policy shape, and the policy fits IAM's 2,048-character limit. Grant ordering (versioned before mint), healthy-store convergence, the non-Versioner refusal, the foreign-rule refusal,
ConvergeVersioningIntouching only the bucket, teardown emptying versions, and the purge guard ignoring the block. AWS adapter stubs cover the rule-first ordering, the exact-rule match,EmptyVersions,ListVersionsandRestoreVersion's encoding. TestVersionedContractMinio, a new CI fixture in30-minio-contract: against a real MinIO, the scoped credential is refused version deletes (single and multi), suspending versioning, lifecycle and bucket policy writes, and bucket deletion, and root still sees every version.TestMinioFixtureTracksHistoryDenieskeeps the fixture's policy in step withstorePolicyJSON.- console: every door's refusals, person-only setter, keep_days rules, the declared store applied at grant, create --versioning, the restore flow including an undelete, the media refusal, sizing, private stores born versioned, and the enable flag. Claim fixtures are included.
- root CLI: wire shapes and printers.
- tofu:
store_versioning.tftest.hcl.
CI
Green at c953103e49795730d39c0a0a891b54b567db3e9e: the gate, the tofu tests (store_versioning.tftest.hcl 11/11), the MinIO contract step with TestVersionedContractMinio, staticcheck, code-health, race and gitleaks. One run hit TestDemoClaimKeptHeadless, and one hit a race-step internal/edge asset test. Neither touches this branch, and both passed on the rerun.
Census
Card docs/superpowers/notes/census-proposal-store-versioning.md: the region-host main.tf and variables.tf bodies, the new tftest file, and envelopes for ., internal/objstore, internal/provision and region-host. No root read is added.
Before it can ship
- Round 1 review of the spec and branch (Astra), and a census verdict on #280.
- Copy review of the deck and docs.
- Merge.
- A release tag, then a
?ref=bump in carloku-infrastructure, thentofu applywithstore_versioning = true. That apply is an IAM change in production and needs Paul's scoped approval. CARLOS_STORE_VERSIONING=1on the console.
🤖 Generated with Claude Code
Discussions 1 open
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev replied to Review: store versioning, spec and branch, round 1 of 3
- paul@keymail.dev pushed 3d379936c store: re-propose the census over origin/main
- paul@keymail.dev pushed 569d7499f Merge remote-tracking branch 'origin/main' into store-versioning
- paul@keymail.dev pushed 865a9242d store: the listing guard catches every call shape (Astra round 3 P2)
- paul@keymail.dev pushed 260fd7119 docs: store versioning review brief, round 3
- paul@keymail.dev pushed 1ae9761bb store: list store versions through one URL-encoding helper (round 2 P1)
- claude agent, operated by paul@keymail.dev replied to Review: store versioning, spec and branch, round 1 of 3
- claude agent, operated by paul@keymail.dev replied to Review: store versioning, spec and branch, round 1 of 3
- paul@keymail.dev pushed 8a67586ff store: fix Astra round 2's P2s; record round 2 and the stopping-rule hold
- claude agent, operated by paul@keymail.dev replied to Review: store versioning, spec and branch, round 1 of 3
- paul@keymail.dev pushed 5726426a9 docs: store versioning review brief, round 2
- paul@keymail.dev pushed 1858cf224 store: re-record the CLI golden cases and re-pin the census after round 1
- paul@keymail.dev pushed 7cdd220e6 store: fix Astra round 1 (no off, exact-version restore, older consoles)
- paul@keymail.dev pushed c805eaa43 docs: store versioning review brief names the current tip
- claude agent, operated by paul@keymail.dev replied to Review: store versioning, spec and branch, round 1 of 3
- paul@keymail.dev pushed c953103e4 store: count the versioning setter among the closed doors
- paul@keymail.dev pushed f1e9004d8 store: list the versioning doors in the console's guard inventories
- claude agent, operated by paul@keymail.dev opened Review: store versioning, spec and branch, round 1 of 3
- paul@keymail.dev pushed 56c93813c docs: store versioning review brief names the code tip
- paul@keymail.dev pushed 145b8fec3 store: record the CLI golden cases for versioning; re-pin the census
- paul@keymail.dev pushed a9d0fc3b3 store: opt-in versioning with platform retention and restore (#1372)
- paul@keymail.dev pushed c0ae07362 docs: store versioning design (#1372)