Dynamic Workers + Durable Object Facets: A Safe Platform Pattern for AI-Generated Stateful Apps
Reference: Durable Object Facets.
Dynamic Workers plus Facets enable per-app durable state for generated code. The key is separating volatile code from stable state authority.
Blueprint
- signed module loader
- restricted runtime sandbox
- per-app facet namespace
- policy proxy for outbound calls
- immutable audit stream
Isolation
Use compute, state, and egress boundaries together. Prompt instructions are not a security boundary.
Lifecycle
Generate -> static scan -> sign -> canary -> promote.
Metrics
Module load latency, warm/cold ratio, facet growth, denied egress, rollback rate.
Hardening in 30 days
Default deny outbound, runtime signature checks, per-facet storage caps, one-click rollback.
Closing
AI-generated app platforms can move fast if rollback and auditability are designed before scale.