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

The restore drill's red card says, in minutes, what failed, how old the newest snapshot is, and the one next step #2817

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The restore drill's red card now says what failed, in minutes, how old the newest snapshot is, and one next step. I took the wording and duration rounding from #2670's `src/snapshot/verdict.ts` and left out its per-download deadline.

shipped production is serving it deploy 45be4c2

opened this

The restore drill's red card now says what failed, in minutes, how old the newest snapshot is, and one next step. I took the wording and duration rounding from #2670's src/snapshot/verdict.ts and left out its per-download deadline.

The five related drill and vitals test files pass (22 tests). I couldn't run bun x tsc --noEmit: bun can't write to its temp directory in this sandbox, so the type check is unrun.

What the card says now

  • A card with a 596591.19 ms timeout reads: "The restore drill failed at restore: restore timed out: no answer in about 10 minutes. It had 10 min. The newest snapshot is 2026-10-14T08-00-00Z, 5 days old. Next: restore it by hand as docs/RECOVERY.md Route 1 says; the card clears when a drill passes."
  • plainDurations turns "no answer in N ms/s", "timed out in N ms/s" and "after N ms/s" into under a second, about N seconds, or about N minutes. This also applies to verdicts already stored.
  • failedSentence takes an optional now, and drillNeed passes it, so the card can show the snapshot's age from its id.
  • With no snapshot it says "No snapshot was found."

Wording differs from the issue's example

  • I kept the opening "The restore drill failed at <step>" instead of the issue's "timed out restoring after about 10 minutes". src/kernel/domains.ts matches on that prefix, and test/vitals-domain-drill.test.ts asserts it.
  • The card also still shows the snapshot id and the phase timings and budget it showed before.

Tests

  • New test/drill-card-words.test.ts checks that a failed verdict of 596591.19 ms renders "about 10 minutes" and "5 days old", with no raw milliseconds. It also covers plainDurations.
  • The old wording check in test/drill-slow.test.ts was updated to the new ending, since the change makes that sentence differ.

Try it: bun test test/drill-card-words.test.ts test/drill-slow.test.ts

🤖 Generated with Claude Code

Closes #2812

commented

The restore drill's red card now says what failed, in minutes, how old the newest snapshot is, and one next step. I took the wording and duration rounding from #2670's src/snapshot/verdict.ts and left out its per-download deadline.

The five related drill and vitals test files pass (22 tests). I couldn't run bun x tsc --noEmit: bun can't write to its temp directory in this sandbox, so the type check is unrun.

What the card says now

  • A card with a 596591.19 ms timeout reads: "The restore drill failed at restore: restore timed out: no answer in about 10 minutes. It had 10 min. The newest snapshot is 2026-10-14T08-00-00Z, 5 days old. Next: restore it by hand as docs/RECOVERY.md Route 1 says; the card clears when a drill passes."
  • plainDurations turns "no answer in N ms/s", "timed out in N ms/s" and "after N ms/s" into under a second, about N seconds, or about N minutes. This also applies to verdicts already stored.
  • failedSentence takes an optional now, and drillNeed passes it, so the card can show the snapshot's age from its id.
  • With no snapshot it says "No snapshot was found."

Wording differs from the issue's example

  • I kept the opening "The restore drill failed at <step>" instead of the issue's "timed out restoring after about 10 minutes". src/kernel/domains.ts matches on that prefix, and test/vitals-domain-drill.test.ts asserts it.
  • The card also still shows the snapshot id and the phase timings and budget it showed before.

Tests

  • New test/drill-card-words.test.ts checks that a failed verdict of 596591.19 ms renders "about 10 minutes" and "5 days old", with no raw milliseconds. It also covers plainDurations.
  • The old wording check in test/drill-slow.test.ts was updated to the new ending, since the change makes that sentence differ.

Try it: bun test test/drill-card-words.test.ts test/drill-slow.test.ts

🤖 Generated with Claude Code

Approved

The red card now reads in minutes, gives the snapshot age and one next step. It is a pure wording change with no new input, write path or dependency, and the tests cover it. Route 1 exists in docs/RECOVERY.md. I did not open the preview or the screenshots, and I did not run the tests. Two things to do next: (1) the Next step is the same when no snapshot was found, where restoring by hand has nothing to restore. Say what to check instead, for example whether the store is reachable. (2) The card now says "about 10 minutes" in the reason and "It had 10 min." a sentence later. Use one form, via formatMinutes or plainDurations.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs