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

The real-cell proof walks the stranger's path: claim link, first ask makes a new app, green lands live, second change lands #12058

Parked opened this
Closed without merging

This adds the stranger's-path test, but I couldn't run it here, so its green/red outcome is unknown until the forge's check does. This sandbox has no bwrap, socat or unix sockets, so the real-cell walk skips and prints SKIPPING.

Notes

stopped parked by the crew deploy fb2270c

opened this

This adds the stranger's-path test, but I couldn't run it here, so its green/red outcome is unknown until the forge's check does. This sandbox has no bwrap, socat or unix sockets, so the real-cell walk skips and prints SKIPPING. The check's log has the run: its stranger walk: {…} line holds what was seen at each step, or the step that failed.

What changed

  • test/spawn-stranger-cell.test.ts is the new test, with the walk in test/helpers/real-stranger-e2e.ts. It spawns a child at size small (1 CPU, 2 GiB) into a real cell for a stranger, then follows the path a person takes:
    • It opens the claim link and claims it with the forge's own name as username, a password and no email.
    • It reads the form the home shows and asks through it for "a page that says hello and shows today's date".
    • It asserts the form's default target is new-app and the ask is filed on kid/<new app>, never kid/forge.
    • It asserts the first pull lands on green and the app's own address serves /hello with today's UTC date.
    • It asks again through the same form, and asserts that pull lands too and the page now says "hello and good morning".
    • It fails on any 429 at any step or any recorded memory stop (lastStop).
  • The model is the only stand-in, and everything else (cell, crew, check, merge, deploy) is real:
    • stranger-builder.ts applies a fixed edit (a /hello route plus its test, then a changed sentence) and runs the app's own bun test before pushing. For the reviewer prompt it approves.
    • stranger-standin.ts writes both under the child's own directory, the one place its cell shows. FORGE_CLAUDE (#12001) points the child's crew at it.
    • The test needs no credit.
  • test/stranger-standin.test.ts runs the stand-in's edits against the template with no cell, and does run here. It checks that the first and second edits pass the app's tests and are pushed, that an unknown prompt is declined, and that a red edit is not pushed.
  • docs/features/real-cell-proof.md has a new section for this.

Checks run bun scripts/gate.ts, bun x tsc --noEmit and the 80 test files scripts/fast.ts named all pass. Those include the new stand-in test; the cell test counts as the one skip.

Choices and risks

  • The new page is /hello, added beside the template's routes, not a change to its /, so the template's own tests stay as they are.
  • The per-file budget is stated in the file header: the phases add up to 17 minutes at the worst (spawn 2, up 1.5, each ask 5 + 1.5), and a normal walk should take a few minutes.
  • The home form's default target is new-app only if the child has its <org>/forge copy, so the walk creates alice/forge on the parent and sets forgeRepo to it.
  • The stub assumes the crew's run sandbox can read the stand-in under the child's directory, and I could not confirm that here.

To try it

  • Run bun test test/spawn-stranger-cell.test.ts on a machine with bwrap and socat, without FORGE_TEST_SOCKET.
  • Once the check's stranger walk: line is pasted below, running the same journey on production is for a person, as the issue says.

Closes #12050

3 earlier comments
commented

This adds the stranger's-path test, but I couldn't run it here, so its green/red outcome is unknown until the forge's check does. This sandbox has no bwrap, socat or unix sockets, so the real-cell walk skips and prints SKIPPING. The check's log has the run: its stranger walk: {…} line holds what was seen at each step, or the step that failed.

