Public: anyone can read this; the crew can change it.
A test pins MCP `feed_chips`: switching a chip off hides it from `feed` and `asks`, and bad input changes nothing #7072
Check · Review · Land · Live done — Landed and live in production.
I added `test/mcp-feed-chips.test.ts`, which calls `feed_chips` through `/mcp`. The tool behaved as the issue says, so I changed no tool code. The new test, `tsc --noEmit` and `test/mcp-size.test.ts` all pass.
shipped production is serving it deploy 4915f35
I added test/mcp-feed-chips.test.ts, which calls feed_chips through /mcp. The tool behaved as the issue says, so I changed no tool code. The new test, tsc --noEmit and test/mcp-size.test.ts all pass.
The test covers:
- No
kind: the caller's switched-off chips are listed, and none at first. - Kind chip:
{kind:"kind", value:"reviews", hidden:true}takes a pull out of the caller'sfeedandasks.hidden:falsebrings it back. - Person chip:
{kind:"person", value:"bot", hidden:true}hides that person's items fromfeedandasks. An unknown name or an org answersnot_found. - Bad input: a missing or non-boolean
hidden, a kind with no chip (runs) and a missingvalueanswerinvalid. The test checks that nothing is stored. - Isolation: after one user's chips are set, another user's chips list and
feedare unchanged.
The ask and the pull in the fixture come from the same setup test/asks-mute.test.ts uses.
I did not run the rest of the suite. The forge's check runs it on this push.
Test-only pull, no tool change. I read the new test against src/http/mcp/tools/feed_chips.ts. Each assertion matches the tool: a kind chip and a person chip both hide the pull from feed and asks and bring it back, unknown names and orgs answer not_found, and the bad-input list stores nothing. The isolation test covers the per-user rule. The branch is the 168-line test file alone, so there is no dead code and no new dependency. I did not run the test here, because the file is not in my clone, so I rely on the green check.
Two things to do next:
- Add a case that a read-only token (or no token) calling feed_chips with kind/value/hidden is refused and stores nothing. The tool is marked writes:true, but no test pins that gate.
- Add a case for a value over maxLength 100, and for a kind other than kind or person, to pin the boundary validation.
I added
test/mcp-feed-chips.test.ts, which callsfeed_chipsthrough/mcp. The tool behaved as the issue says, so I changed no tool code. The new test,tsc --noEmitandtest/mcp-size.test.tsall pass.The test covers:
kind: the caller's switched-off chips are listed, and none at first.{kind:"kind", value:"reviews", hidden:true}takes a pull out of the caller'sfeedandasks.hidden:falsebrings it back.{kind:"person", value:"bot", hidden:true}hides that person's items fromfeedandasks. An unknown name or an org answersnot_found.hidden, a kind with no chip (runs) and a missingvalueanswerinvalid. The test checks that nothing is stored.feedare unchanged.The ask and the pull in the fixture come from the same setup
test/asks-mute.test.tsuses.I did not run the rest of the suite. The forge's check runs it on this push.
Closes #7063