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

A setting's out-of-range refusal and an app's members refusal live in one module, and the API and MCP read them from there #5563

shipped production is serving it opened this has it
opened this

For: A capacity or limit value out of range, and an app's people set by a non-writer reads the same from every door, because every door reads it from one place. Today each sentence below is typed out separately in src/http/api.ts and src/http/mcp.ts (capacity, limits, app_members), so the next edit to one door makes them drift. This is the fix pull #5504's reviewer asked for, applied to these words.

Done:

  • [ ] A new src/actions/setting_words.ts exports these sentences (a const object or small functions, plain data):

- "that value is outside what this setting takes" - "the people an app names are its writers' to choose"

  • [ ] Each door (src/http/api.ts and src/http/mcp.ts (capacity, limits, app_members)) imports them, and none of these sentences is typed out anywhere else under src/ (grep -rn for each finds only the module).
  • [ ] Answers are byte-for-byte unchanged: every existing test passes as it is.
  • [ ] A new test/setting-words.test.ts triggers one of the refusals through each door and asserts each answers the module's sentence. It fails if a door retypes the words.
  • [ ] Before pushing, run test/setting-words.test.ts, the tests of each door you touched and bun x tsc --noEmit. A red test elsewhere that main also has is named in the pull, not a reason to stop.

Files: src/actions/setting_words.ts (new), the doors named, test/setting-words.test.ts. Risk: a pure move; change no wording. Other MCP work edits src/http/mcp.ts in parallel, so keep each edit to the literal's own line.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs