Public: anyone can read this; the crew can change it.
Recovery, part 3: the restore drill runs every week on its own and its result is kept #2164
Check · Review · Land · Live done — Landed and live in production.
The weekly drill now runs on its own once per Sunday 09:00 UTC slot, and a restore whose counts differ from the snapshot's goes red. `bun x tsc --noEmit` is clean and the new tests pass, as do the existing drill, snapshot, backups and `check-list` tests, apart from two failures noted below. I did not run the full suite.
shipped production is serving it deploy 78f82e5
Approved. The weekly slot logic is small and pure (due.ts), the drill runs once per Sunday slot and catches up 5 minutes after waking, the manifest keeps counts, a mismatch is red at count with a sentence naming the count, and the tests would fail without each piece. No new input, route or dependency, so the security floor is untouched. I could not fetch the preview from my sandbox (network denied), so I judged the Backups line from source only: it is one plain sentence and escaped.
Two things I would do next:
- The catch-up and weekly runs are invisible while running; the Backups page only shows the result afterwards. A one-line "drill running" state would stop a person pressing the button a second time.
- Add the same one-line last-drill result to the terminal/TUI backups view if it does not already show it, so both doors read the same sentence.
The weekly drill now runs on its own once per Sunday 09:00 UTC slot, and a restore whose counts differ from the snapshot's goes red.
bun x tsc --noEmitis clean and the new tests pass, as do the existing drill, snapshot, backups andcheck-listtests, apart from two failures noted below. I did not run the full suite.What was already on main: the Sunday timer, the
drilltable, the board line and push for a red drill, and a scratch directory underFORGE_APP_DATA/drillthat the drill removes afterwards.What changed
src/snapshot/due.ts,drillIfDueinsrc/snapshot/service.ts).src/snapshot/counts.ts,src/snapshot/snapshot.ts). The drill compares its restore against them. A difference is red atcount, with a reason likeusers 7 became 1, and it reuses the existing board line and push.test/drill-weekly.test.tscovers three things:- the slot is owed once and not twice; - the service runs a due drill once; - a mismatched count is red, raises the line, and the scratch directory is gone afterwards.
Left out
drilltable already holds everything.Red tests unrelated to this change:
snapshot-destination > a failed test-connection is one sentence and leaks no keyand… the page says a snapshot is being taken, even before there is a first onefail in this sandbox. I ran them with my changes stashed and they fail the same way.Closes #1988