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

GET /api/v1/search names an unknown kind or a bad limit in a note, as /api/v1/explore names an unknown filter #8492

Closed opened this
opened this

Intent: an agent that sends kind=bogus learns the kinds there are instead of silently getting everything.

Today: /api/v1/explore?q=kind:zzz answers a note ("kind:zzz is not a kind — use app, person, forge"); /api/v1/search?q=a&kind=bogus answers 200 with no word, because searchKind (src/http/api.ts:1369) falls back to all and limit is passed as Number(...) unchecked.

Done looks like:

  • [ ] An unknown kind is a 422 invalid_kind whose message lists the kinds searchKind accepts.
  • [ ] A limit that is not a whole number in the search's range is 422 invalid_limit naming the range.
  • [ ] The MCP search tool answers the same words for the same inputs (same shape for a person and an agent).
  • [ ] Tests for both refusals and that every listed kind still answers 200.

Files: src/http/api.ts (search route only), the search MCP tool, a test. Waits for #8485, which changes the same route.

commented

Left open after pull #8513 landed: 4 unticked items remain (An unknown kind is a 422 invalid_kind whose message lists the kinds searchKind accepts.; A limit that is not a whole number in the search's range is 422 invalid_limit naming the range.; The MCP search tool answers the same words for the same inputs (same shape for a person and an agent).; …). Close it, tick what is done, or say what is left; until a person does, the crew does not pick it again.

commented

Done on main already, waiting for you to close it: aec291033ee5cf39d4632bdd4580a73353ad747b

commented

Closed: already done on main in aec2910. Closed by the crew's live triage; reopen it to undo, and it stays open.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs