wrangler.jsonc
This file
Path
apps/sandbox/wrangler.jsonc
132 lines · 4.5 KiB
Last changed by
Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–17why, one step back1{2 // The sandbox Worker: the Checker and the Lander, each a Durable Object3 // with its own container, reached only through the platform's `SANDBOX`4 // service binding (its default entrypoint's RPC). It has no Artifacts5 // binding of any kind: tokens arrive in jobs, minted per job by the6 // platform. Deploy only through infra/deploy.ts, to an explicit stage.7 //8 // The top level is stage `local`: it builds and types the Worker and is9 // never deployed. Each stage under `env` repeats the containers and10 // Durable Objects, since wrangler does not inherit them.11 "$schema": "node_modules/wrangler/config-schema.json",12 "name": "sandbox",13 "main": "src/worker.ts",14 "compatibility_date": "2026-10-05",15 // The Sandbox SDK's `Files` needs it.16 "compatibility_flags": ["nodejs_compat"],17 "minify": true,Merge observability into mainoscabrielbefore adoption1985111
lines 18–19why, one step back18 // A stack trace in the logs, or an Issue, names the source.19 "upload_source_maps": true,Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 20–21why, one step back20 "workers_dev": false,21 "preview_urls": false,Merge observability into mainoscabrielbefore adoption1985111
lines 22–33why, one step back22 // The Worker's own: every invocation's logs and trace, unsampled, and23 // Issues. Every stage inherits it; a container's logs are its own, below.24 "observability": {25 "enabled": true,26 "logs": {27 "enabled": true,28 "head_sampling_rate": 1,29 "invocation_logs": true,30 },31 "traces": { "enabled": true, "head_sampling_rate": 1 },32 "issues": { "enabled": true },33 },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 34–43why, one step back34 "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Checker", "Lander"] }],35 "durable_objects": {36 "bindings": [37 { "name": "CHECKER", "class_name": "Checker" },38 { "name": "LANDER", "class_name": "Lander" },39 ],40 },41 // Untrusted answer code runs in a Checker; the Lander runs only git and42 // Bun. One container per Durable Object, which picks its instance size when43 // it starts it (`ctx.container.start`).Merge observability into mainoscabrielbefore adoption1985111
lines 44–50why, one step back44 //45 // A container's own logs are off in a Checker: held-back checks run there,46 // and nothing a sealed check writes may reach a log (principle 7). They are47 // on in the Lander, which reads and writes only the public namespace's48 // repos (canonical and forks), never a layer, and hands git its token in49 // env, never in a URL or an argument. Each stage sets both again: a50 // container that leaves `observability` out keeps whatever it last had.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 51–54why, one step back51 "containers": [52 {53 "class_name": "Checker",54 "scheduling_policy": "durable_object",Merge observability into mainoscabrielbefore adoption1985111
line 55why, one step back55 "observability": { "enabled": false },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 56–60why, one step back56 "images": { "check": { "dockerfile": "./images/check.Dockerfile" } },57 },58 {59 "class_name": "Lander",60 "scheduling_policy": "durable_object",Merge observability into mainoscabrielbefore adoption1985111
line 61why, one step back61 "observability": { "enabled": true },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 62–83why, one step back62 // The repo root, so the image can carry the sdk for `bundleRules`63 // (land.Dockerfile.dockerignore admits only what it copies).64 "images": {65 "land": {66 "dockerfile": "./images/land.Dockerfile",67 "build_context": "../..",68 },69 },70 },71 ],72 "env": {73 "dev-oscabriel": {74 "durable_objects": {75 "bindings": [76 { "name": "CHECKER", "class_name": "Checker" },77 { "name": "LANDER", "class_name": "Lander" },78 ],79 },80 "containers": [81 {82 "class_name": "Checker",83 "scheduling_policy": "durable_object",Merge observability into mainoscabrielbefore adoption1985111
line 84why, one step back84 "observability": { "enabled": false },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 85–91why, one step back85 "images": {86 "check": { "dockerfile": "./images/check.Dockerfile" },87 },88 },89 {90 "class_name": "Lander",91 "scheduling_policy": "durable_object",Merge observability into mainoscabrielbefore adoption1985111
line 92why, one step back92 "observability": { "enabled": true },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 93–101why, one step back93 "images": {94 "land": {95 "dockerfile": "./images/land.Dockerfile",96 "build_context": "../..",97 },98 },99 },100 ],101 },Add a prod stage served on the brand's own domainoscabrielbefore adoption78a5062
lines 102–112why, one step back102 "prod": {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",Merge observability into mainoscabrielbefore adoption1985111
line 113why, one step back113 "observability": { "enabled": false },Add a prod stage served on the brand's own domainoscabrielbefore adoption78a5062
lines 114–120why, one step back114 "images": {115 "check": { "dockerfile": "./images/check.Dockerfile" },116 },117 },118 {119 "class_name": "Lander",120 "scheduling_policy": "durable_object",Merge observability into mainoscabrielbefore adoption1985111
line 121why, one step back121 "observability": { "enabled": true },Add a prod stage served on the brand's own domainoscabrielbefore adoption78a5062
lines 122–130why, one step back122 "images": {123 "land": {124 "dockerfile": "./images/land.Dockerfile",125 "build_context": "../..",126 },127 },128 },129 ],130 },Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 131–132why, one step back131 },132}