carlos / platform Public

Review: store versioning, spec and branch, round 1 of 3 open review pending

On branch store-versioning

Round 1 review of the store versioning design and its build (#1372), for a reviewer from the other model family (Astra; the author is Claude Opus 5.5).

Brief: docs/superpowers/reviews/CODEX-REVIEW-BRIEF-store-versioning.md on this branch. It names the code tip, the spec, the census card (verdict to record on #280) and the nine things to check. Stopping rules apply: three rounds at most, and stop at the first round with no P1.

Review at tip c953103e49795730d39c0a0a891b54b567db3e9e, where CI is green. The brief names 145b8fec3. The two code commits after that only add the four doors to the console's guard inventories (record-write census re-pin, authority sites, claim routes, closed doors, the managed-fleet pinned policies) and make the two GET doors refuse on a host-claim console as the writes do. Read the diff origin/main..c953103e4.

Round 1: Astra (gpt-6-astra, effort high, codex exec -s read-only) on c953103e4: NOT READY. It found 3 P1s and 3 P2s and approved every census unit and envelope. All six are fixed in 7cdd220e6; the golden corpus and census were re-recorded in 1858cf224.

  • P1, suspension and restore could destroy history. In a suspended bucket an app's own PutObject replaces a null version. Fixed by cutting off (stopping rule 2's second option): versioning is permanent once on, and restore refuses a bucket that isn't Enabled.
  • P1, 100 overwrites could hide old versions from recovery. The listing now pages (--after), and restore finds a version by its id.
  • P1, an older console silently dropped versioning. The CLI now refuses before provisioning, or before reporting success on instances enable.
  • P2s: --keep-days is validated client-side, create never lowers retention, and create with versioning is person-only.

Findings and dispositions, with Astra's reply in full: docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md.

Copy pass: Luna is refused on this Codex account, so it ran on Astra; the result is applied (docs/superpowers/notes/copy-luna-store-versioning.md).

Round 2 (brief CODEX-REVIEW-BRIEF-store-versioning-R2.md) is running on 1858cf224.

Round 2: Astra on 1858cf224: NOT READY. It found 1 P1 and 4 P2s, and approved every census unit again.

  • Round 1: five findings resolved. One P1 is partly resolved and carried forward.
  • The P1: the version listings don't request EncodingType: url. So a key containing a control character makes listing and restore fail to decode, and any key can be poisoned by a longer key under the same prefix. This is round 1's "retained versions stay recoverable" family two rounds running, so stopping rule 2 applies: no third fix without Paul's choice (see below).
  • The four P2s (next-page line, --keep-days ordering and explicit 0, two copy lines) are fixed in 8a67586ff. Astra's in-budget check of that diff: P2 FIXES CONFIRMED, and the census . envelope is approved.

Paul, the choice for the P1:

  1. Refuse such keys up front at the API. Incomplete: the app's own credential can still write one straight to S3.
  2. Cut carlos store versions and restore. This loses the owner's recovery path.
  3. Enforce the invariant in one place (recommended, by Astra and me). Every ListObjectVersions call goes through one helper that sets EncodingType: url and decodes keys and markers once. A guard test fails on any other call site, plus an XML fixture with control characters, % and +. That would be round 3.

Details: docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md, round 2 section.

Paul's ruling on the round 2 P1 (stopping rule 2), 2026-11-22: option 3, as relayed from the Slopbox session by its coordinator: every version listing goes through one helper that requests and decodes URL-encoded keys, plus a test that fails on any other call site. (I don't have Paul's words verbatim; this is the relay as given.)

Building it now:

  • the helper;
  • the call-site guard;
  • an SDK-level XML fixture with control-character, % and + keys, including a planted key under an ordinary key's prefix that must not break listing or restoring that key.

Then round 3.

Round 3: Astra on 1ae9761bb: READY AFTER FIXES. No P1, and round 2's P1 and all four P2s are resolved.

  • Option 3 as built: objstore.ListObjectVersionsPage requests EncodingType: url and decodes every key, marker and prefix once. All four listing paths use it: listing, restore's lookup, teardown and sizing. A call-site guard backs it, plus a fake S3 speaking real XML with control-character, %, + and space keys and a planted blobs/a\x01planted beside blobs/a. Teardown also deletes keys XML can't carry one at a time, by URL.
  • The one P2 was that the guard missed method values, initializers and the SDK paginator. It is fixed without reopening the review (test-only).
  • Then: origin/main was merged and the census re-proposed. Astra's in-budget check: FIXES AND CENSUS CONFIRMED at 3d379936c.

Findings, all three rounds: docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md. Landing once CI is green.