Skip to content

feat(state): Cloudflare-canonical exact-review records (state-repo retirement, phase 1) - #866

Merged
steipete merged 1 commit into
mainfrom
feat/cloudflare-canonical-records
Jul 26, 2026
Merged

feat(state): Cloudflare-canonical exact-review records (state-repo retirement, phase 1)#866
steipete merged 1 commit into
mainfrom
feat/cloudflare-canonical-records

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Make Durable Object SQLite canonical for exact-review records, with digest and monotonic revision fences, chunking for payloads above 1.5 MiB, and tombstones.
  • Atomically write canonical rows and a record_tuple append-window entry when POST acceptance succeeds, then terminalize immediately with a do-txn receipt.
  • Delete the structurally broken 380-line Worker git writer. Recursive tree reads always truncate against the 39.5 GiB state repository, so that path never committed successfully.
  • Make the materializer drain record_tuple appends into git as a projection, preserving tuple atomicity and chooseRecordTupleWinner semantics.
  • Add authenticated record get/list endpoints, migrate pre-deploy pending plans, and prune receipts after seven days.

The git state repository is now a projection for these records rather than the authority. This is phase 1 of full GitHub-storage retirement.

Proof

  • Exact-review direct-publication suite: 50/50 passing
  • State materializer suite: 8/8 passing
  • Build, lint, and format: passing
  • Autoreview: CLEAN on this exact tree (0.94); TruffleHog clean
  • Repo-wide failures: only the known macOS-environment set

Store canonical exact-review records in Durable Object SQLite with digest and monotonic revision fences, chunking above 1.5 MiB, and tombstones.

Make POST acceptance atomically write canonical rows plus a record_tuple append-window entry, then terminalize immediately with a do-txn receipt.

Delete the structurally broken 380-line Worker git writer: recursive tree reads always truncated on the 39.5 GiB state repository, so it never committed once.

Make the materializer drain record_tuple appends into git as a projection with tuple atomicity and chooseRecordTupleWinner semantics. Add authenticated record get/list endpoints, migrate pre-deploy pending plans, and prune receipts after seven days.

The git state repository is now a projection for these records, not the authority. This is phase 1 of full GitHub-storage retirement.
@clawsweeper

clawsweeper Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(state): Cloudflare-canonical exact-review records (state-repo retirement, phase 1) This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit a22af29 into main Jul 26, 2026
11 checks passed
@steipete
steipete deleted the feat/cloudflare-canonical-records branch July 26, 2026 06:17
steipete added a commit that referenced this pull request Jul 26, 2026
…ples (#867)

#866 overlaid tuple paths onto existing git state before validation, so an items→closed section move tripped the both-primaries check inside the whole-cycle transaction, wedging all projections (live failure since 07:04Z, 813 rows blocked, item openclaw-openclaw/113989); fix tombstones displaced primaries + stale sidecars, coalesces by highest revision, normalizes wedged payloads, isolates invalid tuples to durable dead-letters with bounded retries so cycles keep committing, keeps re-drains idempotent, adds canonical DO tombstones for section moves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant