(plan) convert original implement plan to mock api

This commit is contained in:
Story Crater Bot
2026-08-19 09:47:14 -07:00
parent c42040319f
commit 0aef2281bc
65 changed files with 307 additions and 627 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
# 4.4 — POST /api/exec (GREEN)
# 4.4 — POST /api/exec (mock, GREEN)
Phase: 4 — Terminal (Surface C)
Stage: GREEN
Depends on: [4.1](4.1-exec-parse-test.md), [4.2](4.2-exec-test.md)
- [x] `POST /api/exec` — input parses to a closed command enum, anything unmatched rejected before any lookup
- [ ] `POST /api/exec` — session cookie, 20/min/session; input parses to a closed command enum, anything unmatched rejected before any lookup
Done — implemented in [app/api/exec/route.ts](../app/api/exec/route.ts). Command set, snapshot-membership validation, and rejection logging all present. Mock only: no session cookie, no 20/min/session rate limit. See [REQUIREMENTS.md](REQUIREMENTS.md).
## Verify
```bash
curl -X POST https://riotpiao.com/api/exec -d '{"cmd":"get pods; rm -rf /"}'
curl -X POST http://localhost:3000/api/exec -d '{"cmd":"get pods; rm -rf /"}'
```