Repository navigation
Deployment blocker: consolidate Classroom API functions below Vercel Hobby limit #321
Description
Problem
Production is not currently publishing the merged Classroom work.
Vercel production deployments:
- Add Instructor-run live classroom management #314 merge
b141d55050207e4cf7ce842a4452a220a5268968-> ERROR - Add staged classroom simulation and debrief orchestration #315 merge
7c6afa4069ac5de5eae8ec0c9b0959084650c93a-> ERROR
Vercel reports:
No more than 12 Serverless Functions can be added to a Deployment on the Hobby plan.
The last READY production deployment is #308 at 6c58336ac1677764641c09eadb201abcad8eeac1.
This is a deployment-architecture limit, not a GitHub CI/product-test failure.
Cause
The Classroom API grew through safe, focused route files. At #308 the repository had 15 JavaScript files under api/, with helper/server-only modules not emitted as route functions and 11 routable endpoints. #312 added four live-management route entrypoints; #313 added four staged-exercise route entrypoints. The resulting routable function count exceeds the Hobby limit.
Goal
Preserve all existing public API URLs and authorization behavior while reducing emitted Vercel Serverless Functions to <=12, preferably with substantial headroom.
Preferred architecture
Consolidate Classroom route entrypoints behind one Classroom dispatcher/serverless function and Vercel rewrites, while keeping the existing domain handlers in api/_classroom.js, api/_classroomExercise.js, and api/_protectedCaseStudies.js.
- clients keep their existing URLs;
- rewrite only at deployment routing;
- dispatch to the existing handler factories;
- keep workspace collaboration routes separate;
- helper modules remain server-only;
- add guard/tests that fail if the emitted/routable function count grows beyond the Hobby budget again.
Must preserve
- Instructor vs Student capability isolation;
- Student non-enumeration;
- stable Student class-session vs workspace-edit authority;
- protected Case Study access and staged full-payload denial;
- exercise lifecycle/revision semantics;
- checkpoint authorization;
- HTTP 423 frozen Student write policy;
- Standalone/ad-hoc collaboration routes;
- deterministic browser fixture paths;
- no public protected-case leakage.
Deployment acceptance
- GitHub quality/browser/security checks green;
- Vercel production deployment for the hotfix merge reaches READY;
- production deployment corresponds to the exact main commit;
- protected authored template JSON/internal docs remain absent from public static output;
- production runtime error scan is clean after deploy.
Priority
P0 publish blocker. Complete this before #316.
Active recovery PR
- PR Consolidate Classroom API to restore Vercel production deployment #322 — Consolidate Classroom API to restore Vercel production deployment
- Branch:
fix/vercel-classroom-function-budget - Public URLs remain unchanged through Vercel rewrites.
- Current conservative deployable function count after consolidation: 5 / 12.
- Do not close this issue until the exact merged
mainSHA is Vercel productionREADY.
Closeout — production restored
- PR Consolidate Classroom API to restore Vercel production deployment #322 merged to
mainas21bff1d1c5a70caff0aa94aadd58abcb0644f397. - Exact PR-head verification deployment
dpl_87aJLUvqaSc3wQ45gecTiGVMdCVqreached READY fromverify/function-budget-hotfixat9094a3fa2a56c8720e9c149278ef03165ecd0b17. - Verification build reported 5/12 conservative Serverless Function candidates and re-verified the protected/public Case Study boundary.
- Exact merged-main production deployment
dpl_VZoSoWJsDs6Eb727EN5hmrFSgAcAreached READY for21bff1d1c5a70caff0aa94aadd58abcb0644f397. - Post-deploy Vercel runtime-error scan: clean.
- Classroom follow-on: Instructor-run live class, roster, and dynamic team management #312/Classroom follow-on: Instructor-orchestrated case simulation and staged debrief #313 Classroom functionality is now production-published.
- Classroom follow-on: Protected staged case assets and rich Student case rendering #316 is unblocked and becomes the next implementation issue.
Activity