diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 12:24:43 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 12:24:43 +0900 |
| commit | 9fd9deb8c8c8b8deb5a8094d27b9b49011a15572 (patch) | |
| tree | e7181279685c40b80be0b117f4ef0185e679d6e9 /scripts/probe-cache-warming.ts | |
| parent | 32cf1b6c4902e89247ff6a6b76100c41e0196d57 (diff) | |
| download | dispatch-web-9fd9deb8c8c8b8deb5a8094d27b9b49011a15572.tar.gz dispatch-web-9fd9deb8c8c8b8deb5a8094d27b9b49011a15572.zip | |
fix(metrics): tail-align when stepId matching fails — prevent misaligned turns
When stepIds are absent on persisted chunks (or don't match), the
sequential fallback was HEAD-aligning — matching the OLDEST entries
(trimmed turns) to the NEWEST segments. This showed 'turn 1' on turn 20's
content and placed the wrong metrics on the wrong segments.
Fix: when stepId matching produces ZERO matches, use TAIL-ALIGNMENT
instead — match the LAST T entries to the T segments (the loaded chunks
are always the newest). The oldest entries (trimmed turns) are unmatched
and emit standalone turn-metrics rows at the top.
686 tests green.
Diffstat (limited to 'scripts/probe-cache-warming.ts')
0 files changed, 0 insertions, 0 deletions
