You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: stop dropping analytics instances larger than ~100k rows (#87)
`downloadInstanceRows` appended parsed rows with `rows.push(...parseTsv(tsv))`.
The spread passes every row as a separate argument, so once an instance holds
roughly 100k+ rows the call exceeds the engine's argument-count limit and
throws "RangeError: Maximum call stack size exceeded" (V8 reports the
argument-count limit under that message; it is not stack recursion).
The throw is caught by the `Promise.allSettled` handler in `fetchReportData`,
which logs "instance download failed (data may be incomplete)" and skips the
instance. Sync still reports success, so the report silently loses that
instance's history.
ONE_TIME_SNAPSHOT instances carry an app's whole history in one segment and
routinely exceed the limit. On a real account this dropped every historical
instance for the high-cardinality reports while the low-volume ones were
unaffected:
App Downloads 10 dates -> 636 dates (343,904 rows)
Discovery and Engagement 11 dates -> 637 dates (398,161 rows)
Installation and Deletion 13 dates -> 634 dates (210,623 rows)
Sessions 636 dates -> 636 dates (unchanged, 85,039 rows)
Replace both spreads with a `pushAll` helper that appends element by element.
The same pattern was used when appending a single date's rows to the deduped
array, so that call site is changed too.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments