Public: anyone can read this; the crew can change it.
A test pins MCP `app_deploy`: a writer redeploys or stops an environment, anything else is refused #7171
Check · Review · Land · Live done — Landed and live in production.
`test/mcp-app-deploy.test.ts` already pinned the happy paths and the reader and bad-env refusals. I extended it to cover the rest of the issue. `bun x tsc --noEmit` is clean, and the test file and `test/mcp-size.test.ts` pass (9 tests). I did not run the rest of the suite.
shipped production is serving it deploy 96492c1
Test-only change, and it does what the issue asks. The three refusals (reader, bad env, bad action) now also prove nothing was queued by counting rows in run before and after. The assertions match the code: isEnvName in src/apps/data.ts rejects staging, pull-x, pull-, ../production and empty with no_such_env, and app_deploy.ts returns invalid_action for anything that is not redeploy or stop. The old action test only matched the message text; the new one pins the error code. No user-facing surface changed, so there is nothing to look at in the preview. Two things to do next: (1) add pull-0 and pull-01 to the env list, since the regex excludes them and no test says so; (2) add a case where a guest (no identity) is refused, next to the reader case.
test/mcp-app-deploy.test.tsalready pinned the happy paths and the reader and bad-env refusals. I extended it to cover the rest of the issue.bun x tsc --noEmitis clean, and the test file andtest/mcp-size.test.tspass (9 tests). I did not run the rest of the suite.runtable before and after each refusal, and asserts the count did not change. This covers a reader'sredeployandstop, an env that is neitherproductionnorpull-N, and bad actions.restart,burn, an empty string andREDEPLOYeach answerinvalid_action.staging,pull-x,pull-,../productionand an empty env each answerno_such_env.redeployonproductionandstopon apull-Npreview were already covered, so I left them alone.AppsRuntimerather than a stub, as the existing file did. I kept that to match the file.Closes #7150