There is no analytics.service.spec.ts, analytics.controller.spec.ts, reputation.service.spec.ts, or reputation.controller.spec.ts anywhere in the repository — a full find across src/ confirms neither the analytics nor reputation module has a single spec file, stub or otherwise. This is distinct from #21 (which is about reputation snapshots being vulnerable to gaming, a specific exploit concern) and from #56/#20 (auth module coverage, general near-zero-coverage framing) — this is the narrower, concrete fact that two entire modules containing non-trivial aggregation logic (heatmap bucketing, top-client ranking, completion-rate/on-time-delivery percentage math, org/language extraction) have literally no automated test of any kind.
Given both services independently reimplement similar bounty-filtering-and-aggregation logic (forContributor and computeAndSave compute overlapping stats — merge rate/completion rate, avg review time — from slightly different code paths), the lack of tests means these two implementations can silently drift apart with no test to catch the divergence.
Fix: add baseline spec files for both services covering at minimum the merge-rate/completion-rate math, the heatmap date-bucketing, and the empty-input (zero bounties) edge cases where both currently short-circuit to 0.
There is no
analytics.service.spec.ts,analytics.controller.spec.ts,reputation.service.spec.ts, orreputation.controller.spec.tsanywhere in the repository — a fullfindacrosssrc/confirms neither theanalyticsnorreputationmodule has a single spec file, stub or otherwise. This is distinct from #21 (which is about reputation snapshots being vulnerable to gaming, a specific exploit concern) and from #56/#20 (auth module coverage, general near-zero-coverage framing) — this is the narrower, concrete fact that two entire modules containing non-trivial aggregation logic (heatmap bucketing, top-client ranking, completion-rate/on-time-delivery percentage math, org/language extraction) have literally no automated test of any kind.Given both services independently reimplement similar bounty-filtering-and-aggregation logic (
forContributorandcomputeAndSavecompute overlapping stats — merge rate/completion rate, avg review time — from slightly different code paths), the lack of tests means these two implementations can silently drift apart with no test to catch the divergence.Fix: add baseline spec files for both services covering at minimum the merge-rate/completion-rate math, the heatmap date-bucketing, and the empty-input (zero bounties) edge cases where both currently short-circuit to
0.