Skip to Content
suntzu rcdocs
Bits

submissions.create — A member sends an event

  • Trigger: "Send the event" on /submit (linked from the calendar).
  • Who: signed-in members.
  • Path: apps/app/src/app/(site)/submit/submit-form.tsx → sendEvent → POST /submissions → SubmissionsService.submit (apps/api/src/submissions/): a link is read by the PoliteFetcher (ICS or JSON-LD, then the AI on the page text); pasted text by the AI (events/engine/ai.ts, Claude on Amazon Bedrock with quotes checked by verify) → sightings from the member-submissions source → resolve.
  • Data: writes submissions, sightings, and through resolve events/reviews with submitted_by; or, when nothing could be read, a messages row in the crew's inbox (topic event, the member's name and email, the text or "Event link: "). Unlike the contact form, that message isn't emailed to CREW_INBOX.
  • Rules: community trust: new events wait for the crew unless another source agrees; a link to an event we have counts as one more source. AI fields without a word-for-word quote are dropped; the AI is off without BEDROCK_MODEL_ID. A link must be http(s) with a host name (an IP address or a bare name like localhost answers 400), and is only ever fetched on the public internet: usual ports, public addresses, every redirect checked, 2 MB at most (apps/api/src/common/public-url.ts); a link it may not open goes to the crew's inbox. Text needs 20+ characters (8000 at most). At most 10 events a member an hour (429). Answers 201 with the outcome (openapi.json says 200).
  • Errors: signed out, the form answers "Sign in to send events, so we can credit you and tell you when it's live." (the API answers 401). robots.txt, a bot wall or a link it may not open → the crew's inbox. After an error the form keeps what was typed, the cursor goes to the first field with an error, each error is read with its field, and the answer is announced (components/forms/feedback.tsx, spec 0010).
  • Test: e2e/submissions.create.e2e.ts (pasted text reaches the crew's inbox without the AI, signed out asks to sign in and 401, a link to this machine is never opened, the rules answer 400, 10 an hour then 429); apps/api/src/events/engine/ai.test.ts (quote checks). The Bedrock call itself isn't run locally or in the end-to-end tests.
  • Observe: API log lines with bit: "submissions.create".
  • Status: verified — 2026-11-18 (end-to-end test)