mars
MARS-610
Reconcile 'principal' JTP checkbox on /docentes vs no-principal-JTP claim
Backlog normal
unassigned
User flagged: /docentes UI has a 'principal' checkbox per comisión-docente membership, contradicting a prior claim that Mars has no principal-JTP concept. Needs investigation: what the checkbox currently does (schema/behavior), whether the prior claim was wrong or the UI is stale/unused, and whether a real 'principal JTP per comisión' feature/invariant needs implementing or documenting. Not analyzed yet — investigate fully before implementing.
Questions
No questions.
Activity
-
Partial answer from the SOP-MARS-41 review (coder02-mars-cc, 2026-08-07), no dedicated investigation yet: the 'principal' checkbox is NOT stale or decorative - teacherComisionMemberships.isPrincipal is load-bearing in resolveCanonicalTcmTeachers (src/lib/student-assignment-tcm.ts), which ranks a comision's teachers by isPrincipal DESC, createdAt ASC and takes rn=1 as the canonical JTP/ayudante. It also drives an AMBIGUITY rule: >1 isPrincipal row for a role resolves that role to NULL + needsManualReview rather than picking one. So a per-comision principal DOES exist in the data model and in resolution semantics; what may not exist is a stated product concept/invariant around it. Measured same day: no mars comision has fewer than 2 active ayudantes (range 2-7), so the tiebreak runs for real. Still needs the full investigation this WI asks for - specifically whether the UI enforces at-most-one-principal-per-role, since the resolver treats >1 as an error state.
task
1w ago by wi-cli-venus
1w ago