Commit Graph

5 Commits

Author SHA1 Message Date
can1357 b0420f1053 test(stats): align large-session newOffset with lenient parser (PR #3735 merge) 2026-06-29 16:53:40 +02:00
can1357 a402486d9a Merge PR #3735: fix(stats): avoid macOS stats sync worker abort (@roboomp)
# Conflicts:
#	packages/stats/src/parser.ts
#	packages/stats/test/parser-large-session.test.ts
2026-06-29 16:48:59 +02:00
roboomp 9abea02420 test(stats): isolated stats tests from xdg-shared db
Stats tests set PI_CONFIG_DIR + setAgentDir(home/<config>/agent), which resolves equal to the default agent dir and routes stats.db through $XDG_DATA_HOME/omp/stats.db whenever an XDG var is set, leaking rows across tests. The shared installStatsTestIsolation helper now snapshots and clears XDG_*_HOME with PI_CONFIG_DIR on each test, points the agent dir at a fresh TempDir, closes the DB handle, and restores the prior env after the test.
2026-06-29 10:59:06 +00:00
can1357 de9a1f79f9 fix-stats-large-jsonl-parse 2026-06-28 18:41:07 +02:00
roboomp efb96b123f fix(stats): avoided native jsonl parser trap
Replaced the stats session parser's Bun.JSONL.parseChunk path with a lenient JS line scanner so large session files do not enter the native parser before /stats launches.

Fixes #3733
2026-06-28 16:29:19 +00:00