-
Couldn't load subscription status.
- Fork 1
Description
The current array matching logic, which finds the first new array that shares at least one key with an old array (commonKeys.length > 0), could be fragile. If an old array could potentially match multiple new arrays, this logic will arbitrarily pick the first one it finds. This may not be the best match (e.g., the one with the most overlap), which could lead to inaccurate object change counts.
Consider a more robust matching strategy, perhaps by calculating an "overlap score" (e.g., based on the number of common keys) and choosing the pair with the highest score. This would make the statistics more reliable, especially for complex diffs.
Originally posted by @gemini-code-assist[bot] in #25 (comment)