Public: anyone can read this; the crew can change it.
A restore drill that runs out of time says which phase it hung in and how far it got #2621
Check · Review · Land · Live done — Landed and live in production.
A restore drill that times out now says which phase it hung in and how far it got. `bun x tsc --noEmit`, `test/snapshot-drill.test.ts` and `test/snapshot-drill-page.test.ts` pass (27 tests). I did not run the rest of the suite.
shipped production is serving it deploy 740aa94
A restore drill that times out now says which phase it hung in and how far it got. bun x tsc --noEmit, test/snapshot-drill.test.ts and test/snapshot-drill-page.test.ts pass (27 tests). I did not run the rest of the suite.
- Reason text:
runDrill(src/snapshot/drill.ts) now passesonProgressto the restore and keeps the last report it gets. If the restore step times out, the reason reads likerestore timed out in bundles (37 of 212 cloned, 1.8 GiB fetched) after its 14 min budget. - Other phases: these read
N of M done, X so far, for examplefiles (3 of 3 done, 100 B so far). - No progress seen, or another step times out: the old wording stays,
<step> timed out: no answer within its … budget, so existing tests and rows keep their meaning. - Page and sentinel: I changed nothing in
src/web/pages/backups.tsorsrc/snapshot/verdict.ts./settings/backupsalready printsd.reasonthrough the escapinghtmltag, and the sentinel'sdrillcause already includesr.reasonunchanged. - Tests:
- A stubbed restore that reports files and then bundles progress and hangs; the test asserts the exact reason string.
- A page test that a reason containing <b> appears verbatim but escaped.
- The existing "names the failing step" test now expects three drill rows instead of two, because the new test adds one.
I did not add a test that the sentinel's drill cause carries the new reason. That path is the existing verdict.ts formatting, which this change does not touch.
Does what the issue asks: a restore that times out after reporting progress now says the phase and counts, and the old wording stays for other steps and for a restore that never reported. The reason goes through the existing escaped page and sentinel path, and a test covers the escaping. No new input, write path or dependency, so the terminal and page read the same field. Two things I would do next: (1) keep the snapshot size in the new reason, since the old timeout text had it and the new one drops it; (2) un-export describeProgress unless something else will use it, and give it a direct test per phase, because only the bundles wording is asserted.
A restore drill that times out now says which phase it hung in and how far it got.
bun x tsc --noEmit,test/snapshot-drill.test.tsandtest/snapshot-drill-page.test.tspass (27 tests). I did not run the rest of the suite.runDrill(src/snapshot/drill.ts) now passesonProgressto the restore and keeps the last report it gets. If the restore step times out, the reason reads likerestore timed out in bundles (37 of 212 cloned, 1.8 GiB fetched) after its 14 min budget.N of M done, X so far, for examplefiles (3 of 3 done, 100 B so far).<step> timed out: no answer within its … budget, so existing tests and rows keep their meaning.src/web/pages/backups.tsorsrc/snapshot/verdict.ts./settings/backupsalready printsd.reasonthrough the escapinghtmltag, and the sentinel'sdrillcause already includesr.reasonunchanged.- A stubbed restore that reports
filesand thenbundlesprogress and hangs; the test asserts the exact reason string. - A page test that a reason containing<b>appears verbatim but escaped. - The existing "names the failing step" test now expects three drill rows instead of two, because the new test adds one.I did not add a test that the sentinel's
drillcause carries the new reason. That path is the existingverdict.tsformatting, which this change does not touch.Closes #2618