# Batch enrollment verification

Verified locally on 28 October 2026. The running demonstration is `http://127.0.0.1:8097`, using `school_simulation`. Migration `2026_10_28_000006_add_batch_enrollment_workflow` is applied. No commit, push or production deployment was performed.

## Results

| Check | Result |
| --- | --- |
| TypeScript and Vite production build | Passed |
| SQLite suite | 46 tests, 869 assertions passed |
| Isolated PostgreSQL suite (`school_mvp_test`) | 45 tests, 868 assertions passed |
| Full desktop/mobile browser regression (`school_browser_test`, port 8098) | 23 passed; one duplicate mobile account-creation case intentionally skipped |
| Affected enrollment, Lecture/Laboratory editor and Student profile cases rerun after responsive card changes | 10 passed |
| Read-only desktop/mobile checks against the actual simulation on port 8097 | 8 passed |
| Pre-migration simulation preservation snapshot | 405 original rows and original column values retained |
| Separately retained original `school` database/private storage | 110 original records and 21 files checked; preserved |

The preservation checks permit additive columns/records and normal authentication remember-token rotation. Browser fixture writers explicitly require the isolated `school_browser_test` database; they refuse the user-facing simulation.

## Covered behavior

- Batch opening requires an authorized Branch calendar, school level and period; duplicate batches and closed-batch writes are rejected.
- Staff find or create a Student within a batch. Debt warns during preparation; blacklisting prevents progress. Restriction changes require School Administrator/Registrar permission and a reason.
- Course plans are resolved automatically. Separate Courses sharing a global Curriculum retain different Subject Plans; Course duration supports next-stage suggestions.
- Course subjects accept multiple Unit Types. Lecture/Laboratory credits total the academic credits; negative prices are rejected. Mixed per-credit/fixed charges calculate in cents and saved assessments retain their rates.
- Registrar approval is required for transfer credit decisions. Partial credits may explicitly complete a local subject with a reason; approved decisions cannot silently move to a different Course plan.
- Skipping Accounting saves pending enrollment and a Pre-COR without reserving Section/class places. Official COR issuance requires Finance clearance, completed transfer review and Registrar confirmation. Re-preparing the subject load invalidates its earlier review/assessment.
- Teacher/Student timetable checks, prerequisite rules, capacity controls, Teacher final-grade authority, grade locks, retained COR versions and Section membership history continue to pass.
- Mobile batch lists, Student enrollment lists and subject assessments expose their actions and amounts as cards. Desktop tables remain available.

## Manual scope

Rates begin at zero for school configuration. Quotes do not post charges or payments; Finance reviews payment conditions and records ledger entries manually. Academic amendments retain original financial evidence; Finance separately reviews any financial adjustments. Published Course plans remain locked. Quiz, grading-calculation, module, library and native-mobile features remain deferred.

See [workflow](batch-enrollment-workflow.md) and [ADR 0012](adr/0012-batch-enrollment-course-plans-and-unit-types.md).

## Eligibility and unfinished-removal follow-up

The reported Grade 11 Student appearing in a College batch was reproduced at both the picker and POST/wizard boundaries before the fix. Admission now has one shared rule across those boundaries and final readiness. The actual local Francis Bautista record was read as Senior high, Grade 11; its erroneous College application is marked ineligible and exposes the removal action.

Follow-up verification: full SQLite suite 54 tests passed; full PostgreSQL suite 53 tests passed. Final focused eligibility/removal cases passed on both engines (8 tests, 74 assertions each), including incomplete-versus-completed Grade 12 admission, transferee bypass rejection, audit retention, re-adding, financial-entry retention, and confirmed/out-of-Branch/unauthorized removal rejection. Desktop/mobile browser checks passed for the new picker/removal flow plus the existing College/High School end-to-end cycles (6 cases). Read-only simulation checks passed (10 cases); the reported Grade 11 case was checked again on desktop and mobile after tightening navigation synchronization. Preservation checks still pass for 405 original simulation rows and the separately retained original 110 records/21 files.

Removal is an audited cancellation of unfinished enrollment, not deletion of the Student identity. No schema migration was needed. No commit, push or production deployment was performed for this follow-up.
