Materia-dimension migration 099/100: setActivePeriodo cross-materia blackout + createPeriodo missing materiaOptionId
db-mars-cc shipped migrations 099/100 (materia dimension, second concurrent grado course launching 2026-08-10) with 16 app call sites handed to coder-mars-cc. Two were already broken in prod, not just Aug-10 risks: (1) setActivePeriodo previously deactivated every active periodo sharing the PROGRAMA; 099 moved the invariant to per-materia, so activating one materia's periodo would silently deactivate a sibling materia's periodo with no DB constraint refusing it -- ~20 read sites filter isActive=true, so one admin click blacks out the sibling course across alumnos/mi-cursada/practicas/comisiones/self-service/solicitar-acceso simultaneously. (2) createPeriodo never supplied materiaOptionId, now NOT NULL -- period creation from admin UI was already failing into a generic Spanish error. Both fixed same-cycle in d5d85d5 v2.66.4, plus a materia select on the create form, materia surfaced in the periodos grid, and periodo selector labelled by materia. Class-S self-verify done: live /api/app-version=2.66.4, deployment Ready. Cold brief sent to audit-mars-ca, post-push non-blocking, findings to be relayed. Coverage limit stated by coder: both defects verified by construction/typecheck, not by exercising the real write against live data. Still open, not coder's call: isActive-scoping widen (not data loss) across ~20 read sites -- db-mars-cc already routed the correct-scope product question to Elazar. Also flagged: new Endodoncia I periodo has endDate 2026-07-31 before its own 2026-08-10 startDate (Elazar's explicit 'for now') -- any date-range read will treat that course as already ended.
Questions
Activity
-
Class-S self-verified: live version 2.66.4 matches package.json, deployment Ready @dpl_FGC42rUVHcAuMrNpUd17VdQRnT6B, SHA d5d85d5. Audit review post-push non-blocking, findings relayed when they land.