Skip to content

fix: reconcile durable storage on admission - #63

Merged
iamjr15 merged 1 commit into
mainfrom
fix/gateway-durable-storage-reconciliation
Jul 25, 2026
Merged

fix: reconcile durable storage on admission#63
iamjr15 merged 1 commit into
mainfrom
fix/gateway-durable-storage-reconciliation

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Repair production quota failures by reconciling supported Durable Object SQLite schemas before serving an object request.
  • Apply the same admission invariant to quota, idempotency, and rate-limit objects so dormant instances cannot retain stale schemas.
  • Preserve validated rows transactionally and retain the signed maintenance route for explicit bulk reconciliation.

Architecture

Durable Object admission remains strongly consistent and local. Existing objects first assert the exact current schema; supported predecessors are rebuilt inside one synchronous SQLite transaction, row counts are verified, and any failure rolls back. New objects initialize directly on the current schema.

Decisions Made

Decision Choice Reasoning
Migration timing Lazy on object admission Covers dormant objects without a fleet-wide ID inventory or a slow release barrier.
State preservation Validate and rebuild transactionally Prevents quota, idempotency, or rate-limit data loss.
Bulk maintenance Keep the closed-gate internal route Supports explicit verification and future schema contractions.

Test Plan

  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • Deploy the merged immutable SHA to the affected Cloudflare Workers.
  • Verify /usage and chat run creation directly on production with agent-browser.
  • Inspect browser console and production Worker logs for quota/schema errors.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cheatcode Skipped Skipped Jul 25, 2026 7:46am

Upgrade supported QuotaTracker, IdempotencyStore, and RateLimiter SQLite schemas atomically.
Reconcile when each object wakes, preserve validated rows, and retain the guarded maintenance path.
@iamjr15
iamjr15 force-pushed the fix/gateway-durable-storage-reconciliation branch from 97d37f2 to 951512d Compare July 25, 2026 07:46
@iamjr15
iamjr15 merged commit d1f2ef2 into main Jul 25, 2026
7 checks passed
@iamjr15
iamjr15 deleted the fix/gateway-durable-storage-reconciliation branch July 25, 2026 07:48
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