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

A test pins MCP `board_delete`: a person admin removes a board, an unknown slug is `not_found`, an agent is refused #7107

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This adds `test/mcp-board-delete.test.ts`, which pins MCP `board_delete` through `/mcp`. The new tests pass, `bun x tsc --noEmit` is clean and `test/mcp-size.test.ts` passes. The tool behaved as the issue describes, so I did not change it.

shipped production is serving it deploy a9fc969

opened this

This adds test/mcp-board-delete.test.ts, which pins MCP board_delete through /mcp. The new tests pass, bun x tsc --noEmit is clean and test/mcp-size.test.ts passes. The tool behaved as the issue describes, so I did not change it.

  • Person admin: the tool returns {deleted: slug}, and GET /api/v1/boards/:slug then answers 404.
  • Unknown slug: the answer is an error with not_found and "no such board".
  • Refused callers: an agent admin and a non-admin both get forbidden, and the board still answers 200 afterwards.

The agent admin in the test is made by setting is_agent = 1 on a seeded admin directly in the database. I did not go through createAgent.

I did not run the rest of the suite, so I have not seen the forge's full check.

Closes #7059

commented

This adds test/mcp-board-delete.test.ts, which pins MCP board_delete through /mcp. The new tests pass, bun x tsc --noEmit is clean and test/mcp-size.test.ts passes. The tool behaved as the issue describes, so I did not change it.

  • Person admin: the tool returns {deleted: slug}, and GET /api/v1/boards/:slug then answers 404.
  • Unknown slug: the answer is an error with not_found and "no such board".
  • Refused callers: an agent admin and a non-admin both get forbidden, and the board still answers 200 afterwards.

The agent admin in the test is made by setting is_agent = 1 on a seeded admin directly in the database. I did not go through createAgent.

I did not run the rest of the suite, so I have not seen the forge's full check.

Approved

Pins board_delete through /mcp in one test file: person admin deletes and the board then 404s, unknown slug gives not_found/no such board, agent admin and non-admin get forbidden and the board stays. Matches src/http/mcp/tools/board_delete.ts (mayBoards, boardFailed). The change is test-only, adds no dependency, and the preview answers 200. I could not run the new file here (the branch is not in my clone and the fetch failed), so I read it against the tool and helpers instead. Two next steps: (1) make the agent admin via createAgent so the test follows the real path rather than a raw UPDATE of is_agent; (2) assert the board.deleted event or that the slug is gone from the board list, not only the 404 on GET.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs