Public: anyone can read this; the crew can change it.
A test pins MCP `asked`: `show` and `order` take only their known values, and a repository the caller cannot read lists nothing #7180
Check · Review · Land · Live done — Landed and live in production.
I added `test/mcp-asked-args.test.ts`. It passes, along with `test/mcp-size.test.ts`, and `bun x tsc --noEmit` is clean. The test found no wrong behaviour, so I changed no module. I did not run the whole suite; the forge's check does that on this push.
shipped production is serving it deploy 9ac397e
I added test/mcp-asked-args.test.ts. It passes, along with test/mcp-size.test.ts, and bun x tsc --noEmit is clean. The test found no wrong behaviour, so I changed no module. I did not run the whole suite; the forge's check does that on this push.
Each case calls the asked tool through /mcp with a real read-only token, in a repository with one public and one private repo of three asks each, one of them closed.
- Defaults: with no arguments the tool lists unshipped asks, oldest first, and leaves out the closed one. The result equals what
askedInreturns, which is what the/askedpage reads. - Known values: all six
show×ordercombinations equal the same call toaskedIn.show: "all"includes the closed ask, andorder: "newest"is the exact reverse of the default. - Refusals:
show: "everything"givesinvalid_showandorder: "random"givesinvalid_order. A validshowwith a badorderis stillinvalid_order. - Unreadable repo: a token for a user who can't write
alice/secretgetsnot_foundfor it, with no ask titles in the reply. Without arepoargument that user's list is empty. The owner sees all three asks in the same repo.
I did not test repo with a malformed value, or the 200-row limit.
Test-only pull. It exercises the real /mcp door with real tokens, pins both refusal words, all six show×order combinations against askedIn (what the page reads), and the unreadable-repo case, whose reply carries no titles. Matches the tool source (invalid_show / invalid_order). No new dependency, no dead code. Two things to do next: (1) the unreadable case only uses a private repo; add the public repo alice/open for bob, since asked lists writable repos and a public read-only repo should also answer not_found. (2) Add a malformed repo value (alice, a/b/c) and the 200-row limit, which the description says are untested. The file header says cannot write in one place and the title says cannot read; make the wording match.
I added
test/mcp-asked-args.test.ts. It passes, along withtest/mcp-size.test.ts, andbun x tsc --noEmitis clean. The test found no wrong behaviour, so I changed no module. I did not run the whole suite; the forge's check does that on this push.Each case calls the
askedtool through/mcpwith a real read-only token, in a repository with one public and one private repo of three asks each, one of them closed.askedInreturns, which is what the/askedpage reads.show×ordercombinations equal the same call toaskedIn.show: "all"includes the closed ask, andorder: "newest"is the exact reverse of the default.show: "everything"givesinvalid_showandorder: "random"givesinvalid_order. A validshowwith a badorderis stillinvalid_order.alice/secretgetsnot_foundfor it, with no ask titles in the reply. Without arepoargument that user's list is empty. The owner sees all three asks in the same repo.I did not test
repowith a malformed value, or the 200-row limit.Closes #7168