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 #7148

shipped production is serving it opened this has it
opened this

src/http/mcp/tools/snapshot_now.ts refuses no_store with "This forge has nowhere to put a snapshot.", and no test names it. Each case calls the tool through /mcp with a real token, as test/mcp.test.ts does.

Done:

  • [ ] A new test: on a forge with no snapshot store, the tool answers no_store in those words.
  • [ ] With a store stub, an admin with an admin-scope token gets { name, repos, apps, bytes, says }, and the snapshot exists in the store.
  • [ ] A non-admin, or an admin with an rw token, is refused, and nothing is taken.

Files: test/mcp-snapshot-now.test.ts

If the test finds the behaviour wrong, fix the tool in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs