sandcastle: POST /api/submit — validate submission + logo (#13) #45

Merged
ben merged 3 commits from sandcastle/worker/20260829-052907-84c8e2 into main 2026-08-29 06:45:28 +00:00

Implements plan Task 9 (#13): POST /api/submit validates the multipart submission + logo with no persistence.

  • server/src/multipart.ts — parseSubmissionForm(form)
  • server/src/routes/submit.ts — mounted at /api/submit; 200 / 400 validation / 422 backend
  • server/src/app.ts — mount + app.onError → 500 JSON
  • server/test/submit.test.ts — the plan's five acceptance tests

Phase-1 gate held: nothing written to communities/, nothing rendered, no email.

Closes #13 via close-report gate.

Implements plan Task 9 (#13): `POST /api/submit` validates the multipart submission + logo with no persistence. - `server/src/multipart.ts` — `parseSubmissionForm(form)` - `server/src/routes/submit.ts` — mounted at `/api/submit`; 200 / 400 validation / 422 backend - `server/src/app.ts` — mount + `app.onError` → 500 JSON - `server/test/submit.test.ts` — the plan's five acceptance tests Phase-1 gate held: nothing written to `communities/`, nothing rendered, no email. Closes #13 via close-report gate.
sandcastle: POST /api/submit validates submission + logo, no persistence (#13)
All checks were successful
ci / seam (pull_request) Successful in 22s
d4e2eb9663
Plan Task 9. Phase-1 validate-only endpoint.

- server/src/multipart.ts: parseSubmissionForm(form) -> {ok,submission,logo}
  | {ok:false, issues[]}; validates submission JSON via @coa/schema
  SubmissionSchema and logo against LOGO_MIME / LOGO_MAX_BYTES, collecting
  field-path issues.
- server/src/routes/submit.ts: POST /api/submit -> 200 accepted (shared or
  passing self-hosted, backendReport included), 400 validation, 422 backend
  when a self-hosted probeBackend fails. Validate only; no persistence.
- server/src/app.ts: mount /api/submit + app.onError -> 500 JSON.
- server/test/submit.test.ts: the plan's five acceptance tests.
- STATUS.md: header + log updated.

Phase gate held: nothing written to communities/, nothing rendered, no email.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sandcastle: merge main into worker branch — resolve STATUS.md (#13)
Some checks failed
ci / seam (pull_request) Has been cancelled
3bef37ab53
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sandcastle: re-fire seam (GOTCHAS 10, #13)
All checks were successful
ci / seam (pull_request) Successful in 44s
135882357e
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ben merged commit b5269cb004 into main 2026-08-29 06:45:28 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa!45
No description provided.