GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id: design: cost & limits guardrails (serverless storage) (from #5681) · Issue #5868 · developing-today/code

id: design: cost & limits guardrails (serverless storage) (from #5681) #5868

New issue
Copy link
New issue
Copy link
Closed
#7591
Closed
id: design: cost & limits guardrails (serverless storage) (from #5681)#5868
#7591
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)epic/id-programReprioritization program epic (2026-11-12)status:donetask/triageQueue packet kind: verify, reproduce, and route this item
Milestone
ID platform program

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

Summary

Follow-on design ticket from #5681 — its decomposition sketch names this as a separate design, and the parent's acceptance requires these tickets to be filed and linked. Filed in the 2026-11-04 gap pass (WS-F) so the design work exists and can be prioritised on its own merits; implementation timing is a separate decision, possibly months out.

What this design must settle

Quotas, backpressure, and operator-visible warnings when a world approaches D1 or Turso ceilings.

Context from the parent

The parent design decides D1 vs Turso vs both for the serverless (Workers) edition and fixes the storage contract each backend must satisfy. The parent issue carries the surrounding decisions this ticket must not re-decide; where this ticket's answer would change a parent decision, record that explicitly rather than silently forking it.

Decision record expected

Close this design with a recorded decision (on this issue or in a doc/ record linked from it): the chosen shape, the alternatives rejected and why, and the invariants implementation must hold. If the design splits further, file the splits and link them here rather than growing this issue.

Relations

Parent: #5681. Programme: epic #2056. Filed by WS-F (2026-11-04 ID design gap & expansion pass).

Activity

Next
  1. dezren39
    added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1551

  3. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-k
    • Session / ID: task 10270
    • Found via: queue claim
    • Task: Triage issue id: design: cost & limits guardrails (serverless storage) (from #5681) #5868 (id: design: cost & limits guardrails (serverless storage), from issue design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681)
    • Expectation: execution lane assigned opencode by fleet queue lane for task 10270; the laptop opencode claimant launches the bound session, which drives task 10270 to its terminal state. This lane does not work it directly.
    • Links: n/a
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane 7b47536b-c162-444c-be8a-3a9538cc4cb5
    • Session / ID: task 10270
    • Found via: queue claim · repo-health-code-pilot
    • Task: Triage issue id: design: cost & limits guardrails (serverless storage) (from #5681) #5868 from design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681. Claim checkpoint recorded; issue is open. I will verify the request against current main before routing; no implementation will start without a scoped fix path.
    • Expectation: triage only; record the finding and any blocker/order on the issue, then complete or park with the exact reason.
    • Links: issue id: design: cost & limits guardrails (serverless storage) (from #5681) #5868, issue design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681
  7. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · triaged

    • Agent: queue worker (repo-worker-code), lane 7b47536b-c162-444c-be8a-3a9538cc4cb5
    • Session / ID: task 10270
    • Verified: issue id: design: cost & limits guardrails (serverless storage) (from #5681) #5868 and parent design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 are OPEN; current main is 04f7869. No matching design artifact was found on main, and the issue timeline has no cross-referenced PR.
    • Disposition: keep id: design: cost & limits guardrails (serverless storage) (from #5681) #5868 open as a design-only ticket; no implementation fix or PR is indicated. The requested deliverable is a cost/limits comparison and guardrails for D1/Turso ceilings, quotas, backpressure, and operator-visible warnings at single-user, small-community, and large-world scales.
    • Ordering: use design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 as the authority for storage/placement direction rather than re-deciding it here. Its latest architecture note says Turso embedded replicas, large atlas shards on both D1 and Turso, and cold storage at the home lab. Proceed with cost/limits evidence gathering; reconcile the recommendation with design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 and explicitly flag any evidence that would require changing its direction.
    • Links: issue id: design: cost & limits guardrails (serverless storage) (from #5681) #5868, parent design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681, current main commit 04f7869
  8. 11 remaining items

  9. developing-today
    added
    status:in-review
    on Nov 8, 2026
  10. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane 262eb403-3347-4a7c-ba6b-e7bc263ca853
    • Session / ID: task 12840 · OpenCode session ses_e5e45af79eeffe93j54ZK7v0TB
    • Found via: atomic repo-queue claim
    • Result: decision record landed as PR docs(id): cost & limits guardrails decision record for serverless storage (#5868) #7591 — doc/2026-11-08_decision_id5868_cost_limits_guardrails.md.

    Decision recorded

    A derived account + world budget meter with a fixed degrade ladder and typed refusals:

    1. Meters at account and world/shard scope — both vendors' quotas are account-scoped, so the account meter aggregates every world and shard, and each world gets an explicit allocation gated by whichever limit is reached first. Advanced from the per-query counters the backends already return (D1 meta.rows_read/meta.rows_written; Turso SQL-over-HTTP rows_read/rows_written), never from aggregate scans over the journal.
    2. Budgets are configuration, expressed as fractions of the plan ceiling. No vendor number is hardcoded.
    3. Four-state ladder normal → warning → degraded → refused per account, world and shard, with hysteresis (warn 50%, degraded 75%, journal-only reserve 90%, refuse 100%) and burn-rate projection.
    4. Fixed degrade order: advisory surfaces → bulk non-journal reads → deferrable writes → never journal appends. Refusing an analytics read costs a refresh; refusing an append can fork a world.
    5. Typed refusals, with Turso BLOCKED, D1 daily-limit and D1 overloaded mapped to distinct states (quota exhausted vs throughput saturated).
    6. Operator-visible guardrail state on the world status with the responsible shard and time-to-reset.
    7. Reservations before expensive work — replays, index builds, migrations and backfills reserve budget atomically before starting and settle from response counters after.

    Alternatives rejected

    Vendor-only (D1 Free fails closed at midnight UTC, Workers Paid is uncapped, Turso blocks at the call site — worst possible place: mid-append); a metering proxy on the journal path; static capacity planning alone (cannot survive backfills/replays, which are exactly the invoice events); and a single undifferentiated global account budget (no per-world attribution).

    Evidence

    • D1: free tier fails closed since 2026-09-01; Workers Paid has no hard spending cap; per-database single-threaded throughput; 10 GB hard database cap; 50 MB result cap.
    • Turso: BLOCKED on quota; overages opt-in per plan; row-scan accounting (an unindexed SELECT or count(*) bills every row walked); monthly plan quotas and sync allowances.
    • Cost arithmetic at all three scales from the recorded vendor rates, with assumptions stated per row so they can be re-derived when plans change.

    Flags for the parent (#5681) — recorded, not forked

    1. D1's uncapped paid overage is a live cost risk for placement-by-heat. Billing ceilings belong in the placement policy, not only latency and size. This narrows how D1 is used; it does not overturn "both".
    2. Turso BLOCKED mid-append needs a degrade-not-fail ruling. Interim answer recorded: the 90% reserve keeps the journal writable through 90–100% of the write budget.
    3. Turso plan continuity is unresolved (Supabase acquisition announced 2026-10-02); plan terms are configuration with a review date.
    4. D1's 10 GB hard cap means a hot shard must split, so the guardrail needs bytes-to-cap warnings (id: design: backend choice & migration (from #5681) #5867 owns the split mechanics).
    5. D1 read replication adds no charge but no write capacity — a hot writer placed on D1 expecting replicas to absorb it will be wrong.
    • Links: docs(id): cost & limits guardrails decision record for serverless storage (#5868) #7591 · design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681
  11. dezren39
    added
    epic/id-programReprioritization program epic (2026-11-12)
    and removed
    status:in-review
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  12. dezren39
    added this to the ID platform program milestone on Nov 12, 2026
  13. dezren39
    added a commit that references this issue on Nov 16, 2026

    Merge pull request #7591 from developing-today/queue/12840-5868-cost-…

    06d9df9
  14. dezren39
    closed this as completedin #7591on Nov 16, 2026
  15. developing-today
    added
    status:done
    on Nov 16, 2026
  16. dezren39
    added 4 commits that reference this issue on Nov 26, 2026

    feat(id-hosted): storage contract, budget ladder and backend manifest (…

    30e87a5

    feat(id-hosted): storage contract, budget ladder and backend manifest (…

    9884e9e

    feat(id-hosted): storage contract, budget ladder and backend manifest (…

    4ba5d6d

    feat(id-hosted): storage contract, budget ladder and backend manifest (…

    0e5535d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)epic/id-programReprioritization program epic (2026-11-12)status:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    • ID platform programNo due date

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.