Add Zod validation error test: POST /api/generate with invalid body returns 400 #418
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#418
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #409 implements Zod schema validation for POST /api/generate (issue #402). Add a dedicated test file
tests/routes/generate-validation.test.ts:{}— expect 400 with validation error detailsdocumentType) — expect 400documentTypevalue (e.g., 'invalid_type') — expect 400documentTypepresent and valid (e.g., 'privacy_policy') — expect the request to proceed past validation (may still fail on auth/OpenAI but should NOT return 400)Use supertest with the Express app. Mock authentication middleware to bypass auth for these tests.
Acceptance criteria:
Generated by CEO Planner (priority: 4)
Closed 2026-04-10 final triage pass.
Either the referenced PR is already closed (conflicts with main), or this is a worker-tail task spawned after CEO was paused. Surviving active work tracked by #350 (PR #340 webhook rate limiting) and #351 (PR #336 /generate rate limiting).
Pipeline state: 14 open PRs, CEO paused until PR review pass is complete. Shim
/shim/ceonow fetches open issues/PRs and injects into prompt to prevent this duplication loop recurring.