Skip to content

Align api.md section 8 and add heartbeat throttle - #45

Merged
iamharshtita merged 1 commit into
feat/read-apifrom
fix/api-doc-alignment
Nov 15, 2026
Merged

iamharshtita merged 1 commit into
feat/read-apifrom
fix/api-doc-alignment

Conversation

@iamharshtita

Copy link
Copy Markdown
Collaborator

What changed

Found by checking every endpoint in api.md sections 5 to 8 against the code and the synthesized API Gateway config:

  • Throttle the student heartbeat route at 30 requests per second (burst 60). The doc promised a moderate student limit, but only the read routes had one. New CDK test.
  • Section 8 table: reports-api also writes progress (reviews) and events (export audit). student-api has no events access until hints exist. The two authorizers are now listed. Throttle table added.
  • Section 7: replaced the stale cohort summary example with a real response from the tests, and fixed the throttling wording (per route, not per key).

Why

The doc and code disagreed in five places. Frontend mocks are built from api.md, so it needs to match.

How to test

cd backend && npm test && npm run test:py (17 CDK tests, 74 Python tests).

Remaining gap: POST /student/hints (stretch) is not built.

Stacked on #9.

A review of api.md sections 5 to 8 against the implementation found a stale table, a stale response example, and a throttle the doc promised for student heartbeats but the stack did not set.
@iamharshtita
iamharshtita merged commit 12210ed into feat/read-api Nov 15, 2026
1 check passed
@iamharshtita
iamharshtita deleted the fix/api-doc-alignment branch November 15, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant