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

An outsider's report answers with a receipt number and the same words by API and MCP #13435

Merged opened this

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

Merged

Most of this was already on main. POST /api/v1/repos/{owner}/{name}/reports and the MCP report tool both returned the same receipt (#13206). This pull only adds the missing MCP test and a docs line.

Notes

shipped production is serving it deploy 8e1361f

opened this

Most of this was already on main. POST /api/v1/repos/{owner}/{name}/reports and the MCP report tool both returned the same receipt (#13206). This pull only adds the missing MCP test and a docs line.

What the receipt says: one sentence (message, plus a next sentence), the report id, the state, a url and an issue field. issue is null until a person accepts the report. A report is not an issue before that, and the issue is opened only on accept (so outsider text stays marked untrusted). The url works signed out on a public repository and shows the issue number once there is one. The filer's own words are never echoed back.

Changes:

  • test/report-receipt.test.ts has a new test for the MCP door. It calls report with no token and checks the same receipt shape and next sentence, and that the body text is not echoed.
  • docs/MCP.md has a line describing the receipt report returns.

Left out: I did not make the report open an issue at filing time, since that would bypass the person who reads it first. Whether to still do that for this issue is your decision. I added no new tool and did not touch the MCP ceilings.

Checks: bun test test/report-receipt.test.ts test/mcp-size.test.ts passes, tsc --noEmit is clean, and scripts/gate.ts --fix found nothing to change. To try it, POST {"title":"..."} to /api/v1/repos/<owner>/<repo>/reports on a public repository, or call the MCP tool report with {repo: "<owner>/<repo>", title}.

🤖 Generated with Claude Code

Closes #13400

1 earlier comment · 1 event
commented

Most of this was already on main. POST /api/v1/repos/{owner}/{name}/reports and the MCP report tool both returned the same receipt (#13206). This pull only adds the missing MCP test and a docs line.

What the receipt says: one sentence (message, plus a next sentence), the report id, the state, a url and an issue field. issue is null until a person accepts the report. A report is not an issue before that, and the issue is opened only on accept (so outsider text stays marked untrusted). The url works signed out on a public repository and shows the issue number once there is one. The filer's own words are never echoed back.

Changes:

  • test/report-receipt.test.ts has a new test for the MCP door. It calls report with no token and checks the same receipt shape and next sentence, and that the body text is not echoed.
  • docs/MCP.md has a line describing the receipt report returns.

Left out: I did not make the report open an issue at filing time, since that would bypass the person who reads it first. Whether to still do that for this issue is your decision. I added no new tool and did not touch the MCP ceilings.

Checks: bun test test/report-receipt.test.ts test/mcp-size.test.ts passes, tsc --noEmit is clean, and scripts/gate.ts --fix found nothing to change. To try it, POST {"title":"..."} to /api/v1/repos/<owner>/<repo>/reports on a public repository, or call the MCP tool report with {repo: "<owner>/<repo>", title}.

🤖 Generated with Claude Code

Approved

Mostly already on main (#13206); this adds the missing MCP-door test and a docs line. Test asserts the same receipt shape, the shared next sentence, the url, and that the filer body is not echoed. Right call not to open an issue at filing time: a person reads it first and outsider text stays untrusted. Docs line is in MCP.md (fine, tool reference), not README. Next two things: (1) docs/features/report-receipt.md could mention the MCP door in one line if it does not; (2) box 1 says the number it opened, but the receipt carries issue:null until accept, so decide on the issue whether the wording should change.

commented

Left #13400 open: 1 unticked item remain (the report route answers one sentence and the issue number it opened).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs