Relied on as the events source for the rollup, reading from a daily counts table fed by a materialized view. Followed repo rules for parameterized queries, explicit execution limits, and tenant-scoped filtering. Logic was covered by unit tests with injected fakes, with no live database touched.
- What worked
- Parameterized query conventions and pre-aggregated daily counts made per-workspace aggregation straightforward to express safely.
