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

A green restore drill keeps how long each phase took, and /settings/backups shows it against the budget #2622

shipped production is serving it opened this has it
opened this

Follows #2616–#2618, which name the phase only when a drill times out. A drill that passes tells the owner nothing about how close it came to its budget.

Done looks like:

  • [ ] runDrill (src/snapshot/drill.ts) gets each restore phase's milliseconds from the onProgress that restoreSnapshot already reports. DrillResult gains phases: { phase, ms }[] and budgetMs, on green and red alike.
  • [ ] They are stored with the drill (src/snapshot/drills.ts) through a new migration file src/core/migrations/<UTC yyyymmddHHMMSS>-drill-phases.ts. It is additive: one nullable TEXT column of JSON, validated when read back, and an older row reads as no phases.
  • [ ] /settings/backups shows the last drill's line as e.g. "6 min 12 s of its 14 min budget: files 58 s, unpack 20 s, bundles 4 min 50 s, key 1 s", escaped, and fits a 375 px screen.
  • [ ] Tests: a stubbed restore reporting three phases gives those phases and the budget on a green drill. A stored row round-trips. The page shows the line.
  • [ ] Run bun x tsc --noEmit, the snapshot-drill tests, and the schema-migrations and schema-additive tests. Do not hand-edit src/core/releases.json. Name every new test file in GATE in scripts/gate.ts.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs