Skip to content

Slim borg: one small app that checks the local twins against a real deploy #855

Closed

Description

@QuinnsCode

The local twins copy Cloudflare's shapes. Nothing checks that they copy its behaviour, and the gaps only show up after a deploy. Slim borg is the thin rig for that: one small Worker that uses every binding once, and one suite that runs the same checks against any URL.

In the first PR (apps/borg):

  • Checks: kv, d1, d1-batch (atomic), r2, do (input gate, one object per id), ws (hibernation attachment), queue (consumer delivery)
  • Tier 1, free, every PR: bun test test builds the real dev host and runs the suite on the local twins
  • bun borg.ts <url> runs the same suite against a deploy or a running host
  • The two twin bugs it found on its first run, fixed: D1 batch() wasn't atomic, and local Durable Objects had no input gate

Still to do:

  • Tier 2, free tier, nightly or on a label: deploy to workers.dev, run borg.ts, destroy, publish the grid. This needs a Cloudflare token as a CI secret, which only the owner can add.
  • Check that the whole stack (Queues and R2 included) deploys on a Free-plan account, or put the paid-only bindings behind a flag
  • A /limits check: go over CPU, memory and bound parameters on purpose, and report where the twin is looser than the edge
  • The box target (build box) in tier 1
  • Guard rails for any run that costs money: a cost cap from plan, destroy even when checks fail, and a sweeper for anything tagged borg older than an hour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions