carlos / platform Public

spec: build on the demo fleet; no PSL, host-only demo cookies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 2d6b8f8c274cc4878af1878a07255c8a771a3538 parent 81710cc
1 file changed, +25 −15
  • docs/superpowers/specs/2026-11-02-agent-start-demo-design.md +25 −15
diff --git a/docs/superpowers/specs/2026-11-02-agent-start-demo-design.md b/docs/superpowers/specs/2026-11-02-agent-start-demo-design.md
index 69928f619..d763c832c 100644
--- a/docs/superpowers/specs/2026-11-02-agent-start-demo-design.md
+++ b/docs/superpowers/specs/2026-11-02-agent-start-demo-design.md
@@ -165,12 +165,19 @@ where that setting usually lives, then retry. here.now does the same.
- **Builds run offline,** against a module cache holding only the
allowlisted modules, in a throwaway environment with a hard time
limit.
-- **Behind a provider-neutral builder interface** (provider-neutral core
- rule). The first adapter is a hosted microVM service (E2B or a peer
- such as Modal Sandboxes, Daytona or Vercel Sandbox), chosen at plan
- time on price, start time and limits. A self-hosted adapter (a locked
- unit on a demo-fleet box) must also be possible, so self-hosters
- aren't tied to a vendor.
+- **Built on the demo fleet itself,** in a locked, throwaway unit with
+ the same isolation as a demo instance, no network and a hard time
+ limit. No third-party build service and nothing cloud-specific, so
+ self-hosters get the feature with no extra vendor (provider-neutral
+ core rule). The reasoning: with cgo off, no `go:generate` and an
+ offline allowlisted module cache, `go build` never runs the user's
+ code, and the demo fleet already *runs* that code once it's built, so
+ building there adds little risk. The fleet's boxes carry a prewarmed
+ build cache for the allowlisted modules, so a small app builds in
+ seconds. A build queue with a concurrency limit per box keeps builds
+ from starving running demos. (My call. Paul asked whether it had to be
+ E2B; a hosted microVM service remains a possible later adapter behind
+ the same builder interface if box CPU becomes the bottleneck.)
- **Static scanning** (gosec, govulncheck or Aikido) runs as a record,
not a gate. The gate is the allowlist plus the runtime limits; scans
can't recognise a phishing page, which is ordinary HTML.
@@ -222,17 +229,20 @@ where that setting usually lives, then retry. here.now does the same.
records only lock it down: null MX, `v=spf1 -all`, DMARC `p=reject`,
CAA issue and issuewild `letsencrypt.org`. No wildcard, no apex, not
an apps domain until the plan wires it.
-- **Submitted to the Public Suffix List,** so each demo counts as its own
- site in browsers (no cross-demo cookies).
+- **Not on the Public Suffix List** (Paul: we're too small to be
+ accepted). Instead the edge rewrites any `Set-Cookie` from a demo app
+ that names a `Domain` to a host-only cookie, so one demo's server can't
+ set cookies for its siblings. Cookies set from the page's own script
+ can still name the parent domain; that's accepted for 24-hour demos
+ with no accounts worth stealing. (My call.)
- **Random names only,** for example `bright-otter-42.<demo domain>`. No
user-chosen labels, so nobody gets `paypal-login.<demo domain>`.
- **Claiming moves the app to its normal `oncarlos.com` address.** The
demo URL then shows a short "this app has moved" page until the demo
name's 24 hours are up.
-Related but separate: `oncarlos.com` itself isn't on the Public Suffix
-List, so one tenant's app can set cookies that other tenants' apps
-receive. That gets its own discussion.
+Related but separate: the same cross-tenant cookie question for
+`oncarlos.com` already has its own discussion.
### 4.5 Claim
@@ -342,14 +352,14 @@ Mine (Paul can overrule any):
- Main deployment with a quarantined demo fleet, rather than a separate
deployment or a demo box among tenants' boxes.
-- A hosted microVM service for builds only, behind a neutral interface;
- the app itself never runs there.
+- Builds run on the demo fleet in a locked throwaway unit, not on a
+ third-party service.
- Claim happens in the agent session, with the link as a fallback.
- A request cap rather than a page-load cap, with a "claim to keep it
running" page at the cap.
- Import allowlist plus runtime limits as the gate; scans as a record.
- No outbound network for demo apps.
-- Random demo names only; the demo domain goes on the Public Suffix List.
+- Random demo names only; the edge makes demo cookies host-only.
- Starting numbers: 5 MB source, 2,000 requests, 200 MB bandwidth.
- Keymail users finish a claim in the browser through the claim link.
- A claim never picks an account silently when the email has several.
@@ -361,7 +371,7 @@ Mine (Paul can overrule any):
- The claim mechanism (fresh app plus data copy is the likely shape;
offline-move machinery may carry the data).
- Whether the agent gets a scoped credential after claiming.
-- The build provider, once prices and limits are checked.
+- Build queue sizing and the prewarmed cache's refresh.
- How the edge serves a second platform domain (regional domains, #447,
may already cover most of it) and injects the banner.
- Exact limits, budgets and the archive format.