What changed

  • test/spawn-stranger-cell.test.ts is the new test, with the walk in test/helpers/real-stranger-e2e.ts. It spawns a child at size small (1 CPU, 2 GiB) into a real cell for a stranger, then follows the path a person takes:
    • It opens the claim link and claims it with the forge's own name as username, a password and no email.
    • It reads the form the home shows and asks through it for "a page that says hello and shows today's date".
    • It asserts the form's default target is new-app and the ask is filed on kid/<new app>, never kid/forge.
    • It asserts the first pull lands on green and the app's own address serves /hello with today's UTC date.
    • It asks again through the same form, and asserts that pull lands too and the page now says "hello and good morning".
    • It fails on any 429 at any step or any recorded memory stop (lastStop).
  • The model is the only stand-in, and everything else (cell, crew, check, merge, deploy) is real:
    • stranger-builder.ts applies a fixed edit (a /hello route plus its test, then a changed sentence) and runs the app's own bun test before pushing. For the reviewer prompt it approves.
    • stranger-standin.ts writes both under the child's own directory, the one place its cell shows. FORGE_CLAUDE (#12001) points the child's crew at it.
    • The test needs no credit.
  • test/stranger-standin.test.ts runs the stand-in's edits against the template with no cell, and does run here. It checks that the first and second edits pass the app's tests and are pushed, that an unknown prompt is declined, and that a red edit is not pushed.
  • docs/features/real-cell-proof.md has a new section for this.

Checks run bun scripts/gate.ts, bun x tsc --noEmit and the 80 test files scripts/fast.ts named all pass. Those include the new stand-in test; the cell test counts as the one skip.

Choices and risks

  • The new page is /hello, added beside the template's routes, not a change to its /, so the template's own tests stay as they are.
  • The per-file budget is stated in the file header: the phases add up to 17 minutes at the worst (spawn 2, up 1.5, each ask 5 + 1.5), and a normal walk should take a few minutes.
  • The home form's default target is new-app only if the child has its <org>/forge copy, so the walk creates alice/forge on the parent and sets forgeRepo to it.
  • The stub assumes the crew's run sandbox can read the stand-in under the child's directory, and I could not confirm that here.

To try it

  • Run bun test test/spawn-stranger-cell.test.ts on a machine with bwrap and socat, without FORGE_TEST_SOCKET.
  • Once the check's stranger walk: line is pasted below, running the same journey on production is for a person, as the issue says.
commented

The pull now carries the stranger's-path test, with the gate failure fixed and bun scripts/gate.ts, bun x tsc --noEmit and the two new test files passing here. The real-cell walk itself skips in this sandbox (no bwrap, socat or unix sockets), so its first run is the forge's check on this push. The stranger walk: {…} line in that log is the run to paste into the pull.

The red verdict was the check, not the preview deploy. The deploy's "no tests declared" note is only informational. The check failed the gate rule "a comment line is wrapped at 100 columns" on test/stranger-standin.test.ts:84. I rewrapped that comment and the other overlong ones in test/helpers/real-stranger-e2e.ts. No code changed. The gate reads committed files, not the working tree, which is why my earlier local run missed it.

The first push also missed that main moved. #12055 now makes a new app's second change wait for the reviewer, and the stand-in's approval handles that, but the cell walk has not been run against it.

What the pull does, what I chose not to do, and how to try it are as in the earlier description:

  • What it does: it adds the walk, the model stand-in, and the cell-free stand-in test.
  • What I left out: the /hello page is a new route, not a change to the template's /.
  • How to try it: bun test test/spawn-stranger-cell.test.ts on a machine with bwrap and socat.
commented

I think the failing walk ran out of its 120 s spawn-and-boot budget on the loaded check machine, but I couldn't confirm that here. I raised the budgets and pushed; I haven't seen the walk pass.

The walk failed after 121.9 s, which matches that 120 s limit. The log tail didn't include the walk's own error line, and this sandbox can't run the cell test, so the cause is an inference from the timing. The cell walk is skipped in this sandbox, so only the stand-in test, the gate and tsc ran, and they pass.

  • Budgets: in test/helpers/real-stranger-e2e.ts the spawn phase goes from 120 s to 300 s and the "up" phase (claim page reachable) from 90 s to 180 s. The two ask phases are unchanged.
  • Test timeout: WORST_MS in test/spawn-stranger-cell.test.ts goes from 17 to 21 minutes, matching the new sum. The test's header comment and docs/features/real-cell-proof.md carry the same 21-minute figure.
  • Not done: I changed no assertions, and no product code. If the check fails again, its log will name the phase that timed out, and that is where to look next.

To try it, run bun test test/spawn-stranger-cell.test.ts on a machine with bwrap and socat. The last line of its output starts stranger walk: and is the run to paste.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs