How a candidate's request reaches the API, what the API is made of, where it keeps data, and how a change gets from a pull request to staging. Read from the repositories and the live staging endpoints.
Snapshot from 3 Nov 2026. Since then production has been promoted twice (327d740 on 5 Nov, f473294 on 6 Nov), so the production notes below are out of date. Scaling, rate limits and the database setup have not been re-checked. For how a request is answered step by step, see the answer pipeline.
staging ac49636 · released 07:40 WAT 3 NovNLP gpt-5-miniASR gpt-4o-transcribeTTS Polly neuralpods 0–6, scale to zeroproduction 5834fb6 · 22 Sep
System drawing
Request pathExternal AI providersStorage and configBehind staging
On a phone, scroll the drawing sideways. Teal arrows are the request path. Grey arrows are what the pod calls or reads.
Session records and recordings in Postgres and S3.
services/assistant
Intent, safety and presentation rules for tutor answers.
How a patient reply is checked
Each candidate question goes through these stages in order and stops at the first reply that passes. Every stage is recorded as an audit span in the session trace.
draft
The model answers in character from the station's case facts.
clean_retry
If the draft breaks a rule (reveals too much, wrong voice), the model tries once more with the reason.
repair_example
Falls back to the station's own example reply for that fact. Since PR 364, copied or third-person examples are rephrased in the first person.
repair_value
Last resort: the fact itself, turned into first-person speech.
Station saves now reject an example that copies its notes or talks about the patient in the third person (422 unspeakable_example_responses).
From pull request to staging
CI on the pull request~6 minBackend tests and avatar demo build on GitHub Actions, plus the CodeBuild staging check. The PR needs one release:* label.
Merge to mainThe automatic push run is skipped on purpose.
Dispatch "Staging release"~3 mindeploy.yml from main builds once and pushes an immutable digest to ECR.
Infra records the digest~12 minmedicaitutor-infra commits it to the rendered manifest, and Argo CD rolls it out.
Continue staging release~21 minFour validation jobs run against the live staging pods, then one attest job.
Promote to productionmanualTakes the same attested digest. No rebuild.
Times are from the 31 Oct release of 34ad72b.
Things to watch
Production is six weeks behindIt still runs the 22 Sep image. None of the October patient, grading or station fixes are there.
Rate limits are a stopgap3000 HTTP and 600 WebSocket per minute, because every Quluub user arrives from one Railway address.
Cold startsWith no traffic the API scales to zero. The first request after idle waits for a pod (readiness timeout 300 s).
One shared OpenAI balanceStaging traffic, release gates and local tests draw from the same credit and limit.
Postgres runs inside the clusterA single StatefulSet on Spot capacity rather than a managed database.