Remove inactivity-lifecycle source refs (auth/callback reset + poll-security-alerts user email routing) — PLUTO-627 code tail
SOURCE-side tail of the lifecycle-inactivity emergency retire (PLUTO-627 = db-lane: DROP fn_lifecycleInactivity + unschedule cron jobid 2 + clear flags). This WI removes the CODE so nothing can re-write the lifecycle columns or re-send an inactivity notice, unblocking db's column drop. Investigation done — exact scope (2 files): (1) src/app/auth/callback/route.ts lines ~283-314: remove the 'WI#121 clear inactivity lifecycle marks on login' block (BEGIN/setArchiveContext user:lifecycle:resetOnLogin/UPDATE users SET inactivityWarnedAt/GracedAt/DeactivatedAt=NULL/COMMIT). This is the ONLY source WRITE of the three columns; grep confirms NO other src reference (no admin component reads them), so its removal is what lets db drop the columns. (2) src/app/api/internal/poll-security-alerts/route.ts: remove the inactivity* branches — subjectFor() cases inactivityWarning/inactivityGrace/inactivityDeactivated, bodyFor() same three cases, and the userTargeted routing block (const userTargeted = alert.kind.startsWith('inactivity') ... toAddress = user email). Revert to operator-only drainer: all securityAlerts -> Elazar RECIPIENT, drop the per-user send. Defense-in-depth: even a stray/manual inactivity securityAlert can no longer email a real student the 'tu cuenta podria desactivarse' copy. EXCLUDED (verified not in scope): admin/inactividad page (computes inactivity from last-login threshold via getInactiveUsers, does NOT reference the lifecycle columns; harmless read-only view — keep); email.ts:765 (error-notify env toggle, unrelated). SEQUENCING: this push lands FIRST, THEN db drops the columns (auth/callback must stop referencing them before drop or runtime error). Coordinate with db-pluto-cc + audit-pluto-ca directly. CLASS-A (auth-adjacent + email-path): audit-pluto-ca design-ping pre-implement + diff review pre-push + Vercel PTD. Report to pm only at done or a real fork.
Questions
Activity
-
parent=#2247
-
Shipped in d2f4a8a (2026-07-21). Verified at HEAD: zero src refs to inactivityWarnedAt/GracedAt/DeactivatedAt or resetOnLogin; poll-security-alerts is operator-only (no userTargeted routing, no inactivity* subject/body cases); route.test.ts asserts both absences. db column drop already landed (5e58d7a).