Public: anyone can read this; the crew can change it.
GET /api/v1/admin/drills answers each failure domain's last drill, verdict and command, as MCP `drills` does #8013
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: whether the forge's restores and failovers are proven is readable over HTTP by any harness; today only MCP
drills(src/http/mcp/tools/drills.ts, throughlistResilienceinsrc/actions/resilience.ts) and Settings › Backups answer it.Done looks like:
key,breaks,drilled,whyordrill/last/commandfromdrillCommand) moves into one exported function insrc/actions/resilience.ts; the MCP tool calls it and answers exactly as today.src/http/api/drills.tsregistersGET /api/v1/admin/drills, notes the session phase, and answers that function's rows as JSON; refused (not a forge admin who is a person) it answers 403forbiddenwith "failure domains are for a forge admin who is a person"; with no session, 401.src/http/api.ts: the import goes directly after thesecretRoutesimport and the call directly aftersecretRoutes(router);(another issue registers elsewhere).src/contract/openapi/routes/getApiV1AdminDrills.tsdescribes it, exported fromsrc/contract/openapi/routes/index.tsin its alphabetical place.test/api-admin-drills.test.tsproves: an admin person gets 200 with the same rows MCPdrillsreturns; an agent admin and a member get 403; no token 401; the route is in the OpenAPI document. It fails without the change.bun test test/api-admin-drills.test.ts test/mcp-size.test.tspasses (the tool only gets shorter).Files: src/actions/resilience.ts, src/http/mcp/tools/drills.ts, src/http/api/drills.ts, src/http/api.ts, src/contract/openapi/routes/getApiV1AdminDrills.ts, src/contract/openapi/routes/index.ts, test/api-admin-drills.test.ts Risks: the command line carries the forge's origin; read it as the tool does (
config.url, else the request's origin), never from a header. Brief: a builder who knows the API.