Repository navigation
Add student player API and session authorizer - #7
Merged
Merged
Conversation
Implements api.md section 6: home with resume pointer, sanitized module payloads, ordered activities, server-side grading, once-only assessments, idempotent submits, worksheet drafts and heartbeats. The authorizer resolves session tokens and rejects expired, reset or inactive students.
|
👋 Quick PR hygiene check (nothing is blocked):
Small PRs with short, clear descriptions are what judges and recruiters read. See |
This was referenced Nov 14, 2026
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Implements api.md section 6 (
student-apiLambda) plusauthorizer-student:GET /student/home: module states and the resume pointer. Late joiners start at their start module, earlier modules showcatch_up.GET /student/modules/{id}: module with answer keys and explanations stripped. Locked modules return 403MODULE_LOCKED.POST .../submit: server-side grading, ordered activities (ACTIVITY_LOCKED), pre and post tests recorded once with no feedback,clientSubmissionIdreplay, worksheets split into auto-scored and review-queue fields.POST .../heartbeat(capped at 45s credit),PUT .../draft,POST .../complete(minimum time for video).authorizer-student: resolvesSES#<sha256(token)>to studentId and classId. Denies expired sessions, reset credentials (credVersionmismatch) and inactive students. Fails closed. 60 second cache.StudentPlayerApiconstruct (least-privilege grants, no wildcards), authorizer wiring, and a test that Python and CDK route keys match.Why
This is the core of the Sunday demo: a student works through a module alone and the next one unlocks.
How to test
cd backend && pip install -r requirements-dev.txt && npm test && npm run test:pyNotes for the login endpoint (section 1)
The session item contract is now in architecture.md section 6:
SES#<sha256(token)>withstudentId,classId,credVersion,ttl.Stacked on #6. Merge #5, then #6, then this.