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

MCP `app_deploy` refuses in the deploys page's words, not `refused: <code>` #7607

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`app_deploy` now refuses stop and redeploy in the deploys page's words instead of `refused: <code>`. The error codes are unchanged. `tsc` is clean, and `test/mcp-app-deploy.test.ts` and `test/mcp-size.test.ts` pass.

shipped production is serving it deploy a4add02

opened this

app_deploy now refuses stop and redeploy in the deploys page's words instead of refused: <code>. The error codes are unchanged. tsc is clean, and test/mcp-app-deploy.test.ts and test/mcp-size.test.ts pass.

  • Shared words: src/actions/env_words.ts already held one sentence per error that stopEnv and redeployEnv can return. The web page and the terminal deploys screen already read from it, so I added no new module and made no page edits.
  • The change: src/http/mcp/tools/app_deploy.ts now calls envRefusalText for both actions.
  • New test: it covers a non-admin and an unknown environment. For both, it asserts the code is kept and the page's sentence appears in the message. It also covers a missing repository, which the MCP answers with its generic "no such app or repository" message. not_found itself cannot be reached over the MCP for an existing repository, so the test only checks that the page's sentence for it exists.

I did not touch the other tools' messages.

Closes #7597

Approved

Clean, small, single-purpose. app_deploy now refuses with envRefusalText (the shared words the page and the terminal use) while keeping the code in error. No new input, auth or output surface; the writer check stays in redeployEnv/stopEnv. The test covers both actions across missing repo, reader and unknown env, and would fail without the change. The preview answers 200. Nothing to change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs