Skip to content
Myr

Start the Checker's containers on standard-3, so burrow's lint lane runs, and record the dev stage's live core loop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- The frozen build (030c4d6) deployed to dev-oscabriel through infra/deploy.ts (verify, sandbox, platform, web, triggers, smoke) and `bun scripts/smoke.ts --stage dev-oscabriel --loop` passed twice in a row on it, with no fix needed: smoke-20261008-143944 in 104.4 s, smoke-20261008-144139 in 78.9 s. Each landing has bram as author, the platform as committer, and Asked-by, Signed-off-by, Assisted-by (the loop ran from an agent session), Ask, Verdict and Request-Id trailers. - The Checker fix, a live-only failure: 717's push to burrow's auth child on dev (12:37 UTC) came back VerifierBlocked twice. The sandbox's logs (cf observability telemetry query, service sandbox-dev-oscabriel, 12:30-13:00 UTC) show every `bun run lint` lane, on the answer's merged tree and on burrow's main (9998ebe), aborting with "thread 'tokio-rt-worker' panicked at crates/oxc_allocator/src/pool/fixed_size.rs:112:67: called `Result::unwrap()` on an `Err` value: ()" and SIGABRT. oxlint with JS plugins makes one fixed-size allocator per thread, each a System.alloc of about 4 GiB aligned on 2 GiB (about 6 GiB of address space through posix_memalign), and the Checker ran on the runtime's default `lite` (256 MiB), where Linux refuses that reservation. A lane red on main is VerifierBlocked, so every burrow answer, the take's six included, would have been refused. - `checkInstance = "standard-3"` (2 vCPU, 8 GiB) in apps/sandbox/src/checker.ts: the job's Box starts on it, and so does a restore from a setup snapshot (SdkChecker.layer now takes `{ instance, proxied }`). Cloudflare's account limits (6 TiB concurrent memory) leave room for the swarm. - Live proof after the fix, on the 14:51 UTC deploy: a `seed --as burrow-lint-807` copy of burrow, wren claimed drop-legacy-fetch-burrow-auth, pushed b9e33f3 (session.ts onto http.get), and it landed as 5fd00e0 in about 65 s; the Checker's log shows `bun run lint` printing burrow's six warnings and exiting, no panic. Then the core loop passed twice more on the same deploy: smoke-20261008-145551 in 82.7 s and smoke-20261008-145715 in 100.3 s. - Step timings (ms), runs 1-4 (people, init, open-ask, claim, out-of-scope, answer, landing, verdict-note): 1617/29834/23360/3610/6396/4906/32738/1904; 1416/19754/19714/3284/5493/4492/22769/1948; 1597/23375/22381/3381/4882/4283/20929/1861; 1713/23775/20722/3499/6880/4885/36645/2166. - Tests: apps/sandbox/test/checker.test.ts "starts each container on two vCPUs and 8 GiB, from the image and from a snapshot alike" (red first: both starts named no instance), and the snapshot test now expects the restore on standard-3. fake-box.ts's container can be stopped and records the instance each start names. - Ledger: infra/created.jsonl gains 15 lines: the four loop runs (each project, its repo and its claim fork), the burrow-lint-807 copy and its repo (by seed), and wren's fork of it (added by hand with recordCreated, by seed). Every repo they made in projects-dev-oscabriel is listed. No attempt failed, so no failed run's throwaways. - infra/stages.md: the dev stage's state, the ledger summary and the URL rows (the Checker and Lander sizes on the sandbox row). - bytes:check: platform entry 1,605,405, sandbox 569,565, web entry 717,922 (JavaScript 2,365,090), each under 1,665,000 (web JavaScript under 2,500,000). - ASSUMPTION: standard-2 (6 GiB) would still refuse one reservation; it was not tried live. The Checker on two vCPUs did not shorten open-ask (about 20 s, mostly a cold container and the clone), so S3's earlier numbers still stand.

authored by oscabriel · committed by oscabriel · parent 030c4d6 · Browse files · 6 files+133 added−43 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+133 added−43 removed

  • tests:+72 added−26 removed
  • other:+61 added−17 removed

6 files+133 added−43 removed

modified:apps/sandbox/src/checker/sdk.ts+12 added-4 removed
197 unmodified lines
198 })199 )200 );201202export const SdkChecker = {202/** How the Checker's container runs: the hosts its env route may open, and its size. */203export interface CheckerStart {204 /**204 * `proxied` is every host the job's env route may open (`checker/env.ts`):205 * a host first registered after the catch-all would never be reached.205 * Every host the job's env route may open (`checker/env.ts`): a host206 * first registered after the catch-all would never be reached.207 */208 readonly proxied: readonly string[];209 /** The instance a restore starts on: the one the job's `Box` starts. */210 readonly instance: NonNullable<ContainerStartupOptions["instance"]>;211}212213export const SdkChecker = {214 layer: (215 container: Container,216 gateways: Gateways,217 index: SnapshotIndex,211 proxied: readonly string[] = []218 { instance, proxied }: CheckerStart219 ): Layer.Layer<Network | Snapshots> =>220 Layer.effectContext(221 Effect.gen(function* () {222 const routes = yield* Ref.make<Routes>({
41 unmodified lines
264 container.start({265 containerSnapshot: { id },266 enableInternet: false,267 entrypoint: IDLE,268 instance,269 });270 },271 });272
46 unmodified lines
modified:apps/sandbox/src/checker.ts+26 added-7 removed
modified:apps/sandbox/test/checker.test.ts+51 added-15 removed
715 unmodified lines
716 * The sandbox's `CHECKER` namespace: each unique id gets a Checker over its717 * own fake container, and `snapshots:<project>` names an index kept in718 * `index`.719 */720const checkerWorld = (options: { readonly withGateways: boolean }) => {720const checkerWorld = (options: {721 readonly withGateways: boolean;722 /** Whether each Checker's container is running before its job; it is unless false. */723 readonly running?: boolean;724}) => {725 const boxes: ReturnType<typeof fakeContainer>[] = [];726 const index = new Map<string, string>();727 const named: string[] = [];728
30 unmodified lines
759760 const checkers: Checkers = {761 CHECKER: {762 get: () => {759 const box = fakeContainer();763 const box = fakeContainer({ running: options.running ?? true });764765 boxes.push(box);766767 // The Worker's other exports are not the Checker's to touch: only
20 unmodified lines
788789const encodedWire = () =>790 Schema.encodeEffect(CheckWire)(wireFor()).pipe(Effect.orDie);791792/**793 * Two jobs of one project through `runCheck`, one after the other, each in794 * a container that runs before it starts unless `running` is false.795 */788/** Two jobs of one project through `runCheck`, one after the other. */789const twoJobs = Effect.gen(function* () {790 const world = checkerWorld({ withGateways: true });791 const wire = yield* encodedWire();796const twoJobsIn = ({ running = true } = {}) =>797 Effect.gen(function* () {798 const world = checkerWorld({ running, withGateways: true });799 const wire = yield* encodedWire();800793 const outcomes = yield* Effect.forEach([wire, wire], (each) =>794 Effect.flatMap(795 Effect.promise(() => runCheck(world.checkers, each)),796 Schema.decodeEffect(CheckExit)797 )798 );801 const outcomes = yield* Effect.forEach([wire, wire], (each) =>802 Effect.flatMap(803 Effect.promise(() => runCheck(world.checkers, each)),804 Schema.decodeEffect(CheckExit)805 )806 );807800 return { ...world, outcomes };801});808 return { ...world, outcomes };809 });810811const twoJobs = twoJobsIn();812813const intercepts = (calls: readonly ContainerCall[]) =>814 calls.flatMap((call) =>815 call.kind === "intercept" ? [`${call.target} → ${call.to}`] : []816 );
67 unmodified lines
884 expect([...index.values()]).toStrictEqual(["snapshot-1"]);885 expect([...new Set(named)]).toStrictEqual(["snapshots:datekit"]);886 expect(887 second?.calls.filter((call) => call.kind === "start")878 ).toStrictEqual([{ from: "snapshot-1", kind: "start" }]);888 ).toStrictEqual([889 { from: "snapshot-1", instance: "standard-3", kind: "start" },890 ]);891 expect(892 second?.calls.filter(893 (call) => call.kind === "exec" && call.argv.includes(SETUP)894 )
1 unmodified line
896 })897 );898899 it.effect(900 "starts each container on two vCPUs and 8 GiB, from the image and from a snapshot alike",901 () =>902 Effect.gen(function* () {903 const { boxes } = yield* twoJobsIn({ running: false });904905 // oxlint with JS plugins reserves 6 GiB of address space per906 // thread, which Linux refuses on a smaller instance: on the907 // runtime's default (`lite`, 256 MiB) burrow's lint lane aborted908 // on main and on every answer, so each answer was VerifierBlocked909 // (dev-oscabriel, 2026-10-08).910 const starts = boxes.flatMap(({ calls }) =>911 calls.flatMap((call) => (call.kind === "start" ? [call] : []))912 );913914 expect(new Set(starts.map(({ from }) => from))).toStrictEqual(915 new Set(["registry.cloudflare.com/sandbox/check:315", "snapshot-1"])916 );917 expect(new Set(starts.map(({ instance }) => instance))).toStrictEqual(918 new Set(["standard-3"])919 );920 })921 );922923 it.effect(924 "is VerifierBlocked, starting no container, while the Worker does not export the gateways",925 () =>926 Effect.gen(function* () {927 const world = checkerWorld({ withGateways: false });
14 unmodified lines
modified:apps/sandbox/test/fake-box.ts+21 added-11 removed
224 unmodified lines
225 readonly argv: readonly string[];226 readonly env: Readonly<Record<string, string>>;227 }228 | { readonly kind: "intercept"; readonly target: string; readonly to: string }229 | { readonly kind: "start"; readonly from: string }229 | {230 readonly kind: "start";231 readonly from: string;232 /** The instance size the start named, when it named one. */233 readonly instance?: ContainerStartupOptions["instance"];234 }235 | { readonly kind: "snapshot" }236 | { readonly kind: "destroy" };237238const bytes = (text: string) => {
5 unmodified lines
244 return buffer;245};246247/**243 * A running container as the Container API shows a Durable Object one: it244 * records each call, prints a lockfile listing for `git ls-tree`, and exits245 * 0 with no output for every other command. Its outbound intercepts record246 * which gateway, with which props, took each target.248 * A container as the Container API shows a Durable Object one, running249 * unless `running` says otherwise (a stopped one is started before each250 * command): it records each call, prints a lockfile listing for `git251 * ls-tree`, and exits 0 with no output for every other command. Its252 * outbound intercepts record which gateway, with which props, took each253 * target.254 */248export const fakeContainer = () => {255export const fakeContainer = ({ running = true } = {}) => {256 const calls: ContainerCall[] = [];257 const gateways = new Map<Fetcher, string>();258259 const gateway = (description: string) => {
44 unmodified lines
304 });305306 return Promise.resolve();307 },301 running: true,308 running,309 snapshotContainer: () => {310 calls.push({ kind: "snapshot" });311312 return Promise.resolve({ id: "snapshot-1", size: 1 });313 },314 start: (options) => {308 calls.push({309 from: options?.containerSnapshot?.id ?? options?.image ?? "?",310 kind: "start",311 });315 const from = options?.containerSnapshot?.id ?? options?.image ?? "?";316317 calls.push(318 options?.instance === undefined319 ? { from, kind: "start" }320 : { from, instance: options.instance, kind: "start" }321 );322 },323 });324325 /** The loopbacks `ctx.exports` holds for the Worker's outbound gateways. */
14 unmodified lines
modified:infra/created.jsonl+15 added
1{"at":"2026-10-08T12:37:07.103Z","by":"swarm","kind":"repo","name":"burrow--drop-legacy-fetch-burrow-auth--wren","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}2{"at":"2026-10-08T14:40:15.803Z","by":"smoke","kind":"project","name":"smoke-20261008-143944","stage":"dev-oscabriel"}3{"at":"2026-10-08T14:40:15.804Z","by":"smoke","kind":"repo","name":"smoke-20261008-143944","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}4{"at":"2026-10-08T14:40:42.774Z","by":"smoke","kind":"repo","name":"smoke-20261008-143944--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}5{"at":"2026-10-08T14:42:01.017Z","by":"smoke","kind":"project","name":"smoke-20261008-144139","stage":"dev-oscabriel"}6{"at":"2026-10-08T14:42:01.017Z","by":"smoke","kind":"repo","name":"smoke-20261008-144139","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}7{"at":"2026-10-08T14:42:24.015Z","by":"smoke","kind":"repo","name":"smoke-20261008-144139--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}8{"at":"2026-10-08T14:52:20.939Z","by":"seed","kind":"project","name":"burrow-lint-807","stage":"dev-oscabriel"}9{"at":"2026-10-08T14:52:20.939Z","by":"seed","kind":"repo","name":"burrow-lint-807","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}10{"at":"2026-10-08T14:54:08.539Z","by":"seed","kind":"repo","name":"burrow-lint-807--drop-legacy-fetch-burrow-auth--wren","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}11{"at":"2026-10-08T14:56:16.037Z","by":"smoke","kind":"project","name":"smoke-20261008-145551","stage":"dev-oscabriel"}12{"at":"2026-10-08T14:56:16.038Z","by":"smoke","kind":"repo","name":"smoke-20261008-145551","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}13{"at":"2026-10-08T14:56:41.800Z","by":"smoke","kind":"repo","name":"smoke-20261008-145551--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}14{"at":"2026-10-08T14:57:40.569Z","by":"smoke","kind":"project","name":"smoke-20261008-145715","stage":"dev-oscabriel"}15{"at":"2026-10-08T14:57:40.570Z","by":"smoke","kind":"repo","name":"smoke-20261008-145715","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}16{"at":"2026-10-08T14:58:04.791Z","by":"smoke","kind":"repo","name":"smoke-20261008-145715--parse-year--bram","namespace":"projects-dev-oscabriel","stage":"dev-oscabriel"}
modified:infra/stages.md+8 added-6 removed
9 unmodified lines
104. [Teardown policy](#4-teardown-policy)115. [Human steps status](#5-human-steps-status)126. [URLs](#6-urls)1314Sections 1 to 6 hold the state as of 2026-10-08, 14:00 UTC, read from the account with read-only calls.14Sections 1 to 6 hold the state as of 2026-10-08, 15:00 UTC, read from the account with read-only calls.1516## 1. Stages1718| Stage | What it is for | State on 2026-10-08 |19| --- | --- | --- |20| `dev-oscabriel` | One person's iteration. Deploy it as often as you like. | Bootstrapped 2026-10-07 and deployed (platform, sandbox, web). Re-checked 2026-10-08: bootstrap created nothing, and the platform holds every required secret. |20| `dev-oscabriel` | One person's iteration. Deploy it as often as you like. | Bootstrapped 2026-10-07 and deployed (platform, sandbox, web). Re-checked 2026-10-08: bootstrap created nothing, and the platform holds every required secret. The feature-frozen build was deployed at 14:51 UTC on 2026-10-08, and the whole core loop (`bun scripts/smoke.ts --stage dev-oscabriel --loop`) passed on it twice in a row. |21| `demo` | The recording and the submission. Deploy it deliberately, and never while a take is being recorded (H7). | Bootstrapped 2026-10-08: six resources created, migrations `0001` to `0004` applied, and a second run created nothing. Its secrets are set. Its Workers aren't deployed yet. |2223There is no `prod` stage before the deadline. The top level of each `wrangler.jsonc` is stage `local`, for tests and `wrangler dev`, and it is never deployed. A new person's stage is added to `stages` in `stages.ts` and gets an `env` block in each `wrangler.jsonc`, in the same change.24
53 unmodified lines
78## 3. Throwaway ledger summary7980A throwaway is something a smoke run, a swarm run or a `seed --as` copy makes on a stage, beside the stage's own resources. Each run appends one JSON line for each throwaway to `infra/created.jsonl` (`infra/created.ts`), and teardown acts only on those lines.8182On 2026-10-08 the ledger holds one entry, which still exists:82On 2026-10-08 at 15:00 UTC the ledger holds 16 entries, all on `dev-oscabriel`, and each still exists:8384| When | By | Kind | Name | Where |84| When (UTC) | By | Kind | Name | Where |85| --- | --- | --- | --- | --- |86| 2026-10-08 12:37 | swarm | repo | `burrow--drop-legacy-fetch-burrow-auth--wren` (a released claim's fork) | `projects-dev-oscabriel` |87| 2026-10-08 14:40 to 14:58 | smoke | project, repo, repo | four core-loop runs, `smoke-20261008-143944`, `smoke-20261008-144139`, `smoke-20261008-145551` and `smoke-20261008-145715`: each one's project, its repo, and its claim's fork `<project>--parse-year--bram` | `projects-dev-oscabriel` |88| 2026-10-08 14:52 to 14:54 | seed | project, repo, repo | `burrow-lint-807`, a `seed --as` copy of burrow that proved the Checker runs burrow's lint lane, with its repo and wren's claim fork `burrow-lint-807--drop-legacy-fetch-burrow-auth--wren` | `projects-dev-oscabriel` |8990The live runs before the ledger existed left throwaways that it doesn't hold, all on `dev-oscabriel`. Teardown lists them separately and checks each one still exists before it deletes anything:9192- In `projects-dev-oscabriel`, 25 repos on 2026-10-08. Two of them, `datekit` and `burrow`, are the stage's seeded examples, and their working and claim forks (`datekit--me--ines-v`, `datekit--format-ordinal--bram`, `datekit--add-months-clamp--bram`) belong to them. The rest are test projects and their forks: `w3live-muyjz31t`, `w3live-muyk0528`, `w3live-muyk72qm`, `w3live-muykamf1`, `w3live-muyklikt` (with `--parse-iso--alice`), `w3live-muyl0wps` (with `--parse-iso--alice`), `w3live-muyl2z12` (with `--parse-iso--alice`), `scratch-onpush-muykseuk`, `w4-rehearsal` (with `--first-day--alice`, `--canada-sunday--alice`, `--brazil-sunday--alice` and `--mexico-sunday--alice`), and `w4-ratchet` (with `--no-any-in-parser--alice` and `--pad-day--bob`).
34 unmodified lines
127The account's workers.dev subdomain is in `infra/workers-dev.json`. The demo's rows are filled in when it is deployed.128129| Stage | What | URL | State on 2026-10-08 |130| --- | --- | --- | --- |129| `dev-oscabriel` | platform | `https://platform-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/health` answers 200) |131| `dev-oscabriel` | platform | `https://platform-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/health` answers 200); the core loop passed live twice on the 14:51 deploy |132| `dev-oscabriel` | web | `https://web-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/` answers 200) |133| `dev-oscabriel` | CLI install | `https://platform-dev-oscabriel.oscargabriel.workers.dev/install.sh` | served from `releases-dev-oscabriel` |134| `dev-oscabriel` | Google redirect URI (H4) | `https://platform-dev-oscabriel.oscargabriel.workers.dev/oauth/google/callback` | not registered |133| `dev-oscabriel` | sandbox | none: it has no workers.dev route, and only the platform reaches it | deployed |135| `dev-oscabriel` | sandbox | none: it has no workers.dev route, and only the platform reaches it | deployed; the Checker's containers start on `standard-3` (2 vCPU, 8 GiB), the Lander's on `standard-2` |136| `demo` | platform | `https://platform-demo.oscargabriel.workers.dev` | not deployed: a placeholder that holds the secrets, with no route (404) |137| `demo` | web | `https://web-demo.oscargabriel.workers.dev` | not deployed |138| `demo` | CLI install | `https://platform-demo.oscargabriel.workers.dev/install.sh` | after the deploy and a `release --upload --stage demo` |139| `demo` | Google redirect URI (H4) | `https://platform-demo.oscargabriel.workers.dev/oauth/google/callback` | not registered |
99 unmodified lines