Skip to content

Runtime tiers 0 / 1 / 2 #17

Closed
Closed

Description

@allisonmahmood

Question

What does each runtime tier permit and promise, at the product level? Tier 0: static, no JavaScript — which of PatchPage's serving guarantees carry over. Tier 1: code runs in the user's browser with the user's identity — against which APIs and data, with what limits. Tier 2: the patch has its own hosted runtime — what "own" means and what it can reach. What carries across tiers (identity, data access, sharing); how a patch declares its tier; whether a patch can move between tiers. The names stay 0 / 1 / 2, glossed for context.

Output: glossary entries and the Runtime tiers section of docs/product.md. Inputs: the tier 1 and tier 2 prior-art research.

Activity

  1. added
    wayfinder:grilling
    on Aug 26, 2026
  2. allisonmahmood commented on Aug 31, 2026

    @allisonmahmood
    OwnerAuthor

    Resolution

    Written on branch docs/runtime-tiers (docs/product.md § Runtime tiers; packages/patches/CONTEXT.md — Tier rewritten, Viewer and Patch identity added; packages/serving/CONTEXT.md — serving guarantee notes what narrows once auth lands). Not yet on main.

    A tier is where a patch's code runs, and nothing else. Tier 0 static, tier 1 browser, tier 2 hosted; tier 3 (no viewer present) and tier 4 (an agent's own computer — the shape Daytona fits) named, not designed.

    • Invariant: a tier never changes who can open a patch, what it may declare, or how it is published, versioned, shared, retired or found. The login door (seamless in-company, log in once and land back; Clerk likely) sits in front of the page at every tier; today there is no auth and it works without.
    • Public (anyone with the link) is allowed at every tier; above tier 0 it is pointless — an anonymous viewer carries no identity so nothing acts as them — and setting it warns the agent and the person.
    • Tier 0 keeps the page guarantees: script-free CSP, caching keyed to URL shape, open to any agent that may open it. "No session on the serving host" goes when auth lands: unwatched becomes the page cannot watch you.
    • Tier 1: code acts as the viewer, never holds a credential, gets identity as claims, and reaches primitives (yes, it gets them) and integrations only through Patchy, brokered as the viewer within their permissions. No direct outbound at all, credentialed or not — everything leaves through Patchy; that is what integrations are for. (A declared egress allowlist was considered and deferred.)
    • Tier 2: server-side code runs only while a viewer has the patch open — requests plus live connections to every open client (sync) — and costs nothing otherwise. The tier 2/3 line is "does this need to happen when nobody has it open?". Handler-shaped code in a fixed init layout; bring-a-whole-app is not promised (a second runtime; deferred). Two identities: company data and integrations as the viewer by default; the patch's own primitives as the patch identity — a principal of its own, accountable to the reassignable owner, starting with only its own primitives, shared integrations only by admin grant. No identity at any tier sees a raw credential. Viewers denied data see plainly that it is their access, not a broken patch.
    • Declaring and changing: explicit field in the repo, checked against the tree on every publish. Tier is per version; changing tier is publishing a version built for the new tier, rollback rolls the tier back, primitives persist across the change.

    Deferred, for the tier 1/2 runtime maps: bring-a-whole-app as a second tier 2 mode; a declared direct-egress allowlist; who consents to what a patch declares.

    Grilled by Claude Fable 5 via Claude Code with Allison, 2026-08-31.

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

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions