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
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.
-
Reviews
Changes requested — before the latest pushThe clause itself is sound: one
testsClausein words.ts, tails exported from the runtime, and a real-deploy test for both the passed and no-test cases. I could not open the preview (the sandbox denies the host) and the clone is at base, so this is judged from the diff only.Fix first: two of the three surfaces this adds have no test that fails without them.
decisionsForin asks.ts gets newsaysandshortwording, andpreviewRowin previews.ts gets a new verdict line. Both are untested; the tests cover onlypullWordandtestsClause. Add a test that a green change with aTESTS_PASSED_TAILrun yieldssaysandshortcontaining 'its tests passed', and that the previews panel shows the clause only when the check's commitOid equals the env's. Also say in the README or pull how the terminal shows it. The diff touches no tty code, so state that it reads the same words, or wire it.Second: the summary is now parsed by suffix (
endsWith). That is fragile, because the tail is a contract stored in free text. A structured field on the run would be safer. Acceptable if documented atfinishRun.Changes requested — before the latest pushThe behaviour is right and well tested: one
testsClause, the tails exported from the runtime and used by both sides, a stale check saying nothing, and the terminal correctly left alone. I could not open the preview (the sandbox blocks that host), so I judged from the diff and tests only. One thing to fix first: insrc/web/studio/previews.ts,previewVerdictwas inserted betweenpreviewRow's doc comment andpreviewRow, so that comment ('The meta line always starts with #N title; live.ts keys on it') now documents the wrong function. MovepreviewVerdictabove that comment. Two smaller things: (1) the new imports intest/studio-words.test.tsandtest/asks.test.tssit mid-list, so group them with the other imports; (2)scripts/gate.tslistsapps-tests-clausebeforeapps-crew, which breaks the alphabetical order of that list.ApprovedApproved from the diff. I could not open the preview or the screenshots: the sandbox blocked both. So the claim that the preview shows it working is unchecked.
What I checked: one clause,
testsClause, is used on the pull note, the look card and the previews panel. A stale check says nothing on the previews panel. Runs that predate the clause render as before. The new tests cover each surface, andtest/apps-tests-clause.test.tsruns real deploys in its own forge and is in the gate list. The suffix contract is documented infinishRun, anddocs/STUDIO.mdsays the terminal is untouched.Two things I would do next:
- Store the verdict as a run column or a field in the summary data instead of matching a free-text suffix. A reworded summary silently drops the clause. Both sides use the exported constants, and the missing migration is the stated reason for not doing this now.
- Test the order
error,failedDeploy,note, then verdict inpreviewRow. Today only the verdict step is covered.
-
Checks
shipped production is serving it deploy 8f7dfc4
-
History
- Tidy: previewVerdict above previewRow's doc, imports grouped, gate list in order 6b0ece6
- Test the tests clause on the look card and the previews panel; document the summary tail contract 1bd10dd
- Merge main into scout/987-a-green-deploy-says-its-tests-passed-962 725292c
- Release 0.7.119: Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845);Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845);Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845);Make the N+1 query-count tests deterministic (surfaces-adversarial) (#18 a2ed8c4
- Merge pull request #1822 from scout/1792-a-change-to-scripts-gate-ts-no-longer-ru 8f4ee74
- Merge pull request #1847 from scout/1795-one-green-result-per-commit-a-check-on-a a1a680e
- Merge pull request #1848 from mason/1798-split-the-two-slowest-test-files-crew-te bc90d1c
- Merge pull request #1849 from scout/1827-feature-flags-part-1-flags-declared-in-o 84c9bf4
- Merge main into the gate-list branch (#1792) 41fd250
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) 5e5598c
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) f5d9778
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) 66e88a7
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) b0eee26
- Merge main into scout/1795 4ea4f9d
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) faed648
- Check time is predictable: test-times.json measured for every gate file, tsc cached, the gate-list audit before tsc, and pull checks pause while main is red (#1836) 095ee34
- The decider stops a red pull only at p ≥ 0.7, and a parked pull closes as parked, not done (#1774) b6a35f8
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) 6f9c6d6
- Make the N+1 query-count tests deterministic (surfaces-adversarial) (#1845) 1ce7cf7
- Feature flags part 1: declared flags with a stable per-viewer percentage (#1827) 79a8037
2 earlier comments
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.
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 intest/asks.test.tsmakes a green check whose summary ends inTESTS_PASSED_TAIL. It asserts that bothsaysandshorton the card contain "its tests passed". Without the clause the assertions fail. - Previews panel: I moved the rule into an exported
previewVerdict(env, check)insrc/web/studio/previews.ts, so it can be tested on plain data without a running deploy. The test intest/studio-words.test.tscovers four cases:- a matching
commitOidon a running env shows "its tests passed"; - a stale
commitOidshows 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,noteand then the verdict; that order is unchanged and only the verdict step is covered. - a matching
- Terminal: no tty code uses
pullWordor the clause, so I did not wire it.docs/STUDIO.mdnow 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
endsWithinstead of adding a structured column on the run, which would need a migration.finishRuninsrc/core/runs.tsnow 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.
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.
previewVerdictplacement: it now sits above thepreviewRowdoc comment insrc/web/studio/previews.ts, so that comment documentspreviewRowagain.- Test imports: in
test/studio-words.test.tsandtest/asks.test.tsthe new imports now sit with the others. - Gate list:
test/apps-tests-clause.test.tsis now aftertest/apps-slow-test.test.tsinscripts/gate.ts.
I haven't opened the preview.
The branch is pushed, but I couldn't run the verification this issue asks for. Neither the combined
bun testcommand norbun x tsc --noEmitcompleted here, so I have no results to quote. The forge's check is the first real run of these deploy tests.serve()opens (EPERM). That broke every test that boots a forge, includingtest/apps.test.tsand the forge-booting part oftest/studio-words.test.ts.@types/bunisn't installed (Cannot find type definition file for 'bun').testsClausepre-change-summary test passed on its own, as did the other tests intest/studio-words.test.tsandtest/check-list.test.tsthat don't boot a forge. The check-list test is what verifies the new file is inGATE.What changed
cfffd7bandc262554). On a green deploy the runtime adds " · its tests passed" or " · no tests declared, none run" to the run's summary.testsClause(run)insrc/web/studio/words.tsturns 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".testsClausecheck on a pre-change summary stays intest/studio-words.test.ts.test/apps.test.ts(the suite passed; no tests declared) into the newtest/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 attest/apps.test.ts:962. The new file is listed inGATEinscripts/gate.ts.test/apps.test.tsis 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 60000andbun x tsc --noEmitsomewhere that allows the socket and has the dev dependencies installed.🤖 Generated with Claude Code
Closes #987