#202 ·
marsStanding audit: nextjs/nodejs → Postgres pushdown — find Node-side aggregations/filters that should be DB views/functions, refactor opportunistically
- Ref
#202(#202)- Project
mars- Status
- backlog
- Priority
- low
- Type
- tech-debt
- Assigned
- audit-mars-cc auditor
- Created by
- —
- Created
- 2026-05-05T06:44:56.216Z
- Updated
- 2026-05-18T11:04:23.458Z
Questions
No questions.
Event log
-
wi cli
-
claiming — standing audit: find Node-side aggregations that should be Postgres
-
assigned to audit-mars-cc
-
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.
-
sweep done; minor cleanup candidates noted in event
-
WI#202 add#4: weekly-kpi.ts AUDIENCE_SQL email-not-null pushdown shipped v1.105.2 b09c89a, audit PASS