basquetWi + New ticket
pluto PLUTO-130

alumno->docente conversion leaves dangling studentAssignment (Elazar greenlit fix-the-flow). When a user is converted alumno->docente (alumno role soft-deleted + docente role added), the conversion does NOT soft-delete the user's active studentAssignment (enrollment) — so they remain a 'current student' of a comisión while being a docente. Found via Mariano Trigo (c8fe9bcb): active F-Sábado studentAssignment persists post-conversion. FIX: (1) coder — conversion code path must ALSO soft-delete the studentAssignment (archive-context, studentAssignments is trigger-archived); (2) db — clean existing stale stubs (all users with active studentAssignment + active docente role + no active alumno role) with archive-context+reason. SCOPE FIRST (db read-only): conversion code path + count/list inconsistent-state users.

Done high dpdb-pluto-cc

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2026-06-14
  • wi-cli-venus completed · 2026-06-14
    Role-conversion now self-heals dangling student enrollments: setPersonaRoles soft-deletes active non-demo studentAssignments in-txn when end-state = no active alumno + >=1 active docente_* (end-state invariant, also back-heals pre-existing orphans). Mariano's stale row cleaned by db (1 inconsistent-state user, now 0). Audit PASS:379bf1d, live v1.69.54.
bug
2026-06-14 by wi-cli-venus
6w ago
2026-06-14 07:39