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

MCP `restore_drill`: restore the newest snapshot as a drill and say its verdict, as the Backups page's button does, for a forge admin #5427

shipped production is serving it opened this has it
opened this

For: "is my backup actually restorable?" is one call from any harness. backupsDrill (src/web/pages/backups.ts) has no twin, and the weekly restore drill is real work the owner asked for (#1147).

Done:

  • [ ] A tool restore_drill with no arguments, admin only (refused as the page refuses), calls snapshotsOf(ctx.app).drill(). It answers { verdict, failedStep?, says }, with says worded as the page's flashes ("The drill restored green.", "The drill failed at <step>.", no snapshots, could not run). A failure is a one-sentence answer, never a throw.
  • [ ] test/mcp-restore-drill.test.ts covers three cases: no store answers "This forge has no snapshots to drill."; a non-admin is refused; an admin with a local store and one snapshot gets a verdict, and the drill is kept where the page reads it. Each fails without the tool.

Files: src/http/mcp.ts, docs/MCP.md, test/mcp-restore-drill.test.ts.

  • [ ] One row in docs/MCP.md, marked as a write in tools/list's annotations as the other writes are.
  • [ ] Before pushing, run the new test, test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts. A red test elsewhere that main also has is named in the pull.

Risk: test/mcp-size.test.ts caps tools/list, so keep the description to one short sentence. #5415, #5422 and #5423 add backup tools nearby; place this one after whichever has landed.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs