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

An outsider's report filed untaught answers with a receipt: the issue number, its link, and what happens next in two lines #14168

opened this

Merged 20d 4h ago, live in production

A filed outsider report's receipt now carries a two-line next, and a malformed report's 422 names the field. Both work over POST /api/v1/repos/:owner/:name/reports and the MCP report tool. The receipt tests, reports.test.ts, the MCP size, refusal-hint and report tests, and tsc pass.

Notes

opened this

A filed outsider report's receipt now carries a two-line next, and a malformed report's 422 names the field. Both work over POST /api/v1/repos/:owner/:name/reports and the MCP report tool. The receipt tests, reports.test.ts, the MCP size, refusal-hint and report tests, and tsc pass. I did not run bun test on the whole suite. The forge's check does that on push.

Most of the receipt already existed (#13131). It answered {id, state, issue, url, message, next} on both doors with the same words. I extended that rather than build a second one.

  • next is two lines. Line one says a person who maintains the repository reads it first. Line two says nothing acts on it until a writer adopts it as an issue, and to open the url to see whether they have. The words live once in src/actions/report_words.ts, so both doors say the same thing.
  • number added to the receipt. It sits beside issue and is null until a writer adopts the report. A report is not an issue until then, so the receipt cannot give a real number at filing time.
  • The 422 names the field. The body is {error, message, hint}. The error codes are unchanged, message now starts with the field (title: title too long, agent: invalid agent), and hint is the shape that would have been accepted. The MCP refusal text carries the same field.
  • Tests. I added two to test/report-receipt.test.ts: the two-line next with number null, and the 422 over HTTP and MCP naming title and agent. docs/MCP.md describes the new receipt.

I left alone the MCP size ceilings, the tool list (no new tool), and the existing refusal codes the other tests rely on.

To try it, POST {"title":""} to a public repository's /reports for the 422. A real title returns the receipt.

The first push was refused until a commit carried a Try: line, so the branch has a small empty commit for that.

Closes #14158

commented

A filed outsider report's receipt now carries a two-line next, and a malformed report's 422 names the field. Both work over POST /api/v1/repos/:owner/:name/reports and the MCP report tool. The receipt tests, reports.test.ts, the MCP size, refusal-hint and report tests, and tsc pass. I did not run bun test on the whole suite. The forge's check does that on push.

Most of the receipt already existed (#13131). It answered {id, state, issue, url, message, next} on both doors with the same words. I extended that rather than build a second one.

  • next is two lines. Line one says a person who maintains the repository reads it first. Line two says nothing acts on it until a writer adopts it as an issue, and to open the url to see whether they have. The words live once in src/actions/report_words.ts, so both doors say the same thing.
  • number added to the receipt. It sits beside issue and is null until a writer adopts the report. A report is not an issue until then, so the receipt cannot give a real number at filing time.
  • The 422 names the field. The body is {error, message, hint}. The error codes are unchanged, message now starts with the field (title: title too long, agent: invalid agent), and hint is the shape that would have been accepted. The MCP refusal text carries the same field.
  • Tests. I added two to test/report-receipt.test.ts: the two-line next with number null, and the 422 over HTTP and MCP naming title and agent. docs/MCP.md describes the new receipt.

I left alone the MCP size ceilings, the tool list (no new tool), and the existing refusal codes the other tests rely on.

To try it, POST {"title":""} to a public repository's /reports for the 422. A real title returns the receipt.

The first push was refused until a commit carried a Try: line, so the branch has a small empty commit for that.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs