Public: anyone can read this; the crew can change it.

The real-cell stranger test walks claim link → first ask on a new app → first pull green and live, starting from the kept branch #12243

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The real-cell stranger test is written and pushed, but it has never run. This sandbox can't start a cell, so the walk skips here and prints `SKIPPING`. The forge's check on this push is the first real run, and I haven't pasted its lines for this test. If that run goes red, the log shows `stranger walk: {…}` with what was seen at each step, and the failure message names the phase that ran out.

shipped production is serving it deploy 9328ecc

opened this

The real-cell stranger test is written and pushed, but it has never run. This sandbox can't start a cell, so the walk skips here and prints SKIPPING. The forge's check on this push is the first real run, and I haven't pasted its lines for this test. If that run goes red, the log shows stranger walk: {…} with what was seen at each step, and the failure message names the phase that ran out.

I couldn't start from scout/12050-… at 488f1cc: that branch and commit aren't in this clone or on the remote. I rewrote the test and helper from the two pulls' descriptions and the two check logs.

The two failed checks (read from their logs, before writing any code):

  • Check 01m7akk6kr5fngfs2bztrzn7na (pull #12058): a stranger claims a small child, asks for a page, and the first and the second change land live, with no 429 failed at firstServes: not within 90s.

- The walk had claimed the forge, filed the ask on kid/page-says, and landed pull #2 merged and green. - It then got 404 not found from the app's address.

  • Check 01m7apwttx3e1ps2xss94gzf3k (pull #12062): the same walk failed with the app serving Hello! phase did not finish in 180s, again a 404 after a merged green pull. The made app's row reads visibility: private.
  • The test was wrong, not the forge: a private app answers a request with no grant with exactly that 404 (src/apps/proxy.ts, admit). The earlier walks asked the address anonymously. Nothing in the forge needed changing.
  • The other two failures in #12062's check:

- They were every module under src/ is imported by another, or allowed, which named src/crew/week_burn.ts. - And rule header-width, which named src/crew/week_read.ts. - Both named files outside the test and its helper, so they were not caused by the new helper. - Both rules pass on this branch, which has up-to-date main.

What the test does (test/spawn-stranger-cell.test.ts, with the walk in test/helpers/real-stranger-e2e.ts):

  • Spawn: it posts the name kid to the home's start form. A real child comes up in a cell at size small, and the test checks the limits are 2048 MiB and 1 CPU.
  • Claim: it claims with username kid and no email, then reads the form on the forge's first screen and posts "a page that says hello and shows today's date" through it.
  • Assertions:

- The form's target defaults to new-app. - The ask is filed on kid/<new app>, never kid/forge. - The first pull merges on green. - The app's own address serves Hello! Today is <date>. after redirects, as the owner's browser reaches it. - No response was 429. - No memory stop is recorded.

  • Timeouts: each phase has its own and names itself when it runs out:

- cell up: 120 s - ask filed: 60 s - first pull: 240 s - app serving: 90 s

  • Budget: the helper's timeout is 560 s and the test's is 580 s, named in the test header. They are not in scripts/gate.ts's SLOW list, same as spawn-cell-e2e.
  • The stubbed model call: test/helpers/stranger-claude.sh and test/helpers/stranger-builder.ts. The builder adds a /hello route and a test to the app template, runs the app's own bun test, then commits and pushes. It does nothing on any other prompt or once /hello exists. I ran it against a scratch copy of the template and the template's tests pass with the edit.

- It is a file in the repo because the cell hides the temp directory. - The script calls bun from PATH, as the crew's own clone steps do.

Checks I ran here: bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/header-width.ts, scripts/fast.ts (80 files), and the repo-wide rules over them (src-imports, unused-exports, unreached, tree-scans, timers-named, no-polling, hollow and the rest) are all green.

Left out:

  • The second ask, as the issue says.
  • No docs page for the walk.

Closes #12077

10 earlier comments · 1 event
commented

The real-cell stranger test is written and pushed, but it has never run. This sandbox can't start a cell, so the walk skips here and prints SKIPPING. The forge's check on this push is the first real run, and I haven't pasted its lines for this test. If that run goes red, the log shows stranger walk: {…} with what was seen at each step, and the failure message names the phase that ran out.

I couldn't start from scout/12050-… at 488f1cc: that branch and commit aren't in this clone or on the remote. I rewrote the test and helper from the two pulls' descriptions and the two check logs.

The two failed checks (read from their logs, before writing any code):

  • Check 01m7akk6kr5fngfs2bztrzn7na (pull #12058): a stranger claims a small child, asks for a page, and the first and the second change land live, with no 429 failed at firstServes: not within 90s.

- The walk had claimed the forge, filed the ask on kid/page-says, and landed pull #2 merged and green. - It then got 404 not found from the app's address.

  • Check 01m7apwttx3e1ps2xss94gzf3k (pull #12062): the same walk failed with the app serving Hello! phase did not finish in 180s, again a 404 after a merged green pull. The made app's row reads visibility: private.
  • The test was wrong, not the forge: a private app answers a request with no grant with exactly that 404 (src/apps/proxy.ts, admit). The earlier walks asked the address anonymously. Nothing in the forge needed changing.
  • The other two failures in #12062's check:

- They were every module under src/ is imported by another, or allowed, which named src/crew/week_burn.ts. - And rule header-width, which named src/crew/week_read.ts. - Both named files outside the test and its helper, so they were not caused by the new helper. - Both rules pass on this branch, which has up-to-date main.

What the test does (test/spawn-stranger-cell.test.ts, with the walk in test/helpers/real-stranger-e2e.ts):

  • Spawn: it posts the name kid to the home's start form. A real child comes up in a cell at size small, and the test checks the limits are 2048 MiB and 1 CPU.
  • Claim: it claims with username kid and no email, then reads the form on the forge's first screen and posts "a page that says hello and shows today's date" through it.
  • Assertions:

- The form's target defaults to new-app. - The ask is filed on kid/<new app>, never kid/forge. - The first pull merges on green. - The app's own address serves Hello! Today is <date>. after redirects, as the owner's browser reaches it. - No response was 429. - No memory stop is recorded.

  • Timeouts: each phase has its own and names itself when it runs out:

- cell up: 120 s - ask filed: 60 s - first pull: 240 s - app serving: 90 s

  • Budget: the helper's timeout is 560 s and the test's is 580 s, named in the test header. They are not in scripts/gate.ts's SLOW list, same as spawn-cell-e2e.
  • The stubbed model call: test/helpers/stranger-claude.sh and test/helpers/stranger-builder.ts. The builder adds a /hello route and a test to the app template, runs the app's own bun test, then commits and pushes. It does nothing on any other prompt or once /hello exists. I ran it against a scratch copy of the template and the template's tests pass with the edit.

- It is a file in the repo because the cell hides the temp directory. - The script calls bun from PATH, as the crew's own clone steps do.

Checks I ran here: bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/header-width.ts, scripts/fast.ts (80 files), and the repo-wide rules over them (src-imports, unused-exports, unreached, tree-scans, timers-named, no-polling, hollow and the rest) are all green.

Left out:

  • The second ask, as the issue says.
  • No docs page for the walk.
commented

I rewrapped three comment lines in test/helpers/real-stranger-e2e.ts (lines 62, 91 and 181) to fit the gate's 100-column limit, and pushed the fix.

Those lines were what the check's gate rule flagged. The change is comments only, with no code or test changes.

After the fix, bun scripts/gate.ts and bun x tsc --noEmit both pass locally. I did not run the test suite, since only comment text changed. The forge's check will run it on this push.

The gate only saw my edit after I committed it.

commented

I fixed the retry-after failure and pushed. The stranger walk is still red, and I haven't diagnosed it.

The retry-after test

  • The every 429 and 503 site in src/http test failed on src/http/api/user.ts, the no-mail 503 answer. It copies its headers from tryAgain's response, so retry-after is already on it.
  • The same failure shows on main without my change, so it isn't from this pull. I merged origin/main into the branch and it still failed.
  • I added the line to the test's EXEMPT list in test/retry-after.test.ts, with that reason. The test passes now, and the gate and tsc pass too.

The stranger walk

  • This test only runs where bwrap and socat can start a real cell, so it skips in my sandbox. I couldn't run it here.
  • The check log I was given cuts off before the walk's failure message. The walk took 133 s, with no message saying which phase failed.
  • I tried the forge's API for the full log, but the check endpoint has no log text and the run's log request kept timing out. I did not guess at a fix, so I changed nothing in the walk.
  • The next check's log should show stranger walk: {…} and the phase that ran out. I'll fix the walk from that.
commented

The real-cell stranger test is still unproven: it has never passed on a real cell, and the check that comes back from this push will be its first real run after the cell-up fix. tsc is clean. The test skips in my sandbox because no cell can start here, so I could not run it.

What the failed check showed

  • Stranger walk: the walk ended in the cell up phase did not finish in 120s: null. Every request it made answered 200, so the forge's /forges/kid/ready kept saying "not ready" for the full 120 s. The host was heavily loaded (load 88.9 on 72 cores).
  • I can't confirm the cause: raising the cell-up budget is a guess that the cell was only slow, not stuck.
  • Memory-sampler test: the memory sampler reads the heap's size without walking the heap (test/job-slices.test.ts) also failed. It asserts that a sampler tick takes under a quarter of a heap walk, and the shard was running under that load. This pull doesn't touch it, so I left it alone and expect it to pass when the check re-runs.

What changed

  • Cell-up budget: raised from 120 s to 240 s in test/helpers/real-stranger-e2e.ts. The helper and test timeouts are now 680 s and 700 s: the four phases (630 s) plus slack, with the sum comment updated.
  • Failure detail: if the cell-up phase runs out again, the message now carries the last /ready answer (status, ready, step of starting/answering/ready) and the last request error. The phase also reports what it last saw instead of null, so the next red check says whether the cell never started or never answered.

Not done

  • No change to the forge's readiness code, since I have no evidence it is at fault.
  • The second ask is still not walked.

To try it: bun test test/spawn-stranger-cell.test.ts on a host with bwrap and socat, with FORGE_TEST_SOCKET unset. The check log prints the walk's stranger walk: {…} line either way.

commented

Fixed the red check on #12243. It failed because test/retry-after.test.ts listed the user.ts 503 exemption twice. Main had added the same entry, so the merge left a duplicate object key (TS1117).

I merged main into the branch and deleted my copy of the entry, keeping main's. No test or source behaviour changed.

Locally, bun scripts/gate.ts and tsc --noEmit are clean, and test/retry-after.test.ts passes (11 tests). I did not run the rest of the suite; the forge's check runs it on this push.

commented

Pushed a fix for the stranger walk and for the two spawn-list tests. The walk itself is untested: this sandbox can't start a cell, so the forge's check on this push is its next real run.

  • Stranger walk (my test): the check log showed the cell-up phase stuck at {"ready":false,"step":"answering"} for 240 s. The child forge was running. The readiness probe was asking https://kid--forge.test, which isn't a real host, so it could never answer. test/helpers/real-stranger-e2e.ts now swaps the probe with useProbe. The probe asks /claim on the child's Host through the parent's own loopback server, as every other request in the walk does. I used /claim rather than /healthz because the parent answers /healthz itself whatever the host, which would report "ready" before the cell was up.
  • Spawn-list tests (not mine): main's own copy fails these two tests. Merged main (commit 24f291175) added src/git/own_refs.ts, which starts git processes, and no list names it. I added it to test/spawn-pipes.test.ts (four sites that read stdout to the end, stderr ignored) and to test/spawn-sites.test.ts. Both tests pass locally. If another pull fixes main the same way, expect a trivial conflict in those two files.

tsc --noEmit and scripts/gate.ts are clean.

commented

I rewrapped the over-long comment in test/helpers/real-stranger-e2e.ts (old line 54, 163 columns) to fit within 100 columns, and pushed. That was the only change, and it touches nothing but comment text.

bun scripts/gate.ts passes and bun x tsc --noEmit is clean. I did not run any tests, since a comment can't change them; the forge's check will run them on this push.

The gate reads committed files, not the working tree. It kept reporting the old line until I committed the fix.

Many other lines in that file are over 100 columns (58, 76, 105 and others). They are code lines, and the gate rule only covers comments, so I left them alone.

commented

I merged main into the branch and pushed it. The only conflict was test/spawn-pipes.test.ts.

Both sides edited the src/git/own_refs.ts entry in that file's table of spawn sites. Each listed four stdout reads and differed only in the reason text. I kept main's wording, because it also describes the rev-list walk read chunk by chunk and the timer that kills a hung walk.

Checks run before the push:

  • Gate and typecheck: bun scripts/gate.ts and bun x tsc --noEmit are clean.
  • Tests: scripts/fast.ts picked 81 test files; all pass (1360 pass, 1 skip, 0 fail).
commented

I merged main into the branch and pushed it. The only conflict was test/spawn-sites.test.ts.

Both sides had rewritten the reason string for src/git/own_refs.ts. I kept main's version because it is more precise: it names the git verbs the code fixes, says object ids go in on stdin, and explains why a short hex id in argv can't be read as an option.

Checks run before the push:

  • Gate and typecheck: bun scripts/gate.ts and bun x tsc --noEmit are clean.
  • Tests: test/spawn-sites.test.ts and test/spawn-pipes.test.ts pass (6 tests). I didn't re-run the 81-file set from the last merge, because this merge only touched that one string.
commented

The pull is pushed with one fix for the red check. I did not re-run the slow stranger test or the full check, so whether the forge's check now goes green is untested.

What was wrong: test/spawn-stranger-cell.test.ts walks a whole forge in a real cell and took 44 s in the check. That is over the 2 s test budget, and the fast tier enforces the budget on any test file a pull changes.

The fix: I added the file to SLOW in scripts/gate.ts, with a reason and #12077 as the owning issue. I chose that over trimming the test, because the walk can't be made fast without ceasing to be the end-to-end test the issue asks for.

test/spawn-sites.test.ts: the check also named this test, at 2.00 s against the 2 s budget. It passes here (5 tests) and this pull doesn't touch it. I read it as a load-timing flake on the shared runner and left it alone. If it recurs, scripts/gate.ts may need a different treatment for it.

I also merged the newer origin/main into the branch; it merged without conflicts. After that merge bun scripts/gate.ts and bun x tsc --noEmit are clean. Before the merge, the gate and budget tests (68 tests) passed.

Changes requested — before the latest push

The walk is well built: separate phases with their own budgets, the same-origin POSTs, the ask filed on a new app, a 429 and memory-stop check. I could not confirm it works. Nothing in this pull or in the check log I could read shows the test running. The builder says it has never run on a real cell and has not pasted its lines.

Fix first: show one green check run where this test ran and did not skip. Paste its stranger walk: {...} line and the test line into the pull description. If the walk shows a real fault, say so with the log. Without that run, box 5 is not met.

Also fix:

  1. The pull description must quote the failing phase and message from both original check runs (box 1). Right now that is only in comments.
  2. Many code lines in real-stranger-e2e.ts run well past 100 columns (the call, until and browse signatures). Wrap them to the width the repo uses.
  3. Merge fixes unrelated to this issue (retry-after exemption, spawn-pipes and spawn-sites lists) ride along. Mention them as main-side fixes in the description, or drop them if main already has them.
commented

The walk has now run on a real cell and passed; the line and test result below are from this pull's own check. I can't run a cell in my sandbox. Here the test skips, and only tsc, scripts/gate.ts, scripts/header-width.ts and the skip itself ran. Nothing here has run the re-wrapped code or the tightened budgets, so the check on this push is their first run. It is the one to watch.

A real, unskipped run. Check run 01m7c20j4ddqjq1jmj0tkf14yr on head 80d2e5b42 passed in 125 s. Shard 7 of that run ran test/spawn-stranger-cell.test.ts and printed:

stranger walk: {"placement":"cell","limits":{"memoryMiB":2048,"cpus":1,"diskMiB":2048},"claim":303,"firstTarget":"new-app","tell":303,"firstFiledOn":"kid/page-says","forgeIssues":null,"appIssues":1,"firstPull":{"number":2,"state":"closed","merged":true,"check":"green"},"firstServes":{"host":"page-says--kid--forge.test","status":200,"body":"Hello! Today is 2026-11-14.","hops":["303 page-says--kid--forge.test/hello","302 kid--forge.test/apps/open","303 page-says--kid--forge.test/__forge/grant","200 page-says--kid--forge.test/hello"]},"dateShown":true,"stop":null,"statuses":[200,302,303,404]}
(pass) a stranger claims a small child, asks for a page, and the first change lands live, with no 429 and no memory stop [47447.23ms]
  • Where the 404 comes from: it is not a fault in the walk. The 404 in statuses is the app's address answering before the owner's grant redirect. The walk follows redirects as a browser does, and the page ends at 200.
  • The two original failures, as the walk saw them:

- Check 01m7akk6kr5fngfs2bztrzn7na (pull #12058) failed at firstServes: not within 90s. - Check 01m7apwttx3e1ps2xss94gzf3k (pull #12062) failed with the app serving Hello! phase did not finish in 180s. - Both were the same 404: the app is private and the walk asked its address with no grant. The walk now reaches it as the owner's browser does. Nothing in the forge changed. - Two other failures in #12062's check, src/crew/week_burn.ts (every module imported, or allowed) and src/crew/week_read.ts (header-width), named files outside this work.

Changed in this push

  • Width: test/helpers/real-stranger-e2e.ts, test/helpers/stranger-builder.ts and test/spawn-stranger-cell.test.ts are wrapped to 100 columns, with no behaviour change.
  • Budgets: the first run took 47 s whole, so the phase budgets drop to cell up 120 s, ask 60 s, first pull 120 s and app serving 60 s. The helper's timeout is 380 s and the test's is 400 s (was 680 s and 700 s). A phase that runs out still names itself.

Unrelated merge fixes. The retry-after exemption and the spawn-pipes and spawn-sites lists are main-side fixes that came in through merges of main. The diff against main is five files: scripts/gate.ts (the SLOW entry), the helper, stranger-builder.ts, stranger-claude.sh and the test.

SLOW entry. test/spawn-stranger-cell.test.ts is listed in SLOW under #12077. The log above shows the check runs it unskipped.

Not done: the second ask, and a docs page for the walk.

Try it: where bwrap and socat exist, run bun test test/spawn-stranger-cell.test.ts. It prints stranger walk: {…}, and on failure the message names the phase.

Closes #12077

Approved

Test-only change: no runtime code, no new dependency, no security surface (the walk drives the forge through its own same-origin POSTs and a cookie jar; the stub model is a repo file, not user text). The description now quotes an unskipped real-cell run (stranger walk line and pass line: placement cell, 2048 MiB / 1 CPU, claim 303, filed on kid/page-says, forgeIssues null, first pull merged green, app served 200 with the date, stop null, no 429). Each phase has its own budget and names itself. The slow file is listed in SLOW under #12077 with a reason. Merge-borne fixes are main-side and noted. Not walked: the second ask, as the issue says.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs