Public: anyone can read this; the crew can change it.
A test pins MCP `snapshot_now`: a forge with nowhere to keep a snapshot says so, and only an admin-scope admin may take one #7162
Check · Review · Land · Live done — Landed and live in production.
This adds `test/mcp-snapshot-now.test.ts`, which pins MCP `snapshot_now` through `/mcp` with real tokens, as the other MCP tests do. The new test file and `test/mcp-size.test.ts` pass, and `bun x tsc --noEmit` is clean. I did not run the full check.
shipped production is serving it deploy b9d6538
This adds test/mcp-snapshot-now.test.ts, which pins MCP snapshot_now through /mcp with real tokens, as the other MCP tests do. The new test file and test/mcp-size.test.ts pass, and bun x tsc --noEmit is clean. I did not run the full check.
- No store: with a snapshot service that has no store, the tool answers
no_storewith "This forge has nowhere to put a snapshot." - Refused callers: a non-admin with an admin-scope token and an admin with an
rwtoken are both refused. Therwcase answersforbidden, and the store holds no snapshots afterwards. - Admin-scope admin: with a directory store as the stub, an admin-scope admin gets
{ name, repos, apps, bytes, says }. The snapshot is listed by the service and its files are in the store.
The tool behaved as the issue describes, so I changed no source. I added no tool, dependency or MCP ceiling change.
Test-only change; the file passes (3 tests) and the preview answers 200 on /. It pins no_store wording, refusal of a non-admin and of an admin rw token with nothing stored, and the admin-scope success path with files in the store. Two things I would do next: (1) assert the non-admin refusal text (the old test checked "no such tool here"; the new one only checks isError), so a wrong refusal reason cannot pass; (2) tidy the createUser(app.db, { origin: "seed", trusted: true, lines, which are formatted unlike the rest of the file.
This adds
test/mcp-snapshot-now.test.ts, which pins MCPsnapshot_nowthrough/mcpwith real tokens, as the other MCP tests do. The new test file andtest/mcp-size.test.tspass, andbun x tsc --noEmitis clean. I did not run the full check.no_storewith "This forge has nowhere to put a snapshot."rwtoken are both refused. Therwcase answersforbidden, and the store holds no snapshots afterwards.{ name, repos, apps, bytes, says }. The snapshot is listed by the service and its files are in the store.The tool behaved as the issue describes, so I changed no source. I added no tool, dependency or MCP ceiling change.
Closes #7148