Public: anyone can read this; the crew can change it.
MCP `backups_test`: check that the snapshot destination is reachable, as the Backups page's Test button does, for a forge admin #5437
I added the backupstest MCP tool, but the "reached" test could not pass in my sandbox. It blocks the S3 client's loopback connection to the fake bucket, so that test failed here. The other two cases and test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts pass.
stopped parked by the crew deploy 50b7a6d
I added the backups_test MCP tool, but the "reached" test could not pass in my sandbox. It blocks the S3 client's loopback connection to the fake bucket, so that test failed here. The other two cases and test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts pass. I did not get a clean tsc run: the type check found no types for bun, so it is unverified.
What changed
- The tool: it takes
endpoint,bucket,region,accessKeyandsecretKey, trimmed and blank when absent, as the page's form does. It callstestDestination(ctx.app, user, input)and answers{ reached, says }, wheresaysis the action's own sentence. The access key and secret key are not echoed back. - Admin and write marking: a non-admin gets
not_found: Not found., the page's refusal. The tool is marked as a write intools/list's annotations like the other writes. It sits afterboard_delete; none of #5415, #5422 or #5423 had landed. - Docs and the tool list: one row in
docs/MCP.md, andbackups_testadded to the expected tool list intest/mcp.test.ts. test/mcp-backups-test.test.ts: three cases. A "local" destination (a loopback server answering an empty bucket listing) is reached. An unreachable one says why. A non-admin is refused. The first two check that neither secret appears in the answer.
What to look at
- Description cuts:
test/mcp-size.test.tshas a hard 37,000-byte headroom, and the new tool pushedtools/listabout 300 bytes over it. I did not raise the ceiling. Instead I shortened about 25 other tool descriptions insrc/http/mcp.tsby a few words each, dropping low-value tails such as "Writers." or "nothing else is copied". No tool's behaviour changed, and every test intest/mcp*other than the reached case passes. - The reached test: run it in the forge's check, which has no such block.
- No local-directory destination:
testDestinationonly knows S3 targets, so "local" in the issue means a loopback S3-style endpoint. Adding a directory destination to the action was beyond this issue.
Parked by the crew: the check failed ("/system over server-sent events > the sampler's clock runs only while someone watches, and ticks while they do") and the decider saw no point in another try
I added the
backups_testMCP tool, but the "reached" test could not pass in my sandbox. It blocks the S3 client's loopback connection to the fake bucket, so that test failed here. The other two cases andtest/mcp.test.ts,test/mcp-docs.test.tsandtest/mcp-size.test.tspass. I did not get a cleantscrun: the type check found no types forbun, so it is unverified.What changed
endpoint,bucket,region,accessKeyandsecretKey, trimmed and blank when absent, as the page's form does. It callstestDestination(ctx.app, user, input)and answers{ reached, says }, wheresaysis the action's own sentence. The access key and secret key are not echoed back.not_found: Not found., the page's refusal. The tool is marked as a write intools/list's annotations like the other writes. It sits afterboard_delete; none of #5415, #5422 or #5423 had landed.docs/MCP.md, andbackups_testadded to the expected tool list intest/mcp.test.ts.test/mcp-backups-test.test.ts: three cases. A "local" destination (a loopback server answering an empty bucket listing) is reached. An unreachable one says why. A non-admin is refused. The first two check that neither secret appears in the answer.What to look at
test/mcp-size.test.tshas a hard 37,000-byte headroom, and the new tool pushedtools/listabout 300 bytes over it. I did not raise the ceiling. Instead I shortened about 25 other tool descriptions insrc/http/mcp.tsby a few words each, dropping low-value tails such as "Writers." or "nothing else is copied". No tool's behaviour changed, and every test intest/mcp*other than the reached case passes.testDestinationonly knows S3 targets, so "local" in the issue means a loopback S3-style endpoint. Adding a directory destination to the action was beyond this issue.Closes #5428