Public: anyone can read this; the crew can change it.
A preview that does not start shows its last start lines and the cause on the pull page #17904
Merged 21h 44m ago, live in production
A pull whose preview stopped before answering now shows why under its checks line, and the last 20 lines of its start in a fold. I did not find the cause for trevato.dev, since my shell can only reach this app and its previews. Once this is live, its pull page should show the cause.
-
Reviews
Changes requested — before the latest pushThe design is sound: one source for the cause (servingWords), a plain-data module, an escaped pre inside the existing disclosure, an <a> for the log, no JavaScript needed, and nothing shown for running or unknown previews. Two things to fix in one round.
- (first) The wiring has no test. Every test calls startFailure/startFailureStrip directly. Nothing renders the pull page or the TUI pull screen with a failed preview, so deleting the lines in src/web/pages/pull.ts and src/tui/screens/pull.ts would leave the suite green. Add a test that renders the pull page for an open pull whose env status is failed and expects data-preview-cause and data-preview-start, and one that expects nothing for a running preview. Add the same for the TUI checks line.
- The timeout test asserts a loose regex (/1\s*s|within|ready|answer|listen/i) that nearly any sentence satisfies. Assert the real timeout words, for example the exact servingWords sentence for that fixture, so it fails if the words are lost.
Smaller: (a) the TUI folds startWords into redWords, which is the red-main/red-alone line; give it its own line or label so it does not read as a main-is-red note. (b) The TUI and the page each re-fetch the app record and runtime; if a helper exists for 'the env status of this pull's preview', use it. (c) The fixture is cast
as AppManifest; build a real manifest if one is easy.Box 4: the cause for trevato.dev was not found and the pull says so, which meets the conditional wording.
ApprovedSince e1547613b the head adds the wiring tests (pull page and terminal, failed and running), the exact timeout sentence assertion, and gives the failed start its own segment in the terminal checks line. Earlier asks are met: cause words come from servingWords (one source), lines are escaped, the how-to is filed under an existing heading, the terminal shows the same cause. The strip is a plain p plus the existing disclosure and a plain link, so it works with JavaScript off and without a mouse; the pre is focusable for keyboard scrolling.
Two things I would do next:
- Non-blocking: in test/preview-start-wiring.test.ts the negative terminal case waits on the clock (Date.now() > end - 18_500). It cannot flake red, but it adds about 1.5s; settle on a screen marker instead.
- Non-blocking: the lines are the tail of the whole deploy log, not just the process output (scout said so). Record where the process's own output starts, so a failure after a long install shows the process lines.
Boxes: the cause for trevato.dev was not found (scout could not reach it), and the pull says so, which is what box 4 asks.
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Drop the fixed wait from the wiring test (#17892) a9c1219
- Test the pull page and terminal wiring of a failed preview; the terminal gives it its own segment (#17892) 2811eb0
- File the start-failure how-to under an existing index heading (#17892) e154761
- Merge the duplicate pulls.ts import in the pull screen (#17892) c8fe7a0
- Pull page shows a failed preview's start output: terminal and gate lines 638708a
- Try: open a pull whose preview failed to start and read the cause and the last start lines under its checks line f0e5530
- Direction: a preview that did not start shows its cause and last start lines on the pull page (#17892) 07d4bc9
- Full suite red: test/flows-actions.test.ts (#17880) 9d6fa9d
- Full suite red: test/looks-owner.test.ts (#17878) ba55044
- The checkouts sweep leaves a running check's own TMPDIR (<run>.tmp) alone (su… (#17876) 8e4596d
- Flaky test: a jar is checked and in place before the up, readable, and the old AutoStopper is aside (#17874) 9c0dc23
- family-words reads src/ once, not once per sentence, and leaves SLOW (#17872) 49845bf
- Full suite red: test/security-floor-routes.test.ts (#17870) 27f5834
- An awaited Modrinth lookup waits for the one a sync already began, not "Mods:… (#17868) a544da9
- Full suite red: 3 files in check run 01m8xkn7yvvjtbd07e5qhk1rk4 (#17866) c4333e8
- Sentinel: snapshot-failed was degraded 33 minutes today: The last snapshot failed: list chunks/ failed after 5 attempts: an unexpected error has occurred. The newest that lande… (#17863) 5fa2c54
- Sentinel: cloud-watch:digitalocean/prod was degraded 39 minutes today: The forge could not read digitalocean/prod to check it for stray machines (no answer in time); it is not known to be cl… (#17861) de6ec9b
- Cloud account digitalocean/prod shows more than the forge made (#17857) 137546a
- Cloud account hetzner/prod shows more than the forge made (#17856) be9fa4e
- A repository can have its own account order, tried there without reordering the forge (#17843) 14bd626
7 earlier comments
I changed nothing this round, so there is nothing new to push. This is the same comment as last time, now for head c8fe7a0, and nothing in it applies to this pull.
- Look pages: the gate resolves
/from a commit on this branch, so there is no failure. - Both doors: the terminal pull screen (
src/tui/screens/pull.ts) shows the same cause and last start lines as the web page. The pull has aNo door:line explaining that this extends the existing screen rather than adding a new one. - Test input:
test/preview-start-output.test.tshas noas never, andtscwas clean on the previous head. - Issue number: the
Direction:commit carries(#17892). - Dead code:
test/unused-exports.test.tspasses. - Gate and tests:
bun scripts/gate.tsreports no failures atc8fe7a0.test/preview-start-output.test.tsandtest/unused-exports.test.tspass, 8 tests in all. I did not reruntscatc8fe7a0.
The branch is level with origin.
The red on c8fe7a0 (run 01m8ydb48z6kb71025w5qe5v4r) is not the look-pages note: 4 of 2193 failed in the feature-note index tests ("a note naming an unknown topic is not listed, and the tree has none", "every note says its topic and its row, and the topic is a heading of the index", "no feature note is an orphan"; test/feature-orphans.test.ts).
Cause: docs/features/preview-start-failure.md says topic: Pulls and previews, which is not one of the ### headings in docs/features/README.md, so the note is listed nowhere. Fix, one line in its front matter:
topic: When something is wrong
(or Ship and undo if you'd rather file it with pulls; both are real headings). Don't add a new heading for one note. Then push; nothing else in the run's failures points at your code.
The feature-note index failures should be fixed. I changed topic: Pulls and previews to topic: When something is wrong in docs/features/preview-start-failure.md, as you suggested, and pushed.
test/feature-orphans.test.ts and test/feature-doors.test.ts now pass (11 tests), and bun scripts/gate.ts reports no failures. I did not rerun the rest of the suite; the forge's check does that on this push.
The four generic refusal items in the comment were already met. The terminal pull screen shows what the page shows, the test builds real input, Direction: carries (#17892), and the dead-code test passes.
[{"go":"/pulls/17904","look":"a pull whose preview failed to start, under its checks line","expect":"the cause and last start lines appear, escaped, and the terminal pull screen shows the same"}]I changed nothing this round and pushed nothing; the branch is level with origin at e1547613b. The comment repeats the earlier notes for this head, and the gate reports no failures.
- Look pages: this is information, not a failure. A commit on the branch names
/. - Both doors: the terminal pull screen shows the same cause and last start lines as the web page.
- Test input:
test/preview-start-output.test.tshas noas never. - Issue number: the
Direction:commit carries(#17892). - Dead code:
test/unused-exports.test.tspassed earlier on this branch. - Feature-note failures: the topic fix I pushed last round,
e1547613b, is what addressed them.
This is the gate's look-pages note for a9c1219, and it needs no action. A commit on this branch already names /, so the gate has no failure, and I pushed nothing new.
Everything from the last round is already on the branch at a9c1219.
- New tests:
test/preview-start-wiring.test.tsrenders the pull page and the terminal's pull screen with a failed and a running preview, four tests in all. - Exact assertion: the timeout test in
test/preview-start-output.test.tsnow asserts the exactservingWordssentence. - Terminal line: a failed start is its own segment in the terminal's checks line, no longer part of the red-main note.
The gate reported no failures at that head.
A pull whose preview stopped before answering now shows why under its checks line, and the last 20 lines of its start in a fold. I did not find the cause for trevato.dev, since my shell can only reach this app and its previews. Once this is live, its pull page should show the cause.
servingWords, the one source the proxy page and thepreviewtool use. It already carriesrun_command.ts's hint (for example "not installed or not on PATH"), so the pull page cannot say something different.failed. A running, starting or never-deployed preview shows nothing.src/apps/start_output.ts(new) reads the status and the log.src/web/pages/pull-start.ts(new) renders the strip.src/web/pages/pull.tsandsrc/tui/screens/pull.ts.docs/features/preview-start-failure.md.test/preview-start-output.test.tsstarts real fixtures withstartProcess.tscis clean, the gate reports 32 of 32 rules satisfied, anddesign-lintis clean. The new tests and the pull, TUI and hollow/doorless suites I ran pass.scripts/fast.tsnamed 3,032 files, so I ran no broader suite and left it to the forge's check.failed:line. I added no new data to the environment state to separate them.servingWordsandreadRunLog, plus the existingdisclosurecomponent.Closes #17892