Commit Graph

8 Commits

Author SHA1 Message Date
Aditya Ujeniya e37b2e71a6 feat(metricstore): compute buffer stats eagerly on checkpoint load 2026-07-20 10:49:24 +02:00
Aditya Ujeniya 650db33b22 docs(metricstore): fix misleading comment in stats fast-path test 2026-07-20 10:47:33 +02:00
Aditya Ujeniya 9d5268a828 fix(metricstore): guard stats fast path against empty buffer
Add len(b.data) > 0 guard to prevent infinite loop when an empty linked
buffer is reachable. With the guard false, the normal path handles empty
buffers safely via the existing t < b.start || idx >= len(b.data) check.

Add regression test TestStatsFastPathThenPartialTail to pin the boundary:
three-buffer chain where earlier buffers are fully covered (fast path) and
the last buffer is partially covered (normal path).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:43:43 +02:00
Aditya Ujeniya 9eb6d0e83e feat(metricstore): serve full-buffer stats from cached aggregate
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:30:42 +02:00
Aditya Ujeniya b6a9f7ed3c feat(metricstore): add recomputeStats full-scan helper 2026-07-20 10:26:30 +02:00
Aditya Ujeniya 5ff376c742 style(metricstore): gofmt stats_test comment alignment 2026-07-20 10:25:16 +02:00
Aditya Ujeniya 931a2a6e79 feat(metricstore): maintain running buffer stats on write 2026-07-20 10:22:16 +02:00
Aditya Ujeniya aa61ccb88b feat(metricstore): add running-stat fields to buffer
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:17:12 +02:00