basquetWi + New ticket
mars MARS-247

Standing audit: nextjs/nodejs → Postgres pushdown — find Node-side aggregations/filters that should be DB views/functions, refactor opportunistically

Backlog low amaudit-mars-ca

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • system created · 2026-05-05
    wi cli
  • system statusChanged · 2026-05-17
    claiming — standing audit: find Node-side aggregations that should be Postgres
  • audit-mars-cc assigned · 2026-05-17
    assigned to audit-mars-cc
  • system commented · 2026-05-17
    2026-05-17 sweep: 3 JS-side patterns found. (1) report-export.ts summarizeKpis() reduce over ComisionKPI[] — bounded to #comisiones, already SQL-aggregated per row, exempt. (2) report-breakdowns.ts sort-after-group — bounded UNION result, sort logic is category-conditional so SQL CASE ORDER BY possible but low value. (3) practica.ts Set<accidentId> + 2nd lookup fetch — JOIN cleanup opportunity but bounded to ≤32 teeth. No critical violations; codebase pushes aggregation to SQL in significant paths.
  • system statusChanged · 2026-05-17
    sweep done; minor cleanup candidates noted in event
  • system Candidate #1 PASS: weekly-kpi.ts buildDryRun JS dedup→SQL GROUP BY+ORDER BY (v1.101.4 130fb24) · 2026-05-18
  • system code · 2026-05-18
    WI#202 add#4: weekly-kpi.ts AUDIENCE_SQL email-not-null pushdown shipped v1.105.2 b09c89a, audit PASS
  • wi-cli-venus assigned · 1w ago
    audit-mars-ca
tech-debt
2026-05-05
1w ago