carlos / platform Public

copy: Luna pass on demo operator docs and CLI help

Delegated copy review per Paul's standing rule; applied verbatim in
9a56c9f4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 811cb3a8a9a2e5efbc9c75ca11910c2f7e6d8891 parent 9a56c9f
2 files changed, +135 −0
  • docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-2-DOCS.md +83 −0
  • docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-2-DOCS.md +52 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>b9h71n7lo</task-id> <tool-use-id>toolu_016rKK6KLqzHjtFaJ2f3vGgg</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/6e566fe9-9aca-47cb-9753-64e881b0d285/tasks/b9h71n7lo.output</output-file> <status>completed</status> <summary>Background command "Wait for the final fix wave" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 26.2 g CO₂e (3,147,718 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on agent-start-demo-2, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-2-DOCS.md b/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-2-DOCS.md
new file mode 100644
index 000000000..d8927e57e
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-2-DOCS.md
@@ -0,0 +1,83 @@
+# Copy pass brief: demo edge protections operator docs and CLI help (branch agent-start-demo-2)
+
+You are reviewing user-facing strings for a hosting platform. Paul, the owner, delegated this review to you. Apply his house rules and return improved strings.
+
+The feature: anyone can ask their own AI coding agent to build a small app, with no account. The platform runs it for 24 hours at a random address such as `bright-otter-42.example.com`. This release protects those anonymous demos: the platform inserts a fixed warning bar at the top of every page the demo serves (with a "report abuse" link), applies a strict browser security policy, caps each demo's lifetime traffic (2,000 requests and 200 MB by default), lets the operator switch all demo serving off and take a single demo down, and keeps a small queue of abuse reports for the operator. The deck is the table at the end of this brief: ID, surface and draft text.
+
+Audiences:
+- **Visitors to a demo** (banner, report link, the plain error pages: limit, stopped, gone, unavailable, cannot be shown). Anyone on the web, often non-technical, who opened a link someone shared. No jargon, no internals. Say what happened and, where there is one, what they can do.
+- **Report form** (console page a visitor opens from the banner). Same audience.
+- **Operator CLI** (`carlos system demos ...` help, flag help, status labels and confirmations, configuration error). Read by the platform operator. Plain and precise; command names and flags stay exactly as written.
+
+## House rules
+
+- Plain words, short sentences, no marketing tone, no exclamation marks.
+- No em dashes or en dashes used as dashes. Where you would use one, end the sentence with a full stop and start a new sentence.
+- Sentence case, full stops on sentences. Labels, table headers and button text have no full stop.
+- Leave command lines, flag names, environment variable names, HTTP status codes and paths exactly as they are.
+- Do not name the product. Neutral examples only (`shop`, `example.com`).
+- Human text only.
+
+## Facts that must stay true
+
+- A demo lives 24 hours from creation and is never extended without claiming. Claiming is not available in this release (DEMO-LIMIT-PRECLAIM is the one used now; DEMO-LIMIT is for a later release when claiming exists, and uses a private claim link the person's agent gave them).
+- Nothing is backed up.
+- The warning bar is a notice. The demo's own code could hide it; do not promise it is always visible.
+- Hitting a limit stops the demo serving for the rest of its 24 hours; its data is kept until it expires.
+- "Serving off" stops all demos serving; responses already being sent may finish. Takedown removes one demo: it first stops serving, then its data is deleted (cleanup), which may be pending for a while.
+- Reports go to the platform operator. Nothing is emailed. Reporters should not include passwords or personal information.
+
+Additional audience for this deck: **operator docs** (README section and docs/site/cli.md) for the platform operator: ordinary sentence case, full stops, plain and direct. Markdown table rows (`<br>` marks line breaks) keep their table structure; code spans, variable names, commands and numbers stay exactly as written. Already-approved strings from the first pass (banner, pages, form, CLI labels) appear verbatim inside this prose; leave those unchanged.
+
+## Output
+
+Do not edit any file. Answer with one markdown table, `| ID | new | why |`, one row per deck row in deck order, every row included, `unchanged` in why when you keep a string. Then a short **Flags** list for anything you could not fix within these rules (a fact you think is wrong, a statement that contradicts another row). Nothing else.
+
+## Deck
+
+|---|---|---|
+| README-01 | README.md | ### Anonymous demo apps in development |
+| README-02 | README.md | Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups, and data is not recoverable after box loss. Demos cannot send mail, use object storage or schedules, run sidecars, or use custom domains. Claiming is not available in this release. |
+| README-03 | README.md | Keep admission and serving off until the designated dev witness and branch review have passed. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything. |
+| README-04 | README.md | Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty when you first enable admission, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box. Do not share that fleet with ordinary apps. |
+| README-05 | README.md | Set these variables on the console: |
+| README-06 | README.md | \| Variable \| Setting \|<br>\| --- \| --- \|<br>\| `CARLOS_DEMO_APPS` \| `1` enables admission; leaving it unset keeps admission off. \|<br>\| `CARLOS_DEMO_ACCOUNT` \| The dedicated holding account's sqid. \|<br>\| `CARLOS_DEMO_FLEET` \| The fleet owned by that account. \|<br>\| `CARLOS_DEMO_DOMAIN` \| Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone or another domain claim. \|<br>\| `CARLOS_DEMO_CREATE_PER_IP_DAY` \| Positive integer. Default `30`. IPv6 callers share their /64 budget. \|<br>\| `CARLOS_DEMO_CREATE_GLOBAL_DAY` \| Positive integer. Default `100`. \|<br>\| `CARLOS_DEMO_MAX_LIVE` \| Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. \|<br>\| `CARLOS_DEMO_EDGE_PROTECTIONS` \| `1` enables protections. Unset keeps demos closed. Set it on the console and every demo ingress and serving box. \|<br>\| `CARLOS_DEMO_REQUEST_CAP` \| Lifetime requests, from `1` to `1000000`. Default `2000`. \|<br>\| `CARLOS_DEMO_BANDWIDTH_CAP_BYTES` \| Lifetime body bytes, from `1` to `10000000000`. Default `200000000` (200 MB, with 1 MB = 1,000,000 bytes). \| |
+| README-07 | README.md | Create the holding account and its demo fleet. Revoke all of the account's CLI and service tokens through its service pages, including expired tokens. Only an owner can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings. You can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner. It must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. |
+| README-08 | README.md | Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites, using the same per-box mechanism as `CARLOS_FLEET`; do not deliver them through shared or regional parameters. |
+| README-09 | README.md | On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts values from `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting. |
+| README-10 | README.md | Build the toolchain bundle on the operator side before enabling a worker. Use native linux-arm64 Go 1.26.10 and the Rastrillo v0.30.2 dependency closure in `internal/demobuild/toolchain.lock.json`. Copy the Go distribution into the bundle root, the complete module cache into `mod/`, and a cache prewarmed by an offline build of `internal/console/testdata/demo` into `cache/`. Include Fiesta as embedded starter assets when needed; it is not a Go module. The starter contract permits only standard-library and pinned Rastrillo imports, exact locked module requirements and sums, and no vendor tree, toolchain directive, generator or alternate dependency inputs. |
+| README-11 | README.md | Make the directory and its ancestors root-owned and safe from agent writes. Bundle files must be regular files with mode `0444` or `0555`; symlinks, hard links and unlisted files are refused. Write `MANIFEST` with LF endings and a final LF. Its first lines are `go<TAB>1.26.10` and `modules<TAB><Lock.ModulesDigest()>`. Follow them with one tab-separated row per file other than `MANIFEST`, sorted by relative path: relative path, four-digit octal mode, decimal size, lowercase SHA-256. `Lock.ModulesDigest()` hashes the canonical dependency lock; the worker's bundle digest separately hashes the exact manifest bytes. `host.CheckDemoToolchain` checks the entire bundle, then worker initialization must pass the nested isolation check and compile its trusted probe in the disposable offline service. There is no download fallback. To replace a bundle, drain builds, install a new immutable directory, update the per-box path and restart root control. |
+| README-12 | README.md | On every ingress box for the demo domain and every box that can become the housekeeper, set the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` in root-owned `/etc/carlos/host.env`, without `CARLOS_DEMO_BOX`. Preserve these per-box values through host.env rewrites. The housekeeper is the deployment's certificate issuer and orders the demo wildcard. Give every box that can hold that role the DNS-01 grant on the demo zone, even if it does not serve ingress traffic. The edge reads these settings at startup, so restart `carlos-edge` on each affected box as part of the rollout after changing them. |
+| README-13 | README.md | For this protection rollout, keep admission off in the console drop-in and roll the console first. Old consoles reject the new worker heartbeat. Run `carlos system demos serving off`, then roll every public ingress, housekeeper and demo serving box. Remove or drain any old ingress before opening serving. Confirm the existing housekeeper wildcard certificate covers the demo names. Use the deployment's existing certificate workflow; this rollout needs no new DNS or certificate resources. |
+| README-14 | README.md | Set `CARLOS_DEMO_CONSOLE_URL` on every demo edge to the exact HTTPS origin in the console's `CONSOLE_ORIGIN`. A mismatched origin can break reporting. Preserve the per-box settings through host.env rewrites and restart affected edges. Verify the worker's `anonymous-demo-v1` readiness and bundle digest, policy lease and change delivery. |
+| README-15 | README.md | Take down every existing Plan 1 demo through `carlos system demos takedown --host <host>`. Check `takedown-status` until cleanup is complete. Their earlier traffic was never counted, so they cannot be grandfathered or backfilled with zero counters. Once every serving path runs the protected version, run `carlos system demos serving on` and restore admission. The intended first activation is the approved dev rollout when this slice lands; wider activation waits for the later /start plans. |
+| README-16 | README.md | For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without logging in to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Both create and update return `202` with `jobId`, `name`, `statusUrl` and `expiresAt` (Unix seconds). Create also returns `claimToken`, `claimUrl` and `claimAvailable:false`. Send your harness name in `X-Carlos-Client`; the stored value is trimmed to 100 bytes. Poll `statusUrl` (`GET /api/demo/jobs/<jobId>`) until its `state` is `live`. The other states are `building`, `starting`, `failed` and `superseded`. An earlier job becomes `superseded` when a newer update is accepted, even if the earlier job was live. Use the new update's `statusUrl` to follow its progress. Then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify that a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission. If a worker has not reconnected after a console restart, create and update return `503` with `Retry-After: 15`. Retry after that many seconds; this refusal does not spend a create or update attempt. |
+| README-17 | README.md | Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skipped test is outstanding evidence, not a rollout pass. Real DNS, TLS and fleet activation still need a separately recorded deployment check. |
+| README-18 | README.md | After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours. Protected edges refuse new requests at the original expiry and cancel active responses. Cleanup may take longer. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect. It must not restart the expired demo. Confirm that the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Never reuse public demo hostnames. Keep minimal host tombstones after detailed history ages out. |
+| README-19 | README.md | #### Demo traffic and operator controls |
+| README-20 | README.md | Use your configured console as an ops account owner or listed system operator: |
+| README-21 | README.md | ```sh<br>carlos system demos status<br>carlos system demos serving off<br>carlos system demos takedown --host shop.example.com<br>carlos system demos takedown-status --host shop.example.com<br>carlos system demos reports --limit 50<br>carlos system demos reports resolve --id <id><br>``` |
+| README-22 | README.md | Admission controls new creates and updates. Serving off also stops existing demos and refuses creates and updates, while cleanup and reporting remain available. Check serving confirmation separately from cleanup. A stop is pending until the box acknowledges it or its control expires. Protected workers renew through the existing authenticated stream every 10 seconds, with at most 30 seconds of validity from their probe. Output writes have a five-second bound, so confirmation can take 35 seconds. Bytes already handed to the network cannot be recalled. Old workers have no such bound. Keep them drained; do not downgrade an offline box after it has acknowledged initialization. |
+| README-23 | README.md | Caps are saved when a lifetime is created. Changes affect new demos only. Updates, restarts and serving off/on preserve counters and the original 24-hour expiry. The assigned box commits each request before dispatch and body bytes before output. Bytes include inserted markup and final compression, but exclude HTTP/TLS framing and uploads. App assets, errors, all app methods and readiness requests count. HEAD and bodyless responses spend no body bytes. The fixed warning stylesheet, platform refusals and console reports are excluded overhead. |
+| README-24 | README.md | Failed delivery and short writes can spend allowance that the visitor never receives. There are no refunds. This keeps crash overservice at zero requests and zero bytes. A stream that reaches the byte cap is cut without an appended page; later requests receive 429. Status reports saved caps and lifecycle, not estimated usage. Exhaustion keeps data and the private token until the original expiry. Claiming is not available yet. |
+| README-25 | README.md | A missing or corrupt local traffic database refuses serving. Never delete or recreate counters to restore allowance. A corrupt traffic database also blocks local retirement, so cleanup can stay pending until storage is repaired. Confirm purge before treating the demo as removed. Data has no backup, and a replacement box cannot grant a fresh allowance. |
+| README-26 | README.md | The warning is removable by the app's own scripts or CSS. The Content Security Policy limits forms, connections, images and scripts to the same origin. Inline scripts, eval, workers, upgrades and active document types other than supported HTML are refused. Server cookie Domain attributes are removed; a cookie with an unparseable Expires attribute is dropped. Script-written parent-domain cookies remain a known limit. Keep the private claim link out of pages and reports. |
+| README-27 | README.md | Reports do not trigger automatic takedown or notifications. Review the queue and resolve each report separately. POST attempts have durable IP, host and global limits. GET and HEAD form requests spend no report-attempt budget and still need ordinary ingress abuse protection. Forwarded reports use the login path's shared edge-proof key cache: a refresh reads two existing key objects, at most once per 30 seconds after a successful load. Traffic, counters, status and the serving switch add no bucket calls. Retirement keeps its existing receipt, tombstone and cleanup work. Identifying report data is removed seven days after confirmed purge. |
+| README-28 | README.md | During the approved dev check, submit a fresh source fixture, check its version, banner and policy through every ingress, and verify a saved SQLite value after an update. Use small caps on that fresh lifetime to check stream truncation and 429. Submit, list and resolve a report, switch serving off, then take the demo down and confirm purge. Check Chromium, Firefox and Safari separately; an unrun browser is outstanding evidence. Verify an ordinary app too. If any check fails, leave serving off and admission off while keeping cleanup running. Never roll back to unprotected serving. |
+| CLI-DOC-01 | docs/site/cli.md | #### carlos system demos |
+| CLI-DOC-02 | docs/site/cli.md | Manage anonymous demos through your configured console. Ops account owners and<br>listed system operators can stop serving or remove an exact public demo host.<br>Check serving confirmation and cleanup separately. A protected worker can take up to<br>35 seconds to confirm a stop; cleanup stays pending until the box acknowledges<br>its purge. Old workers must be drained and upgraded before activation. |
+| CLI-DOC-03 | docs/site/cli.md | ```sh<br>carlos system demos status<br>carlos system demos serving off<br>carlos system demos takedown --host shop.example.com<br>carlos system demos takedown-status --host shop.example.com<br>carlos system demos serving on<br>carlos system demos reports --limit 50<br>carlos system demos reports --after <id> --limit 50<br>carlos system demos reports resolve --id <id><br>``` |
+| CLI-DOC-04 | docs/site/cli.md | Caps apply to one lifetime: 2,000 requests and 200,000,000 body bytes by default.<br>Changing the configured caps affects new demos. Turning serving on preserves<br>existing counters and never restores a retired demo. Remove old Plan 1 demos<br>before activation; they cannot be backfilled with a fresh allowance. |
+| CLI-DOC-05 | docs/site/cli.md | Reports are listed oldest first, including resolved reports. Use `--after` with<br>an ID from the preceding page and `--limit` from 1 to 100. Resolving a report does<br>not take its demo down. Recheck the first page when reviewing new arrivals;<br>pagination is not a fixed snapshot. |
+| CLI-DOC-06 | docs/site/cli.md | `status`, `serving`, `takedown` and `takedown-status` accept `--console` to choose<br>a console. `--host` requires the exact public demo hostname. Successful commands<br>and pending operations exit 0, remote failures exit 1, and invalid arguments exit 2. |
+| CLI-HELP | carlos system demos help (complete stdout) | Manage anonymous demos: status, serving on or off, takedown, takedown-status, and reports. Commands use your configured console.<br> |
+| CLI-INVALID | invalid arguments (stderr) | Check the command arguments. Run carlos system demos help.<br> |
+| CLI-OUTPUT-01 | system_demos.go assembled output (substitutions marked) | Serving: Off (Pending)<br> |
+| CLI-OUTPUT-02 | system_demos.go assembled output (substitutions marked) | Serving: Off (Complete)<br>Demo serving is off. Responses already being sent may finish.<br> |
+| CLI-OUTPUT-03 | system_demos.go assembled output (substitutions marked) | Serving: On (Complete)<br>Demo serving is on.<br> |
+| CLI-OUTPUT-04 | system_demos.go assembled output (substitutions marked) | Host: <host><br>State: <state><br>Request cap: <requests><br>Byte cap: <bytes><br>Serving: <On\|Off> (<Pending\|Complete>)<br>Cleanup: <Pending\|Complete><br> |
+| CLI-OUTPUT-05 | system_demos.go assembled output (substitutions marked) | Cleanup: Pending<br>This demo is no longer serving. Cleanup is pending.<br> |
+| CLI-OUTPUT-06 | system_demos.go assembled output (substitutions marked) | Cleanup: Complete<br>This demo has been removed.<br> |
+| CLI-OUTPUT-07 | system_demos.go assembled output (substitutions marked) | ID: <id><br>Host: <host><br>Reason: <Phishing\|Harmful content\|Other><br>Details: <details><br>Created: <UTC RFC3339><br>State: <Open\|Resolved><br> |
+| CLI-OUTPUT-08 | system_demos.go assembled output (substitutions marked) | Report resolved.<br> |
+| CLI-OUTPUT-09 | report pagination output | Continue after this report: &lt;id&gt;<br> |
diff --git a/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-2-DOCS.md b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-2-DOCS.md
new file mode 100644
index 000000000..363cfd29b
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-2-DOCS.md
@@ -0,0 +1,52 @@
+| ID | new | why |
+|---|---|---|
+| README-01 | ### Anonymous demo apps in development | unchanged |
+| README-02 | Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups, and data cannot be recovered after box loss. Demos cannot send mail, use object storage or schedules, run sidecars, or use custom domains. Claiming is not available in this release. | Clearer wording |
+| README-03 | Keep admission and serving off until the designated dev witness and branch review pass. Local protocol tests do not prove systemd isolation, public DNS, or TLS. Infrastructure work needs approval for its exact scope before anything is created or changed. | Shorter and more direct |
+| README-04 | Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty when admission is first enabled. It must contain no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box. Do not share this fleet with ordinary apps. | Clearer sentence structure |
+| README-05 | Set these variables on the console: | unchanged |
+| README-06 | \| Variable \| Setting \|<br>\| --- \| --- \|<br>\| `CARLOS_DEMO_APPS` \| `1` enables admission. Leave it unset to keep admission off. \|<br>\| `CARLOS_DEMO_ACCOUNT` \| The dedicated holding account's sqid. \|<br>\| `CARLOS_DEMO_FLEET` \| The fleet owned by that account. \|<br>\| `CARLOS_DEMO_DOMAIN` \| Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone, or another domain claim. \|<br>\| `CARLOS_DEMO_CREATE_PER_IP_DAY` \| Positive integer. Default `30`. IPv6 callers share their /64 budget. \|<br>\| `CARLOS_DEMO_CREATE_GLOBAL_DAY` \| Positive integer. Default `100`. \|<br>\| `CARLOS_DEMO_MAX_LIVE` \| Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. \|<br>\| `CARLOS_DEMO_EDGE_PROTECTIONS` \| `1` enables protections. Leave it unset to keep demos closed. Set it on the console and every demo ingress and serving box. \|<br>\| `CARLOS_DEMO_REQUEST_CAP` \| Lifetime requests, from `1` to `1000000`. Default `2000`. \|<br>\| `CARLOS_DEMO_BANDWIDTH_CAP_BYTES` \| Lifetime body bytes, from `1` to `10000000000`. Default `200000000` (200 MB, with 1 MB = 1,000,000 bytes). \| | Shorter wording |
+| README-07 | Create the holding account and its demo fleet. Revoke all CLI and service tokens for the account through its service pages, including expired tokens. Only an owner can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings. You can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner. It must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. | Clearer and less repetitive |
+| README-08 | Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET`, and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials, and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites with the same per-box mechanism as `CARLOS_FLEET`. Do not deliver them through shared or regional parameters. | Clearer final instructions |
+| README-09 | On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites. Concurrency accepts values from `1` through `4`. Each build needs a 1 GiB memory allowance, so keep it at `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting. | Improved sentence flow |
+| README-10 | Build the toolchain bundle on the operator side before enabling a worker. Use native linux-arm64 Go 1.26.10 and the Rastrillo v0.30.2 dependency closure in `internal/demobuild/toolchain.lock.json`. Copy the Go distribution into the bundle root, the complete module cache into `mod/`, and a cache prewarmed by an offline build of `internal/console/testdata/demo` into `cache/`. Include Fiesta as embedded starter assets when needed. It is not a Go module. The starter contract permits only standard-library and pinned Rastrillo imports, exact locked module requirements and sums, and no vendor tree, toolchain directive, generator, or alternate dependency inputs. | Clearer sentence boundary |
+| README-11 | Make the directory and its ancestors root-owned and safe from agent writes. Bundle files must be regular files with mode `0444` or `0555`. Symlinks, hard links, and unlisted files are refused. Write `MANIFEST` with LF endings and a final LF. Its first lines are `go<TAB>1.26.10` and `modules<TAB><Lock.ModulesDigest()>`. Follow them with one tab-separated row per file other than `MANIFEST`, sorted by relative path: relative path, four-digit octal mode, decimal size, lowercase SHA-256. `Lock.ModulesDigest()` hashes the canonical dependency lock. The worker's bundle digest separately hashes the exact manifest bytes. `host.CheckDemoToolchain` checks the entire bundle. Worker initialization must then pass the nested isolation check and compile its trusted probe in the disposable offline service. There is no download fallback. To replace a bundle, drain builds, install a new immutable directory, update the per-box path, and restart root control. | Improved readability |
+| README-12 | On every ingress box for the demo domain and every box that can become the housekeeper, set the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET`, and `CARLOS_DEMO_DOMAIN` in root-owned `/etc/carlos/host.env`, without `CARLOS_DEMO_BOX`. Preserve these per-box values through host.env rewrites. The housekeeper is the deployment's certificate issuer and orders the demo wildcard. Give every box that can hold that role the DNS-01 grant on the demo zone, even if it does not serve ingress traffic. The edge reads these settings at startup. Restart `carlos-edge` on each affected box after changing them. | Clearer final instruction |
+| README-13 | For this protection rollout, keep admission off in the console drop-in and roll the console first. Old consoles reject the new worker heartbeat. Run `carlos system demos serving off`, then roll every public ingress, housekeeper, and demo serving box. Remove or drain any old ingress before opening serving. Confirm that the existing housekeeper wildcard certificate covers the demo names. Use the deployment's existing certificate workflow. This rollout needs no new DNS or certificate resources. | Clearer sequence |
+| README-14 | Set `CARLOS_DEMO_CONSOLE_URL` on every demo edge to the exact HTTPS origin in the console's `CONSOLE_ORIGIN`. A mismatched origin can break reporting. Preserve the per-box settings through host.env rewrites and restart affected edges. Verify the worker's `anonymous-demo-v1` readiness and bundle digest, policy lease, and change delivery. | Clearer list |
+| README-15 | Take down every existing Plan 1 demo through `carlos system demos takedown --host <host>`. Check `takedown-status` until cleanup is complete. Their earlier traffic was never counted, so they cannot be grandfathered or given fresh counters. Once every serving path runs the protected version, run `carlos system demos serving on` and restore admission. The intended first activation is the approved dev rollout when this slice lands. Wider activation waits for the later /start plans. | More direct wording |
+| README-16 | For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without logging in to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Both create and update return `202` with `jobId`, `name`, `statusUrl`, and `expiresAt` (Unix seconds). Create also returns `claimToken`, `claimUrl`, and `claimAvailable:false`. Send your harness name in `X-Carlos-Client`; the stored value is trimmed to 100 bytes. Poll `statusUrl` (`GET /api/demo/jobs/<jobId>`) until its `state` is `live`. The other states are `building`, `starting`, `failed`, and `superseded`. An earlier job becomes `superseded` when a newer update is accepted, even if the earlier job was live. Use the new update's `statusUrl` to follow its progress. Then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify that a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission. If a worker has not reconnected after a console restart, create and update return `503` with `Retry-After: 15`. Retry after that many seconds. This refusal does not spend a create or update attempt. | Improved flow and sentence length |
+| README-17 | Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins. The builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and local protocol and durability checks. A skipped test is outstanding evidence, not a rollout pass. Real DNS, TLS, and fleet activation still need a separately recorded deployment check. | Clearer grouping |
+| README-18 | After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet, and domain settings, and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours. Protected edges refuse new requests at the original expiry and cancel active responses. Cleanup may take longer. Local DB, WAL, SHM, runtime, and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until it reconnects. It must not restart the expired demo. Confirm that the job is expired, the host no longer serves, and cleanup is complete before dismantling witness resources. Never reuse public demo hostnames. Keep minimal host tombstones after detailed history ages out. | Clearer sequence |
+| README-19 | #### Demo traffic and operator controls | unchanged |
+| README-20 | Use your configured console as an ops account owner or listed system operator: | unchanged |
+| README-21 | ```sh<br>carlos system demos status<br>carlos system demos serving off<br>carlos system demos takedown --host shop.example.com<br>carlos system demos takedown-status --host shop.example.com<br>carlos system demos reports --limit 50<br>carlos system demos reports resolve --id <id><br>``` | unchanged |
+| README-22 | Admission controls new creates and updates. Serving off also stops existing demos and refuses creates and updates. Cleanup and reporting remain available. Check serving confirmation separately from cleanup. A stop is pending until the box acknowledges it or its control expires. Protected workers renew through the existing authenticated stream every 10 seconds, with at most 30 seconds of validity from their probe. Output writes have a five-second bound, so confirmation can take 35 seconds. Bytes already handed to the network cannot be recalled. Old workers have no such bound. Keep them drained. Do not downgrade an offline box after it has acknowledged initialization. | Shorter sentences |
+| README-23 | Caps are saved when a lifetime is created. Changes affect new demos only. Updates, restarts, and serving off/on preserve counters and the original 24-hour expiry. The assigned box commits each request before dispatch and body bytes before output. Bytes include inserted markup and final compression, but exclude HTTP/TLS framing and uploads. App assets, errors, all app methods, and readiness requests count. HEAD and bodyless responses spend no body bytes. The fixed warning stylesheet, platform refusals, and console reports are excluded overhead. | Improved punctuation and flow |
+| README-24 | Failed delivery and short writes can spend allowance that the visitor never receives. There are no refunds. This keeps crash overservice at zero requests and zero bytes. A stream that reaches the byte cap is cut without an appended page. Later requests receive 429. Status reports saved caps and lifecycle, not estimated usage. Exhaustion keeps data and the private token until the original expiry. Claiming is not available yet. | Clearer sentence boundary |
+| README-25 | A missing or corrupt local traffic database refuses serving. Never delete or recreate counters to restore allowance. A corrupt traffic database also blocks local retirement, so cleanup can remain pending until storage is repaired. Confirm purge before treating the demo as removed. Data has no backup, and a replacement box cannot grant a fresh allowance. | Slightly clearer wording |
+| README-26 | The warning is removable by the app's own scripts or CSS. The Content Security Policy limits forms, connections, images, and scripts to the same origin. Inline scripts, eval, workers, upgrades, and active document types other than supported HTML are refused. Server cookie Domain attributes are removed. A cookie with an unparseable Expires attribute is dropped. Script-written parent-domain cookies remain a known limit. Keep the private claim link out of pages and reports. | Clearer sentence structure |
+| README-27 | Reports do not trigger automatic takedown or notifications. Review the queue and resolve each report separately. POST attempts have durable IP, host, and global limits. GET and HEAD form requests spend no report-attempt budget and still need ordinary ingress abuse protection. Forwarded reports use the login path's shared edge-proof key cache. A refresh reads two existing key objects at most once per 30 seconds after a successful load. Traffic, counters, status, and the serving switch add no bucket calls. Retirement keeps its existing receipt, tombstone, and cleanup work. Identifying report data is removed seven days after confirmed purge. | Improved readability |
+| README-28 | During the approved dev check, submit a fresh source fixture, check its version, banner, and policy through every ingress, and verify a saved SQLite value after an update. Use small caps on that fresh lifetime to check stream truncation and 429. Submit, list, and resolve a report. Switch serving off, then take the demo down and confirm purge. Check Chromium, Firefox, and Safari separately. An unrun browser is outstanding evidence. Verify an ordinary app too. If any check fails, leave serving off and admission off while keeping cleanup running. Never roll back to unprotected serving. | Clearer sequence |
+| CLI-DOC-01 | #### carlos system demos | unchanged |
+| CLI-DOC-02 | Manage anonymous demos through your configured console. Ops account owners and<br>listed system operators can stop serving or remove an exact public demo host.<br>Check serving confirmation and cleanup separately. A protected worker can take up to<br>35 seconds to confirm a stop. Cleanup stays pending until the box acknowledges<br>its purge. Old workers must be drained and upgraded before activation. | Shorter final sentences |
+| CLI-DOC-03 | ```sh<br>carlos system demos status<br>carlos system demos serving off<br>carlos system demos takedown --host shop.example.com<br>carlos system demos takedown-status --host shop.example.com<br>carlos system demos serving on<br>carlos system demos reports --limit 50<br>carlos system demos reports --after <id> --limit 50<br>carlos system demos reports resolve --id <id><br>``` | unchanged |
+| CLI-DOC-04 | Caps apply to one lifetime: 2,000 requests and 200,000,000 body bytes by default.<br>Changing the configured caps affects new demos. Turning serving on preserves<br>existing counters and never restores a retired demo. Remove old Plan 1 demos<br>before activation. They cannot be given a fresh allowance. | Clearer wording |
+| CLI-DOC-05 | Reports are listed oldest first, including resolved reports. Use `--after` with<br>an ID from the preceding page and `--limit` from 1 to 100. Resolving a report does<br>not take its demo down. Recheck the first page when reviewing new arrivals.<br>Pagination is not a fixed snapshot. | Shorter final sentence |
+| CLI-DOC-06 | `status`, `serving`, `takedown`, and `takedown-status` accept `--console` to choose<br>a console. `--host` requires the exact public demo hostname. Successful commands<br>and pending operations exit 0. Remote failures exit 1. Invalid arguments exit 2. | Clearer sentence structure |
+| CLI-HELP | Manage anonymous demos: status, serving on or off, takedown, takedown-status, and reports. Commands use your configured console.<br> | unchanged |
+| CLI-INVALID | Check the command arguments. Run carlos system demos help.<br> | unchanged |
+| CLI-OUTPUT-01 | Serving: Off (Pending)<br> | unchanged |
+| CLI-OUTPUT-02 | Serving: Off (Complete)<br>Demo serving is off. Responses already being sent may finish.<br> | unchanged |
+| CLI-OUTPUT-03 | Serving: On (Complete)<br>Demo serving is on.<br> | unchanged |
+| CLI-OUTPUT-04 | Host: <host><br>State: <state><br>Request cap: <requests><br>Byte cap: <bytes><br>Serving: <On\|Off> (<Pending\|Complete>)<br>Cleanup: <Pending\|Complete><br> | unchanged |
+| CLI-OUTPUT-05 | Cleanup: Pending<br>This demo is no longer serving. Cleanup is pending.<br> | unchanged |
+| CLI-OUTPUT-06 | Cleanup: Complete<br>This demo has been removed.<br> | unchanged |
+| CLI-OUTPUT-07 | ID: <id><br>Host: <host><br>Reason: <Phishing\|Harmful content\|Other><br>Details: <details><br>Created: <UTC RFC3339><br>State: <Open\|Resolved><br> | unchanged |
+| CLI-OUTPUT-08 | Report resolved.<br> | unchanged |
+| CLI-OUTPUT-09 | Continue after this report: &lt;id&gt;<br> | unchanged |
+
+**Flags**
+
+- README-15 says “the approved dev rollout when this slice lands,” but the brief does not identify the approval record or rollout scope.
+- README-26 says the warning can be hidden by the demo app, while the wider feature description calls it a fixed warning bar. The copy preserves the more specific fact from the deck.
\ No newline at end of file