Skip to content

Deployment blocker: consolidate Classroom API functions below Vercel Hobby limit #321

Closed

Description

@MajorIncident

Problem

Production is not currently publishing the merged Classroom work.

Vercel production deployments:

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 main SHA is Vercel production READY.

Closeout — production restored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions