pediatric-ai-scribe-v3/scripts
Daniel 993442f98a feat: the API describes itself, at /api/openapi.json
docs/api-reference.md was hand-written, and by the time anyone checked
it was documenting twenty-three endpoints that answer 404 while missing
others that exist. That is what hand-written reference material does: it
is correct on the day it is written and silently wrong afterwards. A
second hand-written document, in YAML this time, would rot the same way.

So paths, methods and mount points are read from the Express router
stack at request time. They cannot disagree with the app, because they
are the app: 186 paths, 215 operations, and — checked — no /learning
endpoints, which is what the prose version went on claiming for weeks
after that feature was deleted.

What introspection cannot know is what an endpoint is *for*. That half
lives in src/utils/openapiRoutes.js, keyed by "METHOD /path", and it is
the half that rots, so it is the half that is enforced: a Playwright
spec fetches the live document and fails when the number of operations
without a summary rises above 199 — the debt as measured today. A
ratchet, not a target. Adding an endpoint pushes the count over and
fails the build; describing one lowers the number. The failure lists the
operations by name, so it says what to write.

Whether an operation is public is stated per route rather than inferred
from middleware. Guessing wrong there is worse in both directions:
calling a public endpoint protected hides a hole, and the reverse
invites a bug report.

The contract spec lives in e2e rather than the unit suite because it
needs the whole app mounted, and requiring server.js from node:test
pulls in the database pool and hangs the run — that has happened here
before.

Also: e2e now runs in CI on dev, gated by a shell check inside the step
rather than a job-level "if", which this Forgejo dispatches anyway and
then kills with "Early termination".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-13 00:52:55 +02:00
..
build-image.sh docs: deploy.sh is the deploy path, and it was documented nowhere 2026-09-12 06:04:13 +02:00
deploy.sh feat: a deploy you can repeat, and prove afterwards 2026-09-11 00:41:11 +02:00
e2e.sh feat: the API describes itself, at /api/openapi.json 2026-09-13 00:52:55 +02:00
enable-audio-backup-bucket.js chore: script to move audio backups onto MinIO; record where things stand 2026-09-10 17:00:02 +02:00
import-milestones.js Add admin dashboard for developmental milestones management 2026-03-31 20:55:41 +00:00
lint-references.js harden logging and observability 2026-05-08 19:08:19 +02:00
maintenance.js Maintenance CLI + unpin postgres digest 2026-04-14 04:00:13 +02:00
release.sh ci: fix the failing job, split deploy out, and drop the Android build 2026-09-12 23:30:52 +02:00
render_docx.py feat: Word is built by python-docx from the same typed source as the deck 2026-09-11 21:58:53 +02:00
render_pptx.py fix: an assistant attachment must be the image type it claims to be 2026-09-12 19:00:10 +02:00
schema-state.js test: e2e runs against its own throwaway database, not production's 2026-09-13 00:49:25 +02:00
test-generated-images.sh feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00