Merge infra/drop-demo into main
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by oscabriel · committed by oscabriel · parents 25f9e66, 0fb471d · Browse files · 33 files·+268 added−409 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
33 files+268 added−409 removed
- tests:+125 added−198 removed
- other:+143 added−211 removed
Provenance
- Commit
c49b6bf- Tree
20bae73- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent 1
25f9e66- Parent 2
0fb471d
33 files changed+268 added−409 removed
modified:apps/cli/test/credentials.test.ts+6 added-2 removed
31 unmodified lines32 33 const aliceProfile: Profile = {34 handle: Handle.make("alice"),35 token: Redacted.make("tok-alice-0123456789abcdefghijklmnopqrstuvwxyz"),36- url: "https://platform-demo.example.workers.dev",36+ url: "https://platform-dev-oscabriel.example.workers.dev",37 };38 39 const configHome = Effect.map(40 Effect.flatMap(FileSystem.FileSystem, (fs) => fs.makeTempDirectoryScoped()),92 unmodified lines133 yield* credentials.put("default", defaultProfile);134 yield* credentials.put("alice", aliceProfile);135 136 expect(137- seen(yield* credentials.forHost("platform-demo.example.workers.dev"))137+ seen(138+ yield* credentials.forHost(139+ "platform-dev-oscabriel.example.workers.dev"140+ )141+ )142 ).toStrictEqual(seen(Option.some(aliceProfile)));143 expect(yield* credentials.forHost("elsewhere.example.com")).toStrictEqual(144 Option.none()145 );84 unmodified linesmodified:apps/platform/src/platform.ts+1 added-1 removed
42 unmodified lines43444546474748495051144 unmodified linesExpand all42 unmodified lines ));
export const StageName = Schema.String.check( Schema.isPattern(/^(?:local|demo|prod|dev-[a-z0-9]+(?:-[a-z0-9]+)*)$/u) Schema.isPattern(/^(?:local|prod|dev-[a-z0-9]+(?:-[a-z0-9]+)*)$/u));
export const LanderAdapter = Schema.Literals(["container", "isogit"]);
144 unmodified linesExpand allmodified:apps/platform/test/bindings.test.ts+2 added-23 removed
268 unmodified lines269 unknown: [],270 vars: keysOf(PlatformVars.fields),271 };272 273- expect(Object.keys(stages)).toStrictEqual([274- "dev-oscabriel",275- "demo",276- "prod",277- ]);273+ expect(Object.keys(stages)).toStrictEqual(["dev-oscabriel", "prod"]);274 expect({ top, ...stages }).toStrictEqual({279- demo: decoded,275 "dev-oscabriel": decoded,276 prod: decoded,277 top: decoded,278 });39 unmodified lines318 319 const model = "@cf/moonshotai/kimi-k2.7-code";320 321 expect({327- demo: yield* read(env.demo),322 "dev-oscabriel": yield* read(env["dev-oscabriel"]),323 prod: yield* read(env.prod),324 top: yield* read(raw),325 }).toStrictEqual({332- demo: {333- ai: "AI",334- draftLimit: draftLimit("1204"),335- model,336- web: "https://web-demo.oscargabriel.workers.dev",337- },326 "dev-oscabriel": {327 ai: "AI",328 draftLimit: draftLimit("1104"),329 model,37 unmodified lines367 ?.bucket_name368 );369 370 expect({383- demo: yield* codeCache(env.demo),371 "dev-oscabriel": yield* codeCache(env["dev-oscabriel"]),372 prod: yield* codeCache(env.prod),373 top: yield* codeCache(raw),374 }).toStrictEqual({388- demo: "code-cache-demo",375 "dev-oscabriel": "code-cache-dev-oscabriel",376 prod: "code-cache-prod",377 top: "code-cache-local",378 });23 unmodified lines402 ({ analytics_engine_datasets }) => analytics_engine_datasets403 );404 405 expect({420- demo: yield* datasets(env.demo),406 "dev-oscabriel": yield* datasets(env["dev-oscabriel"]),407 prod: yield* datasets(env.prod),408 top: yield* datasets(raw),409 }).toStrictEqual({425- demo: [{ binding: "METRICS", dataset: "metrics_demo" }],410 "dev-oscabriel": [411 { binding: "METRICS", dataset: "metrics_dev_oscabriel" },412 ],413 prod: [{ binding: "METRICS", dataset: "metrics_prod" }],93 unmodified lines507 unknown: [],508 vars: [],509 };510 527- expect(Object.keys(stages)).toStrictEqual([528- "dev-oscabriel",529- "demo",530- "prod",531- ]);511+ expect(Object.keys(stages)).toStrictEqual(["dev-oscabriel", "prod"]);512 expect({ top, ...stages }).toStrictEqual({533- demo: read,513 "dev-oscabriel": read,514 prod: read,515 top: read,516 });3 unmodified linesmodified:apps/platform/test/handlers.test.ts-2 removed
915 unmodified lines916 expect(limitsOf("CLAIM_LIMIT")).toStrictEqual([917 WorkerCaps.claim,918 WorkerCaps.claim,919 WorkerCaps.claim,920- WorkerCaps.claim,920 ]);921 expect(limitsOf("PROPOSAL_LIMIT")).toStrictEqual([922 WorkerCaps.proposal,923 WorkerCaps.proposal,924 WorkerCaps.proposal,926- WorkerCaps.proposal,925 ]);926 }).pipe(Effect.provide(NodeServices.layer))927 );928 });modified:apps/platform/.env.schema+1 added-1 removed
11 unmodified lines12 # @required @sensitive @type=string(minLength=32)13 OPERATOR_TOKEN=14 15 # Named sessions beside accounts: a JSON object from token to16-# handle, `{"<token>":"alice"}`, for the demo's fictional people. Each token16+# handle, `{"<token>":"alice"}`, for the examples' fictional people. Each token17 # is at least 32 characters. The operator's token wins if both name one.18 # @optional @sensitive19 SESSION_TOKENS=20 33 unmodified linesmodified:apps/platform/worker-configuration.d.ts+2 added-32 removed
1 /* eslint-disable */2-// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: 3413a7934fb786b8fe12df930db7223d)2+// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: d86181b89e45aafbd21bd32eeae49b73)3 interface __BaseEnv_Env {4 OAUTH_KV: KVNamespace;5 EVIDENCE: R2Bucket;6 RELEASES: R2Bucket;18 unmodified lines25 COOKIE_KEY: string;26 PASSWORD_PEPPER: string;27 MASTER_KEY: string;28 PROJECT: DurableObjectNamespace<import("./src/worker").Project>;29- SANDBOX: Fetcher /* sandbox-dev-oscabriel */ | Fetcher /* sandbox-demo */ | Fetcher /* sandbox-prod */ | Fetcher /* sandbox */;29+ SANDBOX: Fetcher /* sandbox-dev-oscabriel */ | Fetcher /* sandbox-prod */ | Fetcher /* sandbox */;30 ANSWER: Workflow<Parameters<import("./src/worker").Answer['run']>[0]['payload']>;31 ON_PUSH: Workflow<Parameters<import("./src/worker").OnPush['run']>[0]['payload']>;32 }33 declare namespace Cloudflare {30 unmodified lines64 SANDBOX: Fetcher /* sandbox-dev-oscabriel */;65 ANSWER: Workflow<Parameters<import("./src/worker").Answer['run']>[0]['payload']>;66 ON_PUSH: Workflow<Parameters<import("./src/worker").OnPush['run']>[0]['payload']>;67 }68- interface DemoEnv {69- OAUTH_KV: KVNamespace;70- EVIDENCE: R2Bucket;71- RELEASES: R2Bucket;72- CODE_CACHE: R2Bucket;73- FRONT_PAGE: D1Database;74- EMAIL: SendEmail;75- METRICS: AnalyticsEngineDataset;76- ARTIFACTS: Artifacts;77- ARTIFACTS_PRIVATE: Artifacts;78- CLAIM_LIMIT: RateLimit;79- PROPOSAL_LIMIT: RateLimit;80- SIGN_IN_LIMIT: RateLimit;81- DRAFT_LIMIT: RateLimit;82- LOADER: WorkerLoader;83- AI: Ai;84- OPERATOR_HANDLE: string;85- STAGE: string;86- LANDER_ADAPTER: string;87- DRAFT_MODEL: string;88- PUBLIC_WEB_URL: string;89- OPERATOR_TOKEN: string;90- COOKIE_KEY: string;91- PASSWORD_PEPPER: string;92- MASTER_KEY: string;93- PROJECT: DurableObjectNamespace<import("./src/worker").Project>;94- SANDBOX: Fetcher /* sandbox-demo */;95- ANSWER: Workflow<Parameters<import("./src/worker").Answer['run']>[0]['payload']>;96- ON_PUSH: Workflow<Parameters<import("./src/worker").OnPush['run']>[0]['payload']>;97- }68 interface ProdEnv {69 OAUTH_KV: KVNamespace;70 EVIDENCE: R2Bucket;71 RELEASES: R2Bucket;35 unmodified linesmodified:apps/platform/wrangler.jsonc-89 removed
256 unmodified lines257 },258 ],259 },260 },261- "demo": {262- "vars": {263- "OPERATOR_HANDLE": "oscabriel",264- "STAGE": "demo",265- "LANDER_ADAPTER": "container",266- "DRAFT_MODEL": "@cf/moonshotai/kimi-k2.7-code",267- "PUBLIC_WEB_URL": "https://web-demo.oscargabriel.workers.dev",268- },269- "secrets": {270- "required": [271- "OPERATOR_TOKEN",272- "COOKIE_KEY",273- "PASSWORD_PEPPER",274- "MASTER_KEY",275- ],276- },277- "durable_objects": {278- "bindings": [{ "name": "PROJECT", "class_name": "Project" }],279- },280- "workflows": [281- { "name": "answer-demo", "binding": "ANSWER", "class_name": "Answer" },282- {283- "name": "on-push-demo",284- "binding": "ON_PUSH",285- "class_name": "OnPush",286- },287- ],288- "artifacts": [289- { "binding": "ARTIFACTS", "namespace": "projects-demo" },290- { "binding": "ARTIFACTS_PRIVATE", "namespace": "layers-demo" },291- ],292- "d1_databases": [293- {294- "binding": "FRONT_PAGE",295- "database_name": "front-page-demo",296- "database_id": "a83fc9b1-1414-4d9c-b83c-b1e468cfc5d4",297- "migrations_dir": "migrations",298- },299- ],300- // KV namespace `oauth-demo`.301- "kv_namespaces": [302- { "binding": "OAUTH_KV", "id": "c9b3fb4d9bd04b458051519f2f8cd0e8" },303- ],304- "r2_buckets": [305- { "binding": "EVIDENCE", "bucket_name": "evidence-demo" },306- { "binding": "RELEASES", "bucket_name": "releases-demo" },307- { "binding": "CODE_CACHE", "bucket_name": "code-cache-demo" },308- ],309- "send_email": [{ "name": "EMAIL" }],310- "worker_loaders": [{ "binding": "LOADER" }],311- "ai": { "binding": "AI" },312- "analytics_engine_datasets": [313- { "binding": "METRICS", "dataset": "metrics_demo" },314- ],315- "services": [{ "binding": "SANDBOX", "service": "sandbox-demo" }],316- "ratelimits": [317- {318- "name": "CLAIM_LIMIT",319- "namespace_id": "1201",320- "simple": { "limit": 10, "period": 60 },321- },322- {323- "name": "PROPOSAL_LIMIT",324- "namespace_id": "1202",325- "simple": { "limit": 5, "period": 60 },326- },327- {328- "name": "SIGN_IN_LIMIT",329- "namespace_id": "1203",330- "simple": { "limit": 5, "period": 60 },331- },332- {333- "name": "DRAFT_LIMIT",334- "namespace_id": "1204",335- "simple": { "limit": 2, "period": 60 },336- },337- ],338- "triggers": {339- "events": [340- {341- "type": "cf.artifacts.repo.pushed",342- "filter": { "namespace": "projects-demo" },343- "targets": [344- { "type": "workflow", "workflow_name": "on-push-demo" },345- ],346- },347- ],348- },349- },261 // Served on the brand's own domain, never workers.dev: infra/deploy.ts262 // passes its Custom Domain and PUBLIC_WEB_URL, which name the brand, so263 // they live in infra/stages.ts. The URL here is a stand-in the deploy's264 // --var replaces. Bootstrap writes the D1 and KV ids.92 unmodified linesmodified:apps/sandbox/worker-configuration.d.ts+1 added-5 removed
1 /* eslint-disable */2-// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: e2ded613bcc52924dd43b8200efe10af)2+// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: d3312aab4564c477c613c03ef0c3a3aa)3 interface __BaseEnv_Env {4 CHECKER: DurableObjectNamespace<import("./src/worker").Checker>;5 LANDER: DurableObjectNamespace<import("./src/worker").Lander>;6 }5 unmodified lines12 interface DevOscabrielEnv {13 CHECKER: DurableObjectNamespace<import("./src/worker").Checker>;14 LANDER: DurableObjectNamespace<import("./src/worker").Lander>;15 }16- interface DemoEnv {17- CHECKER: DurableObjectNamespace<import("./src/worker").Checker>;18- LANDER: DurableObjectNamespace<import("./src/worker").Lander>;19- }16 interface ProdEnv {17 CHECKER: DurableObjectNamespace<import("./src/worker").Checker>;18 LANDER: DurableObjectNamespace<import("./src/worker").Lander>;19 }3 unmodified linesmodified:apps/sandbox/wrangler.jsonc-29 removed
97 unmodified lines98 },99 },100 ],101 },102- "demo": {103- "durable_objects": {104- "bindings": [105- { "name": "CHECKER", "class_name": "Checker" },106- { "name": "LANDER", "class_name": "Lander" },107- ],108- },109- "containers": [110- {111- "class_name": "Checker",112- "scheduling_policy": "durable_object",113- "observability": { "enabled": false },114- "images": {115- "check": { "dockerfile": "./images/check.Dockerfile" },116- },117- },118- {119- "class_name": "Lander",120- "scheduling_policy": "durable_object",121- "observability": { "enabled": true },122- "images": {123- "land": {124- "dockerfile": "./images/land.Dockerfile",125- "build_context": "../..",126- },127- },128- },129- ],130- },102 "prod": {103 "durable_objects": {104 "bindings": [105 { "name": "CHECKER", "class_name": "Checker" },27 unmodified linesmodified:apps/web/worker-configuration.d.ts+2 added-6 removed
1 /* eslint-disable */2-// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: a5ee49fb864c51bcf6b69dd189e7c486)2+// Generated by Wrangler by running `wrangler types --include-runtime=false --strict-vars=false` (hash: 481cae1d12dc617f3b372080caafe1b8)3 interface __BaseEnv_Env {4 PUBLIC_PLATFORM_URL: string;5- PLATFORM: Fetcher /* platform-dev-oscabriel */ | Fetcher /* platform-demo */ | Fetcher /* platform-prod */ | Fetcher /* platform */;5+ PLATFORM: Fetcher /* platform-dev-oscabriel */ | Fetcher /* platform-prod */ | Fetcher /* platform */;6 }7 declare namespace Cloudflare {8 interface GlobalProps {9 mainModule: typeof import("./src/server");1 unmodified line11 interface DevOscabrielEnv {12 PUBLIC_PLATFORM_URL: string;13 PLATFORM: Fetcher /* platform-dev-oscabriel */;14 }15- interface DemoEnv {16- PUBLIC_PLATFORM_URL: string;17- PLATFORM: Fetcher /* platform-demo */;18- }15 interface ProdEnv {16 PUBLIC_PLATFORM_URL: string;17 PLATFORM: Fetcher /* platform-prod */;18 }9 unmodified linesmodified:apps/web/wrangler.jsonc-7 removed
54 unmodified lines55 "vars": {56 "PUBLIC_PLATFORM_URL": "https://platform-dev-oscabriel.oscargabriel.workers.dev",57 },58 },59- "demo": {60- "cache": { "enabled": true },61- "services": [{ "binding": "PLATFORM", "service": "platform-demo" }],62- "vars": {63- "PUBLIC_PLATFORM_URL": "https://platform-demo.oscargabriel.workers.dev",64- },65- },59 // Served on the brand's own domain, never workers.dev: infra/deploy.ts60 // passes its Custom Domains and PUBLIC_PLATFORM_URL, which name the brand,61 // so they live in infra/stages.ts. The URL here is a stand-in the62 // deploy's --var replaces, so the generated Env still types it a string.10 unmodified linesmodified:infra/.env.schema+1 added-1 removed
31 unmodified lines32 DO_NOT_TRACK=133 CF_SEND_TELEMETRY=034 35 # Nothing here is a person's token. The swarm (`bun run swarm`) signs in as36-# the demo's fictional people with apps/platform/.env.schema's36+# the examples' fictional people with apps/platform/.env.schema's37 # SESSION_TOKENS, run as `bunx varlock run --path apps/platform/ -- bun38 # scripts/swarm.ts …`, so no script or agent reads a `.env*` file. On every39 # stage those tokens come from the stage's generated secrets file outside the40 # repo (STAGE_SECRETS_FILE).modified:infra/created.jsonl+114 added
381 unmodified lines382 {"at":"2026-10-13T22:54:14.992Z","by":"smoke","kind":"repo","name":"oscabriel__smoke-20261013-225323--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}383 {"at":"2026-10-13T23:49:13.965Z","by":"smoke","kind":"project","name":"oscabriel__smoke-20261013-234909","stage":"dev-oscabriel"}384 {"at":"2026-10-13T23:49:13.966Z","by":"smoke","kind":"repo","name":"oscabriel__smoke-20261013-234909","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}385 {"at":"2026-10-13T23:50:02.502Z","by":"smoke","kind":"repo","name":"oscabriel__smoke-20261013-234909--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}386+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"anyhow","stage":"demo"}387+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"anyhow","namespace":"projects-demo","stage":"demo"}388+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"ky","stage":"demo"}389+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"ky","namespace":"projects-demo","stage":"demo"}390+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"gum","stage":"demo"}391+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"gum","namespace":"projects-demo","stage":"demo"}392+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"click","stage":"demo"}393+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"click","namespace":"projects-demo","stage":"demo"}394+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"awesome","stage":"demo"}395+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"awesome","namespace":"projects-demo","stage":"demo"}396+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"changesets","stage":"demo"}397+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"changesets","namespace":"projects-demo","stage":"demo"}398+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"stb","stage":"demo"}399+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"stb","namespace":"projects-demo","stage":"demo"}400+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"fuzzel","stage":"demo"}401+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fuzzel","namespace":"projects-demo","stage":"demo"}402+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"hono","stage":"demo"}403+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"hono","namespace":"projects-demo","stage":"demo"}404+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"express","stage":"demo"}405+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"express","namespace":"projects-demo","stage":"demo"}406+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"fastify","stage":"demo"}407+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fastify","namespace":"projects-demo","stage":"demo"}408+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"zustand","stage":"demo"}409+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"zustand","namespace":"projects-demo","stage":"demo"}410+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"immer","stage":"demo"}411+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"immer","namespace":"projects-demo","stage":"demo"}412+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"nanoid","stage":"demo"}413+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"nanoid","namespace":"projects-demo","stage":"demo"}414+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"commander","stage":"demo"}415+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"commander","namespace":"projects-demo","stage":"demo"}416+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"execa","stage":"demo"}417+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"execa","namespace":"projects-demo","stage":"demo"}418+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"chalk","stage":"demo"}419+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"chalk","namespace":"projects-demo","stage":"demo"}420+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"mitt","stage":"demo"}421+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"mitt","namespace":"projects-demo","stage":"demo"}422+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"clsx","stage":"demo"}423+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"clsx","namespace":"projects-demo","stage":"demo"}424+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"ripgrep","stage":"demo"}425+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"ripgrep","namespace":"projects-demo","stage":"demo"}426+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"serde","stage":"demo"}427+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"serde","namespace":"projects-demo","stage":"demo"}428+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"axum","stage":"demo"}429+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"axum","namespace":"projects-demo","stage":"demo"}430+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"fd","stage":"demo"}431+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fd","namespace":"projects-demo","stage":"demo"}432+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"hyperfine","stage":"demo"}433+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"hyperfine","namespace":"projects-demo","stage":"demo"}434+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"bubbletea","stage":"demo"}435+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"bubbletea","namespace":"projects-demo","stage":"demo"}436+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"fzf","stage":"demo"}437+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fzf","namespace":"projects-demo","stage":"demo"}438+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"cobra","stage":"demo"}439+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"cobra","namespace":"projects-demo","stage":"demo"}440+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"gin","stage":"demo"}441+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"gin","namespace":"projects-demo","stage":"demo"}442+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"requests","stage":"demo"}443+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"requests","namespace":"projects-demo","stage":"demo"}444+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"flask","stage":"demo"}445+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"flask","namespace":"projects-demo","stage":"demo"}446+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"httpx","stage":"demo"}447+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"httpx","namespace":"projects-demo","stage":"demo"}448+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"typer","stage":"demo"}449+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"typer","namespace":"projects-demo","stage":"demo"}450+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"jinja","stage":"demo"}451+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"jinja","namespace":"projects-demo","stage":"demo"}452+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"lua","stage":"demo"}453+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"lua","namespace":"projects-demo","stage":"demo"}454+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"jq","stage":"demo"}455+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"jq","namespace":"projects-demo","stage":"demo"}456+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"kilo","stage":"demo"}457+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"kilo","namespace":"projects-demo","stage":"demo"}458+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"sinatra","stage":"demo"}459+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"sinatra","namespace":"projects-demo","stage":"demo"}460+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"project","name":"nvm","stage":"demo"}461+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"nvm","namespace":"projects-demo","stage":"demo"}462+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"anyhow","namespace":"projects-demo","stage":"demo"}463+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"ky","namespace":"projects-demo","stage":"demo"}464+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"gum","namespace":"projects-demo","stage":"demo"}465+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"click","namespace":"projects-demo","stage":"demo"}466+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"awesome","namespace":"projects-demo","stage":"demo"}467+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"changesets","namespace":"projects-demo","stage":"demo"}468+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"stb","namespace":"projects-demo","stage":"demo"}469+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fuzzel","namespace":"projects-demo","stage":"demo"}470+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"hono","namespace":"projects-demo","stage":"demo"}471+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"express","namespace":"projects-demo","stage":"demo"}472+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fastify","namespace":"projects-demo","stage":"demo"}473+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"zustand","namespace":"projects-demo","stage":"demo"}474+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"immer","namespace":"projects-demo","stage":"demo"}475+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"nanoid","namespace":"projects-demo","stage":"demo"}476+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"commander","namespace":"projects-demo","stage":"demo"}477+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"execa","namespace":"projects-demo","stage":"demo"}478+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"chalk","namespace":"projects-demo","stage":"demo"}479+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"mitt","namespace":"projects-demo","stage":"demo"}480+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"clsx","namespace":"projects-demo","stage":"demo"}481+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"ripgrep","namespace":"projects-demo","stage":"demo"}482+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"serde","namespace":"projects-demo","stage":"demo"}483+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"axum","namespace":"projects-demo","stage":"demo"}484+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fd","namespace":"projects-demo","stage":"demo"}485+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"hyperfine","namespace":"projects-demo","stage":"demo"}486+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"bubbletea","namespace":"projects-demo","stage":"demo"}487+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"fzf","namespace":"projects-demo","stage":"demo"}488+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"cobra","namespace":"projects-demo","stage":"demo"}489+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"gin","namespace":"projects-demo","stage":"demo"}490+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"requests","namespace":"projects-demo","stage":"demo"}491+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"flask","namespace":"projects-demo","stage":"demo"}492+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"httpx","namespace":"projects-demo","stage":"demo"}493+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"typer","namespace":"projects-demo","stage":"demo"}494+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"jinja","namespace":"projects-demo","stage":"demo"}495+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"lua","namespace":"projects-demo","stage":"demo"}496+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"jq","namespace":"projects-demo","stage":"demo"}497+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"kilo","namespace":"projects-demo","stage":"demo"}498+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"sinatra","namespace":"projects-demo","stage":"demo"}499+{"deletedAt":"2026-10-14T01:05:00.000Z","kind":"repo","name":"nvm","namespace":"projects-demo","stage":"demo"}modified:infra/stages.ts+1 added-6 removed
7 unmodified lines8 Schema.TemplateLiteral([9 "dev-",10 Schema.String.check(Schema.isPattern(/^[a-z0-9]+$/u)),11 ]),12- Schema.Literal("demo"),12 Schema.Literal("prod"),13 ]);14 15 export type Stage = typeof Stage.Type;16 17 // Each has an `env` block in every Worker's `wrangler.jsonc`; add a stage to both.18 export const stages = [19 "dev-oscabriel",21- "demo",20 "prod",21 ] as const satisfies readonly Stage[];22 23 // The stages people see: no script makes a throwaway project or seeds a24 // fictional one on them without being told to.27-export const publicStages: ReadonlySet<string> = new Set<Stage>([28- "demo",29- "prod",30-]);25+export const publicStages: ReadonlySet<string> = new Set<Stage>(["prod"]);26 27 export interface Hosts {28 readonly platform: string;29 readonly web: string;143 unmodified linesmodified:packages/config/test/alerts.test.ts+17 added-17 removed
29 unmodified lines30 31 describe("a stage's alerts", () => {32 it("watch each Worker for errors, and the stage for an issue spike, failing containers and a refusal spike", () => {33 expect(34- alerts("demo", ACCOUNT).map(({ kind, name }) => `${kind}: ${name}`)34+ alerts("prod", ACCOUNT).map(({ kind, name }) => `${kind}: ${name}`)35 ).toStrictEqual([36- "errors: platform-demo errors",37- "errors: sandbox-demo errors",38- "errors: web-demo errors",39- "issue spike: demo issue spike",40- "container failures: demo container failures",41- "refusal spike: demo refusal spike",36+ "errors: platform-prod errors",37+ "errors: sandbox-prod errors",38+ "errors: web-prod errors",39+ "issue spike: prod issue spike",40+ "container failures: prod container failures",41+ "refusal spike: prod refusal spike",42 ]);43 expect(44 stages.map((stage) =>45 [...new Set(alerts(stage, ACCOUNT).map(({ kind }) => kind))].join(",")134 unmodified lines180 181 describe("what bootstrap prints of them", () => {182 it("says they are made by hand, and gives each one's detection and SQL for the dashboard", () => {183 const lines = alertLines(184- "demo",185- alerts("demo", ACCOUNT).filter(({ kind }) => kind !== "errors"),184+ "prod",185+ alerts("prod", ACCOUNT).filter(({ kind }) => kind !== "errors"),186 true187 );188 189 expect(lines).toStrictEqual([190- "bootstrap demo: make these 3 alerts by hand, as Custom Alerts in the dashboard: no API takes a custom alert's query yet (README, Alerts)",191- "bootstrap demo: each is custom SQL with an Automatic time range, sent to ALERT_EMAIL's address",192- " demo issue spike: anomaly detection on spikes, evaluation window 10m, baseline window 2h, sensitivity 3, minimum event count 3",193- ` SELECT count() AS value FROM logs.issues WHERE accountTag = '${ACCOUNT}' AND scriptName IN ('platform-demo', 'sandbox-demo', 'web-demo')`,194- " demo container failures: threshold, value >= 3, evaluation window 30m",195- ` SELECT count() AS value FROM logs.workersLogs WHERE accountTag = '${ACCOUNT}' AND scriptName IN ('platform-demo', 'sandbox-demo') AND level = 'error' AND (message LIKE '%sandbox job blocked%' OR message LIKE '%the Checker could not be reached%')`,196- " demo refusal spike: anomaly detection on spikes, evaluation window 15m, baseline window 6h, sensitivity 3, minimum event count 5",197- ` SELECT count() AS value FROM events.analyticsEngine."metrics_demo" WHERE accountTag = '${ACCOUNT}' AND blob1 = 'Refused'`,190+ "bootstrap prod: make these 3 alerts by hand, as Custom Alerts in the dashboard: no API takes a custom alert's query yet (README, Alerts)",191+ "bootstrap prod: each is custom SQL with an Automatic time range, sent to ALERT_EMAIL's address",192+ " prod issue spike: anomaly detection on spikes, evaluation window 10m, baseline window 2h, sensitivity 3, minimum event count 3",193+ ` SELECT count() AS value FROM logs.issues WHERE accountTag = '${ACCOUNT}' AND scriptName IN ('platform-prod', 'sandbox-prod', 'web-prod')`,194+ " prod container failures: threshold, value >= 3, evaluation window 30m",195+ ` SELECT count() AS value FROM logs.workersLogs WHERE accountTag = '${ACCOUNT}' AND scriptName IN ('platform-prod', 'sandbox-prod') AND level = 'error' AND (message LIKE '%sandbox job blocked%' OR message LIKE '%the Checker could not be reached%')`,196+ " prod refusal spike: anomaly detection on spikes, evaluation window 15m, baseline window 6h, sensitivity 3, minimum event count 5",197+ ` SELECT count() AS value FROM events.analyticsEngine."metrics_prod" WHERE accountTag = '${ACCOUNT}' AND blob1 = 'Refused'`,198 ]);199 });200 201 it("names where they go without showing it, and says when it is not set", () => {28 unmodified linesmodified:packages/config/test/bootstrap.test.ts+36 added-36 removed
86 unmodified lines87 {88 id: "11111111-1111-4111-8111-111111111111",89 name: "front-page-dev-oscabriel",90 },91- { id: "22222222-2222-4222-8222-222222222222", name: "front-page-demo" },91+ { id: "22222222-2222-4222-8222-222222222222", name: "front-page-prod" },92 ],93 kv: [94 { id: "33333333333333333333333333333333", title: "oauth-dev-oscabriel" },95- { id: "44444444444444444444444444444444", title: "oauth-demo" },95+ { id: "44444444444444444444444444444444", title: "oauth-prod" },96 ],97 namespaces: [98 "projects-dev-oscabriel",99 "layers-dev-oscabriel",100- "projects-demo",101- "layers-demo",100+ "projects-prod",101+ "layers-prod",102 ],103 r2: [104 "evidence-dev-oscabriel",105- "evidence-demo",105+ "evidence-prod",106 "releases-dev-oscabriel",107- "releases-demo",107+ "releases-prod",108 "code-cache-dev-oscabriel",109- "code-cache-demo",109+ "code-cache-prod",110 ],111 };112 113 describe("the stage table", () => {90 unmodified lines204 });205 206 it("creates nothing on a second run", () => {207 expect(plan("dev-oscabriel", everything)).toStrictEqual([]);208- expect(plan("demo", everything)).toStrictEqual([]);208+ expect(plan("prod", everything)).toStrictEqual([]);209 });210 211 it("creates only what is missing, and never counts another stage's", () => {212- const demoOnly: Existing = {212+ const prodOnly: Existing = {213 d1: [214- { id: "22222222-2222-4222-8222-222222222222", name: "front-page-demo" },214+ { id: "22222222-2222-4222-8222-222222222222", name: "front-page-prod" },215 ],216 kv: [217 {218 id: "33333333333333333333333333333333",219 title: "oauth-dev-oscabriel",220 },221 ],222- namespaces: ["projects-demo", "layers-demo", "layers-dev-oscabriel"],223- r2: ["evidence-dev-oscabriel", "releases-demo", "code-cache-demo"],222+ namespaces: ["projects-prod", "layers-prod", "layers-dev-oscabriel"],223+ r2: ["evidence-dev-oscabriel", "releases-prod", "code-cache-prod"],224 };225 226- expect(plan("dev-oscabriel", demoOnly)).toStrictEqual([226+ expect(plan("dev-oscabriel", prodOnly)).toStrictEqual([227 Step.CreateNamespace({ name: "projects-dev-oscabriel" }),228 Step.CreateD1({ name: "front-page-dev-oscabriel" }),229 Step.CreateR2({ name: "releases-dev-oscabriel" }),230 Step.CreateR2({ name: "code-cache-dev-oscabriel" }),2 unmodified lines233 });234 235 describe("a dry run", () => {236 it("lists each step the plan would take, the private namespace among them, and says nothing changed", () => {237- expect(planLines("demo", plan("demo", nothing))).toStrictEqual([238- "bootstrap demo (dry run): create Artifacts namespace projects-demo",239- "bootstrap demo (dry run): create Artifacts namespace layers-demo",240- "bootstrap demo (dry run): create D1 front-page-demo",241- "bootstrap demo (dry run): create KV oauth-demo",242- "bootstrap demo (dry run): create R2 evidence-demo",243- "bootstrap demo (dry run): create R2 releases-demo",244- "bootstrap demo (dry run): create R2 code-cache-demo",245- "bootstrap demo (dry run): would create 7; nothing was changed",237+ expect(planLines("prod", plan("prod", nothing))).toStrictEqual([238+ "bootstrap prod (dry run): create Artifacts namespace projects-prod",239+ "bootstrap prod (dry run): create Artifacts namespace layers-prod",240+ "bootstrap prod (dry run): create D1 front-page-prod",241+ "bootstrap prod (dry run): create KV oauth-prod",242+ "bootstrap prod (dry run): create R2 evidence-prod",243+ "bootstrap prod (dry run): create R2 releases-prod",244+ "bootstrap prod (dry run): create R2 code-cache-prod",245+ "bootstrap prod (dry run): would create 7; nothing was changed",246 ]);247- expect(planLines("demo", [])).toStrictEqual([248- "bootstrap demo (dry run): would create 0; nothing was changed",247+ expect(planLines("prod", [])).toStrictEqual([248+ "bootstrap prod (dry run): would create 0; nothing was changed",249 ]);250 });251 });252 24 unmodified lines277 const devBlock = lines.findIndex((line) =>278 line.includes('"dev-oscabriel": {')279 );280 281- const demoBlock = lines.findIndex((line) => line.includes('"demo": {'));281+ const prodBlock = lines.findIndex((line) => line.includes('"prod": {'));282 283 const lineOf = (needle: string) =>284 lines.findIndex(285 (line, index) =>286- index > devBlock && index < demoBlock && line.includes(needle)286+ index > devBlock && index < prodBlock && line.includes(needle)287 ) + 1;288 289 expect(written.split("\n")).toHaveLength(lines.length);290 expect(changed(text, written)).toStrictEqual([5 unmodified lines296 297 it.effect("changes nothing when the ids are already written", () =>298 Effect.gen(function* () {299 const text = yield* rootText("apps/platform/wrangler.jsonc");300- const written = writeIds(text, "demo", ids);300+ const written = writeIds(text, "prod", ids);301 302- expect(writeIds(written, "demo", ids)).toBe(written);303- expect(writeIds(text, "demo", {})).toBe(text);302+ expect(writeIds(written, "prod", ids)).toBe(written);303+ expect(writeIds(text, "prod", {})).toBe(text);304 })305 );306 307 it.effect("writes only the id it is given", () =>308 Effect.gen(function* () {309 const text = yield* rootText("apps/platform/wrangler.jsonc");310 311- const written = writeIds(text, "demo", { oauth: ids.oauth });311+ const written = writeIds(text, "prod", { oauth: ids.oauth });312 313 expect(changed(text, written)).toHaveLength(1);314 expect(written).toContain(`"id": "${ids.oauth}"`);315 })2 unmodified lines318 it("keeps a comment that sits inside the stage's binding", () => {319 const text = [320 "{",321 ' "env": {',322- ' "demo": {',323- " // the KV namespace `oauth-demo`, {braces} and all",322+ ' "prod": {',323+ " // the KV namespace `oauth-prod`, {braces} and all",324 ' "kv_namespaces": [{ "binding": "OAUTH_KV", /* new */ "id": "0", },],',325 " },",326 " },",327 "}",328 ].join("\n");329 330- expect(writeIds(text, "demo", { oauth: "abc" })).toBe(330+ expect(writeIds(text, "prod", { oauth: "abc" })).toBe(331 text.replace('"id": "0"', '"id": "abc"')332 );333 });334 });50 unmodified lines385 it.effect("refuses another stage's triggers", () =>386 Effect.gen(function* () {387 const live = yield* fixture;388 389- expect(Result.isFailure(checkTriggers("demo", live))).toBeTruthy();389+ expect(Result.isFailure(checkTriggers("prod", live))).toBeTruthy();390 })391 );392 393 it("refuses a target without script_name when it decodes", () => {173 unmodified lines567 it("names the secrets a deployed platform lacks, and the calls that failed", () => {568 expect(569 new MissingSecrets({570 names: ["OPERATOR_TOKEN", "COOKIE_KEY"],571- stage: "demo",571+ stage: "prod",572 }).message573 ).toBe(574- "demo's platform lacks OPERATOR_TOKEN, COOKIE_KEY: set them by name, from the stage's secrets file (STAGE_SECRETS_FILE)"574+ "prod's platform lacks OPERATOR_TOKEN, COOKIE_KEY: set them by name, from the stage's secrets file (STAGE_SECRETS_FILE)"575 );576 expect(577 new CloudflareRefused({ route: "/workers/subdomain", status: 403 })578 .message7 unmodified linesmodified:packages/config/test/deploy.test.ts+5 added-55 removed
416 unmodified lines417 describe("what a failed deploy prints", () => {418 it.live("names the stages it knows when it refuses one", () =>419 Effect.gen(function* () {420 expect(yield* messageOf([])).toBe(421- "no --stage: name one of dev-oscabriel, demo, prod"421+ "no --stage: name one of dev-oscabriel, prod"422 );423 expect(yield* messageOf(["--stage", "staging"])).toBe(424- "--stage staging is not a stage infra/stages.ts declares (dev-oscabriel, demo, prod)"424+ "--stage staging is not a stage infra/stages.ts declares (dev-oscabriel, prod)"425 );426 })427 );428 8 unmodified lines437 );438 439 it.live("names the secrets file it could not read", () =>440 Effect.gen(function* () {441- const message = yield* messageOf(["--stage", "demo"], {442- env: { STAGE_SECRETS_FILE: "/nowhere/demo.secrets" },441+ const message = yield* messageOf(["--stage", "dev-oscabriel"], {442+ env: { STAGE_SECRETS_FILE: "/nowhere/dev-oscabriel.secrets" },443 });444 445 expect(message).toBe(446- "STAGE_SECRETS_FILE names /nowhere/demo.secrets, which can't be read"446+ "STAGE_SECRETS_FILE names /nowhere/dev-oscabriel.secrets, which can't be read"447 );448 })449 );450 });451 452-describe("a deploy to demo", () => {453- it.live(454- "hands the platform's deploy the values in STAGE_SECRETS_FILE, as a dev stage's does: demo's secrets are generated too",455- () =>456- Effect.gen(function* () {457- const fs = yield* FileSystem.FileSystem;458- const path = yield* Path.Path;459- const dir = yield* fs.makeTempDirectoryScoped();460- const file = path.join(dir, "demo.secrets");461-462- yield* fs.writeFileString(463- file,464- [465- "# generated for demo",466- "OPERATOR_TOKEN=operator-token-that-is-long-enough-000",467- "MASTER_KEY=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",468- ].join("\n")469- );470-471- const { result, spawned } = yield* run(["--stage", "demo"], {472- env: { STAGE_SECRETS_FILE: file },473- });474-475- expect(Result.isSuccess(result)).toBeTruthy();476- expect(spawned.map(line)).toStrictEqual([477- ".$ bun run verify",478- "apps/sandbox$ wrangler deploy --env demo",479- "apps/platform$ varlock-wrangler deploy --env demo",480- "apps/web$ bun run build",481- "apps/web$ wrangler deploy --env demo",482- ".$ bun run bootstrap --stage demo --check-triggers",483- ".$ varlock run --path infra/ -- bun scripts/smoke.ts --stage demo --since <since>",484- ]);485- expect(486- spawned.map(({ env }) =>487- ["MASTER_KEY", "OPERATOR_TOKEN"].filter((name) => name in env)488- )489- ).toStrictEqual([490- [],491- [],492- ["MASTER_KEY", "OPERATOR_TOKEN"],493- [],494- [],495- [],496- [],497- ]);498- }).pipe(Effect.scoped, Effect.provide(NodeServices.layer))499- );500-});501-452 describe("a deploy to prod", () => {453 it.live(454 "puts the platform and the web on the brand's own domain, and hands each the other's URL",455 () =>39 unmodified linesmodified:packages/config/test/import-examples.test.ts+2 added-2 removed
356 unmodified lines357 ];358 359 describe("bun scripts/import-examples.ts", () => {360 it.live(361- "takes --stage demo as any declared stage: its dry run plans the import onto demo",361+ "takes --stage prod as any declared stage: its dry run plans the import onto prod",362 () =>363 Effect.gen(function* () {364 const platform = yield* fakePlatform(["ky"]);365 366 const { ledger, printed, result } = yield* ran(367- ["--stage", "demo", "--dry-run", "--only", "anyhow"],367+ ["--stage", "prod", "--dry-run", "--only", "anyhow"],368 platform.layer369 );370 371 expect({373 unmodified linesmodified:packages/config/test/recording.test.ts+1 added-1 removed
112 unmodified lines113 114 describe("a deploy while a take is being recorded", () => {115 it.live.each([116 [["--stage", "dev-oscabriel"]],117- [["--stage", "demo"]],117+ [["--stage", "prod"]],118 [[]],119 ] as const)(120 "is refused with RecordingInProgress for %j, naming the lock, before any step runs",121 ([argv]) =>104 unmodified linesmodified:packages/config/test/release.test.ts+5 added-5 removed
251 unmodified lines252 agent: releaseRun({253 build: true,254 env: { CLAUDECODE: "1" },255 publish: true,256- stage: "demo",256+ stage: "dev-oscabriel",257 upload: true,258 }),259 alone: releaseRun({260 build: false,66 unmodified lines327 releasePlan({328 build: true,329 env: {},330 publish: true,331- stage: "demo",331+ stage: "dev-oscabriel",332 upload: true,333 })334 ).toStrictEqual(335 Result.succeed([136 unmodified lines472 473 yield* runStep("tsdown", layout, {474 origin: "https://platform.example",475 stage: Option.none(),476- version: "0.2.0-demo.1",476+ version: "0.2.0-rc.1",477 }).pipe(Effect.provide(layer));478 479 expect(yield* spawned).toStrictEqual([480- "apps/cli$ bun run build -- --targets bun-linux-x64,bun-darwin-arm64 --version 0.2.0-demo.1",480+ "apps/cli$ bun run build -- --targets bun-linux-x64,bun-darwin-arm64 --version 0.2.0-rc.1",481 ]);482 }).pipe(Effect.provide(NodeServices.layer))483 );484 });57 unmodified lines542 ),543 Effect.provide(NodeServices.layer)544 );545 546-const origin = "https://platform-demo.example.workers.dev";546+const origin = "https://platform-dev-oscabriel.example.workers.dev";547 548 const base = `${origin}/releases/0.1.0`;549 550 describe("the install script", () => {191 unmodified linesmodified:packages/config/test/scripts.test.ts+1 added-1 removed
27 unmodified lines28 file === undefined ? false : yield* fs.exists(path.join(root, file)),29 };30 });31 32-describe("the demo-readiness scripts", () => {32+describe("the examples' scripts", () => {33 it.live(34 "swarm, seed, release and import-examples each run one entry file that exists",35 () =>36 Effect.gen(function* () {17 unmodified linesmodified:packages/config/test/seed.test.ts+4 added-5 removed
474 unmodified lines475 describe(optionsOf, () => {476 it.effect.each([477 [["--world", "node"], "World"],478 [["--stage", "dev-oscabriel"], "Stage"],479- [["--stage", "demo", "--yes"], "Stage"],479 ] as const)("takes %j as a seed of the %s", ([argv, where]) =>480 Effect.map(optionsOf(argv), (options) => {481 expect(options.where._tag).toBe(where);482 })483 );484 485 it.effect.each([487- [["--stage", "demo"], "--yes"],486+ [["--stage", "dev-oscabriel", "--yes"], "--yes"],487 [[], "--world node or --stage"],488 [["--world", "node", "--stage", "dev-oscabriel"], "only one"],489 [["--world", "workerd"], "--world node"],490 [["--stage", "prod"], "prod"],11 unmodified lines502 optionsOf([503 "--stage",504 "dev-oscabriel",505 "--tokens-env",507- "DEMO_SESSIONS",508- "--operator-env=DEMO_OPERATOR",506+ "DEV_SESSIONS",507+ "--operator-env=DEV_OPERATOR",508 "--only",509 "burrow",510 "--json",511 ]),2 unmodified lines514 json: true,515 only: "burrow",516 where: SeedWhere.cases.Stage.make({517 stage: "dev-oscabriel",519- tokens: { operator: "DEMO_OPERATOR", sessions: "DEMO_SESSIONS" },518+ tokens: { operator: "DEV_OPERATOR", sessions: "DEV_SESSIONS" },519 }),520 });521 }522 )2 unmodified linesmodified:packages/config/test/smoke-loop.test.ts+11 added-11 removed
15 unmodified lines16 17 import { LedgerFile, readLedger } from "../../../infra/created.ts";18 import { servedWorld } from "../../../scripts/lib/seed.ts";19 import {20- DemoStageRefused,20+ PublicStageRefused,21 smokeLoop,22 } from "../../../scripts/lib/smoke/loop.ts";23 import { DraftNeedsLoop, main } from "../../../scripts/smoke.ts";24 import { Brand } from "../../brand/src/index.ts";262 unmodified lines287 origin: "https://platform-dev.example.workers.dev",288 run: "r1",289 stage: "dev-example",290 }).pipe(291- Effect.catchTag("DemoStageRefused", Effect.die),291+ Effect.catchTag("PublicStageRefused", Effect.die),292 Effect.flip,293 Effect.provide(platform.layer),294 Effect.provideService(LedgerFile, ledger)295 );66 unmodified lines362 })363 );364 });365 366-describe("smoke --loop on demo", () => {366+describe("smoke --loop on prod", () => {367 it.live(368- "is refused with DemoStageRefused before any request or process: a throwaway project would show on demo's front page",368+ "is refused with PublicStageRefused before any request or process: a throwaway project would show on prod's front page",369 () =>370 Effect.gen(function* () {371 const fetched: string[] = [];372 const spawner = yield* refusing;373 374- const result = yield* main(["--stage", "demo", "--loop"]).pipe(374+ const result = yield* main(["--stage", "prod", "--loop"]).pipe(375 Effect.provide(spawner.layer),376 Effect.provideService(FetchHttpClient.Fetch, (input) => {377 fetched.push(new Request(input).url);378 379- return Promise.reject(new Error("smoke --loop on demo fetched"));379+ return Promise.reject(new Error("smoke --loop on prod fetched"));380 }),381 Effect.result382 );383 2 unmodified lines386 result,387 spawned: yield* spawner.asked,388 }).toStrictEqual({389 fetched: [],390- result: Result.fail(new DemoStageRefused({ stage: "demo" })),390+ result: Result.fail(new PublicStageRefused({ stage: "prod" })),391 spawned: [],392 });393 }).pipe(Effect.provide(NodeServices.layer))394 );5 unmodified lines400 const failure = yield* Effect.flip(401 smokeLoop({402 answerer: tokens.answerer,403 decider: tokens.decider,404- origin: "https://platform-demo.example.workers.dev",404+ origin: "https://platform-prod.example.workers.dev",405 run: "r1",406- stage: "demo",406+ stage: "prod",407 })408 ).pipe(Effect.provide(spawner.layer));409 410 expect({411 failure,412 message: failure.message,413 spawned: yield* spawner.asked,414 }).toStrictEqual({415- failure: new DemoStageRefused({ stage: "demo" }),415+ failure: new PublicStageRefused({ stage: "prod" }),416 message:417- "--loop makes a throwaway project, which would show on demo's front page: run it on a dev stage",417+ "--loop makes a throwaway project, which would show on prod's front page: run it on a dev stage",418 spawned: [],419 });420 }).pipe(Effect.provide(NodeServices.layer))421 );91 unmodified linesmodified:packages/config/test/smoke.test.ts+5 added-5 removed
562 unmodified lines563 describe("smoke's own checks", () => {564 it.live("fails health when the platform serves another stage", () =>565 Effect.gen(function* () {566 const origin = yield* fakePlatform(healthy);567- const result = yield* Effect.result(smoke(origin, { stage: "demo" }));567+ const result = yield* Effect.result(smoke(origin, { stage: "prod" }));568 569 expect(result).toStrictEqual(570 Result.fail(571 new SmokeFailed({572 failures: [573 {574 probe: "health",575- reason: "GET /health named stage dev-oscabriel, not demo",575+ reason: "GET /health named stage dev-oscabriel, not prod",576 },577 ],578 origin,579 })289 unmodified lines869 870 yield* main(["--stage", "dev-oscabriel", "--url", `${origin}/`]);871 872 const failed = yield* Effect.flip(873- main(["--stage", "demo", "--url", origin])873+ main(["--stage", "prod", "--url", origin])874 );875 876 expect(877 Schema.is(SmokeFailed)(failed)72 unmodified lines950 951 it("says to bootstrap first when neither --url nor bootstrap's record names the origin", () => {952 const failed = new NoOrigin({953 file: "infra/workers-dev.json",954- stage: "demo",954+ stage: "prod",955 });956 957 expect(failed.message).toBe(958- "no --url, and infra/workers-dev.json doesn't record the account's workers.dev subdomain: run bun run bootstrap -- --stage demo first"958+ "no --url, and infra/workers-dev.json doesn't record the account's workers.dev subdomain: run bun run bootstrap -- --stage prod first"959 );960 });961 });modified:packages/config/test/swarm.test.ts+3 added-6 removed
885 unmodified lines886 })887 );888 889 it.effect(890- "refuses demo without --allow-demo, a view it doesn't have, no stage, and a flag it doesn't know",890+ "refuses prod, a view it doesn't have, no stage, and a flag it doesn't know",891 () =>892 Effect.gen(function* () {893 const reasons = yield* Effect.forEach(894 [895- ["--stage", "demo", "--dry-run"],895+ ["--stage", "prod", "--dry-run"],896 ["--stage", "dev-oscabriel", "--view", "tmux"],897 ["--dry-run"],898 ["--stage", "dev-oscabriel", "--yes"],899 ["--stage", "dev-oscabriel", "--timeout-min", "0"],4 unmodified lines904 expect(905 reasons.map((reason, at) =>906 reason.includes(907 [908- "--allow-demo",908+ "--stage prod: the swarm's contributors are fictional",909 "--view tmux: headless or herdr",910 "no --stage",911 "unknown flag --yes",912 "--timeout-min 0",913 ][at] ?? "?"914 )915 )916 ).toStrictEqual([true, true, true, true, true]);917- expect(918- (yield* optionsOf(["--stage", "demo", "--allow-demo"])).stage919- ).toBe("demo");917 })918 );919 920 it.effect(511 unmodified linesmodified:packages/config/test/teardown.test.ts+27 added-27 removed
90 unmodified lines91 repo("datekit--maintainers", layers),92 repo("datekit-805--maintainers", layers),93 namespace(projects),94 namespace(layers),95- namespace("projects-demo"),96- namespace("layers-demo"),95+ namespace("projects-prod"),96+ namespace("layers-prod"),97 namespace("witness"),98 ];99 100 const imports: readonly Created[] = [42 unmodified lines143 it("never selects witness, a stage's namespaces, the seeded examples or their forks, or a name absent from the ledger, even one that starts with smoke-", () => {144 const stageNames: readonly Created[] = [145 made("smoke", "namespace", "witness"),146 made("smoke", "repo", "smoke-r9", "witness"),147- made("smoke", "namespace", "projects-demo"),148- made("smoke", "namespace", "layers-demo"),147+ made("smoke", "namespace", "projects-prod"),148+ made("smoke", "namespace", "layers-prod"),149 made("smoke", "namespace", projects),150 made("smoke", "namespace", layers),151 made("seed", "repo", "datekit", projects),152 made("seed", "repo", "burrow", projects),8 unmodified lines161 ...made(162 "swarm",163 "repo",164 "burrow--drop-legacy-fetch-burrow-kit--marisol",165- "projects-demo"165+ "projects-prod"166 ),167- stage: "demo",167+ stage: "prod",168 },169 made("seed", "repo", "datekit--add-months-clamp--bram", projects),170 ];171 5 unmodified lines177 repo("smoke-r9", "witness"),178 repo("burrow--drop-legacy-fetch-burrow-auth--wren"),179 repo(180 "burrow--drop-legacy-fetch-burrow-kit--marisol",181- "projects-demo"181+ "projects-prod"182 ),183 repo("datekit--add-months-clamp--bram"),184 ],185- stages: [dev, "demo"],185+ stages: [dev, "prod"],186 }),187 unrecorded: teardownPlan({188 ledger: [],189 listed,190- stages: [dev, "demo"],190+ stages: [dev, "prod"],191 }),192 }).toStrictEqual({ everyStage: [], unrecorded: [] });193 });194 11 unmodified lines206 ]);207 });208 209 it("acts only on the stages named, and still guards every declared stage's namespaces", () => {210- const onDemo: Created = {211- ...made("smoke", "repo", "smoke-d1", "projects-demo"),212- stage: "demo",210+ const onProd: Created = {211+ ...made("smoke", "repo", "smoke-d1", "projects-prod"),212+ stage: "prod",213 };214 215- const demoNamespace: Created = {216- ...made("smoke", "namespace", "projects-demo"),215+ const prodNamespace: Created = {216+ ...made("smoke", "namespace", "projects-prod"),217 stage: dev,218 };219 220 expect({221- demo: teardownPlan({222- ledger: [onDemo],223- listed: [repo("smoke-d1", "projects-demo")],224- stages: ["demo"],225- }),221 dev: teardownPlan({227- ledger: [onDemo, demoNamespace],228- listed: [repo("smoke-d1", "projects-demo"), namespace("projects-demo")],222+ ledger: [onProd, prodNamespace],223+ listed: [repo("smoke-d1", "projects-prod"), namespace("projects-prod")],224 stages: [dev],225 }),231- }).toStrictEqual({ demo: [repo("smoke-d1", "projects-demo")], dev: [] });226+ prod: teardownPlan({227+ ledger: [onProd],228+ listed: [repo("smoke-d1", "projects-prod")],229+ stages: ["prod"],230+ }),231+ }).toStrictEqual({ dev: [], prod: [repo("smoke-d1", "projects-prod")] });232 });233 234 it("deletes a ledger namespace only after the repos in it", () => {235 expect(20 unmodified lines256 it("selects a repo the ledger holds only under the namespace it was made in", () => {257 expect(258 teardownPlan({259 ledger: [made("smoke", "repo", "smoke-r3", projects)],260- listed: [repo("smoke-r3", "projects-demo"), repo("smoke-r3", layers)],260+ listed: [repo("smoke-r3", "projects-prod"), repo("smoke-r3", layers)],261 stages: [dev],262 })263 ).toStrictEqual([]);264 });96 unmodified lines361 362 expect({363 deleted: isRecorded([{ ...fork, deletedAt }], fork),364 live: isRecorded([fork], fork),365- otherStage: isRecorded([fork], { ...fork, stage: "demo" }),365+ otherStage: isRecorded([fork], { ...fork, stage: "prod" }),366 }).toStrictEqual({ deleted: false, live: true, otherStage: false });367 });368 });369 370 describe("the protected names", () => {371 it("are witness and both namespaces of every stage named", () => {372- expect([...protectedNames([dev, "demo"])].toSorted()).toStrictEqual([372+ expect([...protectedNames([dev, "prod"])].toSorted()).toStrictEqual([373 "burrow",374 "datekit",375 "datekit--maintainers",376- "layers-demo",376 "layers-dev-oscabriel",378- "projects-demo",377+ "layers-prod",378 "projects-dev-oscabriel",379+ "projects-prod",380 "witness",381 ]);382 });383 });323 unmodified linesmodified:scripts/lib/smoke/loop.ts+5 added-5 removed
38 unmodified lines39 import type { LoopStep, Patience } from "./core-loop.ts";40 41 export { LoopFailed, LoopStep } from "./core-loop.ts";42 43-// A throwaway project would show on demo's front page.44-export class DemoStageRefused extends Schema.TaggedError<DemoStageRefused>()(45- "DemoStageRefused",43+// A throwaway project would show on a public stage's front page.44+export class PublicStageRefused extends Schema.TaggedError<PublicStageRefused>()(45+ "PublicStageRefused",46 { stage: Schema.String }47 ) {48 override get message() {49 return `--loop makes a throwaway project, which would show on ${this.stage}'s front page: run it on a dev stage`;100 unmodified lines150 export const smokeLoop = (151 input: LoopInput152 ): Effect.Effect<153 SmokeLoopReport,154- LoopFailed | DemoStageRefused,154+ LoopFailed | PublicStageRefused,155 ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem156 > =>157 Effect.gen(function* () {158 const { origin, stage } = input;159 160 if (publicStages.has(stage)) {161- return yield* new DemoStageRefused({ stage });161+ return yield* new PublicStageRefused({ stage });162 }163 164 const fs = yield* FileSystem.FileSystem;165 204 unmodified linesmodified:scripts/lib/swarm/args.ts+3 added-10 removed
4 unmodified lines5 * --project <name> default oscabriel/burrow6 * --scenario plain|video default plain7 * --dry-run print the plan; claim nothing, start nothing8 * --json print JSON: the plan (dry run) or the run's summary9- * --allow-demo required with --stage demo9 * --only <handle>… run only these contributors (repeat, or comma-separate)10 * --timeout-min <n> each agent's run timeout, default 2011 * --view headless|herdr default headless; herdr runs each harness in a herdr pane12 * --url <origin> the platform, when not the stage's workers.dev origin19 unmodified lines32 readonly url: Option.Option<string>;33 }34 35 export const USAGE =37- "bun scripts/swarm.ts --stage <dev-…|demo> [--project oscabriel/burrow] [--scenario plain|video] [--dry-run] [--json] [--allow-demo] [--only <handle>…] [--timeout-min 20] [--view headless|herdr] [--url <origin>]";36+ "bun scripts/swarm.ts --stage <dev-…> [--project oscabriel/burrow] [--scenario plain|video] [--dry-run] [--json] [--only <handle>…] [--timeout-min 20] [--view headless|herdr] [--url <origin>]";37 38 export const ViewName = Schema.Literals(["headless", "herdr"]);39 40 export type ViewName = typeof ViewName.Type;8 unmodified lines49 "--url",50 "--view",51 ] as const;52 54-const SWITCHES = ["--allow-demo", "--dry-run", "--json"] as const;53+const SWITCHES = ["--dry-run", "--json"] as const;54 55 const failed = (reason: string) => new SwarmFailed({ reason });56 57 const onlyOf = (argv: readonly string[]) =>99 unmodified lines157 );158 159 if (stage === "prod") {160 return yield* failed(162- "--stage prod: the swarm's contributors are fictional, so run it on a dev stage or demo"161+ "--stage prod: the swarm's contributors are fictional, so run it on a dev stage"162 );163 }164 166- if (stage === "demo" && !argv.includes("--allow-demo")) {167- return yield* failed(168- "--stage demo: its burrow family is for the recorded take; run it there only with --allow-demo"169- );170- }171-165 const rawView = Option.getOrElse(166 flagValue(argv, "--view"),167 () => "headless"168 );82 unmodified linesmodified:scripts/release.ts+1 added-1 removed
38 unmodified lines39 "--version",40 ]);41 42 const USAGE =43- "bun run release -- [--build] [--upload --stage <dev-…|demo>] [--publish] [--version <semver>] [--origin <url>]";43+ "bun run release -- [--build] [--upload --stage <dev-…|prod>] [--publish] [--version <semver>] [--origin <url>]";44 45 // Already said in one line, so the runtime exits 1 without printing it again.46 class Reported extends Schema.TaggedError<Reported>()("Reported", {}) {47 override readonly [Runtime.errorReported] = false;197 unmodified linesmodified:scripts/seed.ts+2 added-9 removed
65 unmodified lines66 "--stage",67 "--tokens-env",68 "--url",69 "--world",70- "--yes",70 ]);71 72 const USAGE =74- "bun scripts/seed.ts --world node | --stage <dev-…|demo> [--url <origin>] [--tokens-env SESSION_TOKENS] [--operator-env OPERATOR_TOKEN] [--only <project> [--as <copy>]] [--json] [--yes]";73+ "bun scripts/seed.ts --world node | --stage <dev-…> [--url <origin>] [--tokens-env SESSION_TOKENS] [--operator-env OPERATOR_TOKEN] [--only <project> [--as <copy>]] [--json]";74 75 const failed = (reason: string) => new SeedFailed({ reason });76 77 const stageFrom = (argv: readonly string[]) =>3 unmodified lines81 );82 83 if (stage === "prod") {84 return yield* failed(86- "--stage prod is the real platform: the examples are fictional, so seed them on a dev stage or demo"85+ "--stage prod is the real platform: the examples are fictional, so seed them on a dev stage"86 );87 }88 90- if (stage === "demo" && !argv.includes("--yes")) {91- return yield* failed(92- "--stage demo is the stage the user records on (H7): seed it only between takes, with --yes"93- );94- }95-89 const tokens = {90 operator: Option.getOrElse(91 flagValue(argv, "--operator-env"),92 () => "OPERATOR_TOKEN"312 unmodified linesmodified:scripts/smoke.ts+3 added-3 removed
30 unmodified lines31 recordedSubdomain,32 stageOf,33 subdomainFile,34 } from "../infra/stages.ts";35-import { DemoStageRefused, LoopFailed, smokeLoop } from "./lib/smoke/loop.ts";35+import { PublicStageRefused, LoopFailed, smokeLoop } from "./lib/smoke/loop.ts";36 37 export class DraftNeedsLoop extends Schema.TaggedError<DraftNeedsLoop>()(38 "DraftNeedsLoop",39 { flag: Schema.Literal("--draft") }16 unmodified lines56 } from "../infra/smoke.ts";57 58 export type { LogsCheck, SmokeReport } from "../infra/smoke.ts";59 60-export { DemoStageRefused, LoopFailed, smokeLoop } from "./lib/smoke/loop.ts";60+export { PublicStageRefused, LoopFailed, smokeLoop } from "./lib/smoke/loop.ts";61 62 export type { SmokeLoopReport } from "./lib/smoke/loop.ts";63 64 const ANSWERER = "bram";69 unmodified lines134 Effect.gen(function* () {135 const stage = yield* stageOf(argv);136 137 yield* publicStages.has(stage)138- ? Effect.fail(new DemoStageRefused({ stage }))138+ ? Effect.fail(new PublicStageRefused({ stage }))139 : Effect.void;140 141 const answerer = Option.getOrElse(flagValue(argv, "--as"), () => ANSWERER);142 const tokens = yield* tokensFrom(answerer);53 unmodified linesmodified:AGENTS.md+2 added-2 removed
62 unmodified lines63 - `env:check`: shows the env with its values redacted.64 - `ops -- <command>`: runs cf with the ops credentials (see Boundaries).65 - `bootstrap -- --stage <stage>`: makes a stage's Cloudflare resources; a second run creates nothing, and `--dry-run` only prints the plan. Either run ends by printing the stage's alerts (`infra/alerts.ts`), which a person makes by hand in the dashboard: no API takes a custom alert's query yet.66 - `deploy -- --stage <stage>`: the one way to deploy. It runs `verify`, deploys the three Workers with Wrangler, reads the push trigger back, then runs `smoke` with infra's credentials and `--since` the first upload. `prod` is served on the brand's own domain (the web at the apex, the platform at `git.`), which `infra/stages.ts` names and the deploy passes to Wrangler, so the name stays out of `wrangler.jsonc`.67-- `smoke -- --stage <stage>`: read-only probes against a live stage. `--since <instant>` then reads the stage's Workers Logs through the SQL API, with infra's credentials (Account Analytics Read), and fails on any exception or error-level line since then. `--loop` then runs the whole core loop on a throwaway project, `smoke-<run>`, through the CLI and git, and refuses `demo` and `prod`.67+- `smoke -- --stage <stage>`: read-only probes against a live stage. `--since <instant>` then reads the stage's Workers Logs through the SQL API, with infra's credentials (Account Analytics Read), and fails on any exception or error-level line since then. `--loop` then runs the whole core loop on a throwaway project, `smoke-<run>`, through the CLI and git, and refuses `prod`.68 - `seed`: puts the two example projects on a platform (`--world node` on this machine, or `--stage <stage>`); a second run changes nothing. `--only <example> --as <name>` seeds a fresh copy under another name, and refuses a taken one. It refuses `prod`, as `swarm` does: their projects and people are fictional.69-- `import-examples -- --stage <stage>`: imports the open-source repos the code browser is previewed on, one at a time, onto a stage (`demo` included, with its reason in the stage's record), each recorded in the ledger as kept; `--tags` backfills the tags Artifacts' import leaves out, `--only <name>` imports one, and `--world node` imports onto this machine.69+- `import-examples -- --stage <stage>`: imports the open-source repos the code browser is previewed on, one at a time, onto any declared stage, `prod` included, each recorded in the ledger as kept; `--tags` backfills the tags Artifacts' import leaves out, `--only <name>` imports one, and `--world node` imports onto this machine.70 - `swarm -- --stage <stage> --project <name>`: plans six fictional contributors, on four harnesses, against one split family on a stage, claims each one's ask, prepares a workspace with a clone of its fork outside the checkout, starts each harness headless on the brief and sends every refusal back into the same session, at most three times, then writes the run's summary; `--view herdr` runs them in herdr panes beside a counter, and `--dry-run` only prints the plan.71 - `release -- --build | --upload --stage <stage> | --publish`: builds the CLI's npm package and two binaries, uploads a release to the stage's own bucket, which the platform serves, and leaves `npm publish` to a person: under an agent it prints the command instead.72 73 ## Nouns66 unmodified linesmodified:README.md+4 added-4 removed
1 # Myr2 3 A Git platform for the boundary between a project and everyone else. Everything a project ships is public, its contribution process is typed code on `main`, and a push lands only by passing a typed gate.4 5-Anyone's agent can now offer a change at any hour, and projects answer by closing the door or hand-building a vouch gate in front of it. Myr puts that boundary in the platform, so it is held at the push rather than in a maintainer's evening. Live demo: <https://web-demo.oscargabriel.workers.dev>.5+Anyone's agent can now offer a change at any hour, and projects answer by closing the door or hand-building a vouch gate in front of it. Myr puts that boundary in the platform, so it is held at the push rather than in a maintainer's evening. It runs live at <https://myr.technology>.6 7 A platform can do what a setting on a code host cannot:8 9 - **Judge with checks the answer cannot touch.** A push that edits test config, scripts or CI, or skips a test without a reason, is refused.63 unmodified lines73 ```sh74 # Errors by Worker since an instant75 bun run ops -- analytics sql post --scope-account-tag <account id> \76 --time-range-start 2026-10-13T00:00:00Z \77- --query "SELECT scriptName, count() AS errors FROM logs.workersLogs WHERE scriptName IN ('platform-demo', 'sandbox-demo', 'web-demo') AND (level = 'error' OR error != '') GROUP BY scriptName"77+ --query "SELECT scriptName, count() AS errors FROM logs.workersLogs WHERE scriptName IN ('platform-prod', 'sandbox-prod', 'web-prod') AND (level = 'error' OR error != '') GROUP BY scriptName"78 79 # Refusals by tag and stage80 bun run ops -- analytics sql post --scope-account-tag <account id> \81- --query "SELECT blob2 AS tag, blob3 AS stage, count() AS refusals FROM events.analyticsEngine.\"metrics_demo\" WHERE blob1 = 'Refused' GROUP BY tag, stage ORDER BY refusals DESC"81+ --query "SELECT blob2 AS tag, blob3 AS stage, count() AS refusals FROM events.analyticsEngine.\"metrics_prod\" WHERE blob1 = 'Refused' GROUP BY tag, stage ORDER BY refusals DESC"82 ```83 84 `bun run ops -- analytics sql introspection get --account-tag <account id> --include-columns --include-wae` lists the datasets and their columns.85 17 unmodified lines103 apps/ the platform, sandbox and web Workers, and the CLI104 packages/ the protocol (one schema for every surface), gate, rules, checks, lifecycles, git and the rest105 infra/ bootstrap, deploy, the stage table, teardown106 scripts/ brand and byte checks, seed, smoke, swarm, release107-examples/ datekit and burrow, fictional projects for the demo107+examples/ datekit and burrow, fictional projects seeded on dev stages108 tools/ the vendored lint plugins109 ```110 111 ## Credits12 unmodified lines