Functional correctness
How completely the refactor preserves both public functions' observable behavior.
This test measures whether a model can improve internal structure exactly as requested while preserving already-correct observable behavior.
15 tested runtime routesTest assignment
The existing event-summary functions already behave correctly. The model must remove duplicated selection logic by introducing exactly one required private helper and routing both exports through it.
countByType and latestByType as the
only exports.
matchingValidEvents(events, type).
Each criterion receives 0–10. Public and objective checks remain separate from the manual score.
How completely the refactor preserves both public functions' observable behavior.
How safely it preserves invalid-input, timestamp-tie, and immutability behavior.
How well the shared helper removes duplication and makes the module easier to understand.
How precisely it follows the required helper name, export boundary, and allowed file.
Overall is the arithmetic mean of the four scores.