Durability

What it does

Durability14 here means four things:

rat-stack uses Effect29’s own primitives for each one, in real seams. Agents load the durability skill before they change one of these seams.

Each card below has five fields:

The incidents come from drovr on 2026-10-23.

1. Lease a connection for the query

2. Answer at commit; dispatch off the request

3. Set a provider timeout once

4. Bound work in flight

5. Scope waiters to the request

6. Climb a flag with a ledger

7. Fail open on liveness, closed on harm

The standard

The idle lease of 250 ms is a guess. drovr lists the same value with an expiry. Measure it before you depend on it.

How to check

  1. Run pnpm --filter @rat-stack/database exec vitest run test/connection-lease.test.ts.
  2. Run pnpm --filter @rat-stack/core exec vitest run test/join-answer-at-commit.model.test.ts.
  3. Run pnpm --filter @rat-stack/subscriber-delivery exec vitest run test/intake-timeout.test.ts.
  4. Run pnpm --filter @rat-stack/site exec vitest run test/intake-applications-concurrency.test.ts.
  5. Plant a bug and watch its fence fail:
    • Hold the lease for the whole request.
    • Run delivery before the answer.
    • Put "20 seconds" back in the agent intake.
    • Make the application read unbounded.
  6. Run pnpm turbo run check test build --concurrency=1 for the full gate.

Sources

  1. Durability skill. rat-stack. The skill hub and one principle file for each pattern on this page. Accessed 2026-10-23.
  2. Connection lease. rat-stack. Per-execution RcRef lease for the Hyperdrive Postgres executor. Accessed 2026-10-23.
  3. Join intake. rat-stack. Commits the contact, answers, and dispatches delivery after the response. Accessed 2026-10-23.
  4. Drovr intake adapter. rat-stack. DrovrIntakeTimeout, the one timeout both intake paths read. Accessed 2026-10-23.
  5. Workers context: waitUntil. Cloudflare. Work after the response keeps the Worker alive until it settles. Accessed 2026-10-23.

Last changed 2026-10-23 in 9b233db. Source on GitHub. Change log.

Linked from

  1. Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.

    Durability — Seven durable Effect patterns, each with its seam, its fence, and the incident that taught it.

  2. Change log. What changed in the files served here, newest first.

    Durability — edited: docs(durability): merge Switchboard’s research into the skill

  3. Database. One interface records action runs and their outcomes in either Cloudflare D1 or Postgres through Hyperdrive.

    See Durability.¶

  4. durability. Keep a rat-stack app standing when a provider, pool, or dependency slows down or a worker dies. Use at any I/O boundary, connection pool, provider call, shared waiter, fan-out, flag, gate, or work that can outlive a request, or when asked "what happens when this is slow", "add a timeout", "make this durable", or "what survives a crash".

    The public page is /systems/durability.¶

  5. Durability starts with a recovery record. A reading order for storage, replay, worker ownership, overload, and recovery tests.

    The durability system page shows the patterns rat-stack ships.

  6. Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
  7. Interest signup. Agent-only applications start email confirmation through interfaces owned by core and delivery implemented in a separate package.

    See Durability.¶

  8. Rat Stack systems | rat-stack. The systems rat-stack ships, the standard each keeps, and how to check it.

    Durability — Seven durable Effect patterns, each with its seam, its fence, and the incident that taught it.

  9. Source change history (log.md). The generated change log as Markdown.

    Durability — edited: docs(durability): merge Switchboard’s research into the skill