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

A green deploy says its tests passed: #962's testsClause lands, with its deploy tests in their own file #1162

opened this

Merged 48d 6h ago, live in production

The branch is pushed, but I couldn't run the verification this issue asks for. Neither the combined bun test command nor bun x tsc --noEmit completed here, so I have no results to quote. The forge's check is the first real run of these deploy tests.

Notes

opened this

The branch is pushed, but I couldn't run the verification this issue asks for. Neither the combined bun test command nor bun x tsc --noEmit completed here, so I have no results to quote. The forge's check is the first real run of these deploy tests.

  • Why the tests didn't run: the sandbox refuses to listen on the unix socket that serve() opens (EPERM). That broke every test that boots a forge, including test/apps.test.ts and the forge-booting part of test/studio-words.test.ts.
  • Why tsc didn't run: @types/bun isn't installed (Cannot find type definition file for 'bun').
  • What I did see: the testsClause pre-change-summary test passed on its own, as did the other tests in test/studio-words.test.ts and test/check-list.test.ts that don't boot a forge. The check-list test is what verifies the new file is in GATE.

What changed

  • #962's design is back on today's main (cherry-picked cfffd7b and c262554). On a green deploy the runtime adds " · its tests passed" or " · no tests declared, none run" to the run's summary.
    • testsClause(run) in src/web/studio/words.ts turns that into the note read by the decide card, the home's asks and the Previews row. A deploy from before the change keeps the plain "green — ready for a look".
    • The testsClause check on a pre-change summary stays in test/studio-words.test.ts.
  • The two deploy tests moved out of test/apps.test.ts (the suite passed; no tests declared) into the new test/apps-tests-clause.test.ts. It has its own forge, data directory and one app, so its previews can't leak into the asleep-preview count at test/apps.test.ts:962. The new file is listed in GATE in scripts/gate.ts. test/apps.test.ts is identical to main.

Left out: no pass count, because it would need a new column.

To try it: run bun test test/apps.test.ts test/apps-tests-clause.test.ts test/studio-words.test.ts --timeout 60000 and bun x tsc --noEmit somewhere that allows the socket and has the dev dependencies installed.

🤖 Generated with Claude Code

Closes #987

2 earlier comments
commented

I merged main into this branch and pushed. The type check is clean, and the three suites I ran (apps-tests-clause, apps-slow-test and apps-new) pass, 28 tests in all. I didn't run the whole suite, since the forge's check does that on push.

scripts/gate.ts was the only conflict. Both sides had added test files to the gate list, so I kept all of them. They are this pull's test/apps-tests-clause.test.ts and main's apps-crew, apps-identity, apps-new and apps-slow-test.

The merge was otherwise automatic: runtime.ts, asks.ts, previews.ts and words.ts merged without conflicts, and I didn't open them to check the result by eye.

Nothing else changed. A green deploy still reports what its tests did, using the single clause from words.ts on every surface.

commented

Both untested surfaces now have tests, and I documented the suffix contract and the terminal. Type check is clean, and asks, studio-words and apps-tests-clause pass (15 tests). I didn't run the whole suite.

  • Look card (decisionsFor): a new test in test/asks.test.ts makes a green check whose summary ends in TESTS_PASSED_TAIL. It asserts that both says and short on the card contain "its tests passed". Without the clause the assertions fail.
  • Previews panel: I moved the rule into an exported previewVerdict(env, check) in src/web/studio/previews.ts, so it can be tested on plain data without a running deploy. The test in test/studio-words.test.ts covers four cases:
    • a matching commitOid on a running env shows "its tests passed";
    • a stale commitOid shows nothing;
    • an env that isn't running shows nothing;
    • a failed check, a missing check or a missing env shows nothing.

    I did not add a test for the order of error, failedDeploy, note and then the verdict; that order is unchanged and only the verdict step is covered.

  • Terminal: no tty code uses pullWord or the clause, so I did not wire it. docs/STUDIO.md now says the clause appears on the pull's note, the look card and the previews panel, and not in the terminal.
  • Suffix parsing: I kept endsWith instead of adding a structured column on the run, which would need a migration. finishRun in src/core/runs.ts now documents the contract. Both sides use the exported tail constants, and an older run with neither tail simply says nothing. If you want the column, that is a follow-up.

I haven't opened the preview.

commented

I made all three fixes and pushed. The type check is clean, and asks and studio-words pass (13 tests). I didn't run the whole suite.

  • previewVerdict placement: it now sits above the previewRow doc comment in src/web/studio/previews.ts, so that comment documents previewRow again.
  • Test imports: in test/studio-words.test.ts and test/asks.test.ts the new imports now sit with the others.
  • Gate list: test/apps-tests-clause.test.ts is now after test/apps-slow-test.test.ts in scripts/gate.ts.

I haven't opened the preview.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs