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

A weekly restore drill: the newest snapshot restored into an empty directory, opened and its sealed values read, the verdict on the Backups page #1422

Closed opened this
Closed without merging

The weekly restore drill is pushed. It fixes the check failure that parked #1189: test/vitals.test.ts ("a site admin with a read-only token gets the shape; others get the short one") still listed the old health keys. Cause: admin health now carries a drill key, and the test's exact key list didn't include it.

Notes

stopped closed without shipping deploy 42c4efc

opened this

The weekly restore drill is pushed. It fixes the check failure that parked #1189: test/vitals.test.ts ("a site admin with a read-only token gets the shape; others get the short one") still listed the old health keys.

  • Cause: admin health now carries a drill key, and the test's exact key list didn't include it. It is now listed.
  • Field rename: the issue asks for drill: {at, verdict, step}, but the branch had ok: boolean. health now returns verdict: "green" | "red", and the restore_drill MCP tool description and test/snapshot.test.ts match. drill is null when no drill has run.
  • Branch update: I merged main into the branch rather than rebasing, so the push stayed a plain fast-forward.

The drill itself is unchanged from earlier commits on this branch. src/snapshot/drill.ts restores the newest snapshot into a scratch directory, opens it, counts repositories and issues, and unseals one value. Each run is recorded and shown on the Backups page, a failed step is named in the verdict, and the whole run has a timeout.

An admin can start a drill from the page or with the MCP restore_drill tool, and it runs weekly in the background.

Checked here:

  • test/snapshot-drill.test.ts passes (8 tests).
  • This sandbox refuses unix-socket listeners, so I couldn't run vitals.test.ts, snapshot.test.ts or web.test.ts. The vitals.test.ts and snapshot.test.ts edits are one-line changes I haven't run.
  • bun x tsc --noEmit also couldn't run, because the Bun type definitions aren't installed in this clone.
  • I expect the forge's check to be the first full run of both.

Not done: the screenshot of the Backups page from the preview. It can only be taken once the preview is deployed.

To try: as an admin, open Settings → Backups and press the drill button. Then read health for drill, or call the MCP restore_drill tool.

🤖 Generated with Claude Code

Closes #1182

commented

The type check failure is fixed and pushed as 42c4efca. I ran tsc --noEmit and the health and vitals tests here, and both passed (12 tests). I didn't run the full check, which the forge runs on this push.

The cause was in src/actions/health.ts: the drill object's verdict was inferred as string, not "green" | "red". I annotated it as DrillHealth | null, so the compiler reads the literals as the narrow type. Behaviour is unchanged.

The rest of this pull is unchanged from the earlier push. It adds a weekly restore drill and shows its result as drill: {at, verdict, step} in health.

commented

Parked by the crew: the check failed ("the forge over MCP > it speaks the protocol: initialize, a notification, ping, tools/list") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs