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

An outsider's offered pull answers with a receipt number and the same words by API and MCP #13468

opened this

Merged 21d 3h ago, live in production

An outsider's offer now gets back a receipt number and one sentence of what happens next, and a test holds the API and MCP doors to the same words.

Notes

opened this

An outsider's offer now gets back a receipt number and one sentence of what happens next, and a test holds the API and MCP doors to the same words.

Most of this already existed: both doors returned number, receipt and message from the shared OFFER_RECEIVED constant, and invalid offers were already a 422 with a named reason. Two things were missing.

  • One sentence: the message was two sentences. It is now: "Received as a pull: a person who maintains this repository reads it next, and nothing runs with the repository's secrets or lands before they approve it." Nothing else in the repository quotes the old wording. The terminal offer screen also reads the constant, so it shows the new wording.
  • Parity tests: test/offer-mcp.test.ts has two new tests. The first posts an offer over HTTP (202) and over MCP and checks that both return a numeric number, a receipt, and the identical message, which is one sentence. The second sends an offer with a blank title, checks the HTTP door answers 422 empty_title, and checks MCP says the same words. The first test would fail on the old two-sentence message.

I added no MCP tool and changed no ceilings. test/offer-mcp.test.ts, offer-stranger, tui-offer and mcp-size pass (33 tests), and tsc and scripts/gate.ts --fix are clean.

I did not touch the report path (#13400). If it lands, it can share a constant with OFFER_RECEIVED.

To try it, POST {title, patch} to /api/v1/repos/<owner>/<name>/offers on a public repo without a token, or call the offer MCP tool.

The pre-push hook wanted a "Try:" commit line, so the push includes an empty commit that carries it.

Closes #13445

commented

An outsider's offer now gets back a receipt number and one sentence of what happens next, and a test holds the API and MCP doors to the same words.

Most of this already existed: both doors returned number, receipt and message from the shared OFFER_RECEIVED constant, and invalid offers were already a 422 with a named reason. Two things were missing.

  • One sentence: the message was two sentences. It is now: "Received as a pull: a person who maintains this repository reads it next, and nothing runs with the repository's secrets or lands before they approve it." Nothing else in the repository quotes the old wording. The terminal offer screen also reads the constant, so it shows the new wording.
  • Parity tests: test/offer-mcp.test.ts has two new tests. The first posts an offer over HTTP (202) and over MCP and checks that both return a numeric number, a receipt, and the identical message, which is one sentence. The second sends an offer with a blank title, checks the HTTP door answers 422 empty_title, and checks MCP says the same words. The first test would fail on the old two-sentence message.

I added no MCP tool and changed no ceilings. test/offer-mcp.test.ts, offer-stranger, tui-offer and mcp-size pass (33 tests), and tsc and scripts/gate.ts --fix are clean.

I did not touch the report path (#13400). If it lands, it can share a constant with OFFER_RECEIVED.

To try it, POST {title, patch} to /api/v1/repos/<owner>/<name>/offers on a public repo without a token, or call the offer MCP tool.

The pre-push hook wanted a "Try:" commit line, so the push includes an empty commit that carries it.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs