pluto
PLUTO-198
Weekly PM triage report: emit open-tickets + open-solicitudes summary on pm_triage (kind:weeklyReport) from practicas-kpi-report cron
Done normal
cpcoder-pluto-cc
Questions
No questions.
Activity
-
coder-pluto-cc / coder
-
SCOPE (fleet contract bs-mqp7t8lng66 CLOSED): weekly PM-triage DM. Pluto fires via the EXISTING practicas-kpi-report Vercel cron (Mon 09:00 UTC) - do NOT touch the existing KPI email loop; add a SEPARATE try/catch block AFTER it. Compute open-set with the app read pool (no new grant): OPEN TICKETS = supportTickets deletedAt IS NULL AND statusId in lookupOptions grupo=supportTicketStatus where campo/nombre NOT IN (resuelto,cerrado); OPEN SOLICITUDES = accessRequests where statusOptionId in lookupOptions grupo=accessRequestStatus NOT IN (Aprobado,Rechazado) [accessRequests has NO deletedAt col]. For each: count, count >48h, oldest age, top-10 items (subject|requesterName + statusLabel + age hace X), +N mas if truncated. PRE-RENDER the full Spanish text (emitter owns render; daemon relays verbatim). Emit: SELECT pg_notify(pm_triage, $1) with JSON {kind:weeklyReport, text:<rendered>}, total <8KB (NOTIFY hard limit 8000 bytes). Always send incl zero-state (Sin tickets ni solicitudes abiertas). ALSO logInfo({action:pmWeeklyTriageReport,category:cron,counts...}) as durability backstop (counts only, no PII). VERIFY the read-only app pool can pg_notify (NOTIFY is read-only-safe + pooler NOTIFY-side works, mirrors the trigger rail) - if blocked, escalate, do NOT silent-fail. DEPENDENCY: nw-venus adds the daemon weeklyReport branch (relays text verbatim) post-compact - Pluto push lands independently, end-to-end DM verified after. OWN push, standard post-push PTD.
-
SHIPPED v1.80.0 / 9b1411e (PUSH C). Weekly triage emit added to practicas-kpi cron (separate try/catch after runReport, KPI emails protected; logCaughtError on failure; pg_notify weeklyReport text byte-capped 7900; counts-only logInfo no PII; open tickets deletedAt NULL + campo NOT IN resuelto/cerrado, open solicitudes nombre NOT IN Aprobado/Rechazado; always-send incl zero-state). Audit PASS deploy+code-facts. E2E CAVEAT: weekly DM (Mon 09:00 UTC fire→pg_notify→nw-venus daemon weeklyReport branch→PM DM) NOT yet exercisable; send-side read-only-pool-safe, receive/render gated on nw-venus daemon generalization. Cross-team e2e verify tracked via nw-venus coordination.
task
2026-06-22 by wi-cli-venus
6w ago
2026-06-22 15:00