Repository navigation
fix(codex): read Zstandard-compressed rollouts - #1786
Merged
Merged
Conversation
This was referenced Oct 21, 2026
iamtoruk
force-pushed
the
fix/codex-zstd-rollouts
branch
from
October 26, 2026 01:21
24d43bf to
6682c9f
Compare
Codex now moves cold rollouts to rollout-*.jsonl.zst. Discovery, the first-line probe, the parser, fork parent lookup, codex-tps and the context view read them through a zstd decode; a session present in both forms counts once from the plain file. Compressed files are parsed whole and never resumed by byte offset. Without node:zlib zstd (Node < 22.15) they are skipped with one notice. DAILY_CACHE_VERSION 76 so settled days pick up the recovered Codex usage. Without zstd it stays 75, so a later Node upgrade still adopts that cache and re-derives it.
iamtoruk
force-pushed
the
fix/codex-zstd-rollouts
branch
from
October 26, 2026 01:26
6682c9f to
aa73cd6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rollout-*.jsonl.zst, which CodeBurn skipped, so most Codex history disappeared from reports. Every Codex reader (discovery, parser, fork lookup, codex-tps, context view) now decodes them..zstprints a visible warning; usage after the damaged part is not counted.node:zlibzstd), compressed rollouts are skipped with one notice. Results there match current main, and the daily cache stays at version 75, so a later Node upgrade adopts it and re-derives the settled days.DAILY_CACHE_VERSIONgoes to 76 so settled days pick up the recovered usage.Testing / Verification
npm testpassesnpm run buildsucceedsReal
~/.codexwith 1,436 compressed and 6 plain rollouts, 2026-01-01 to 2026-10-25:node:zlib, the export matches main exactly, prints the notice once and writes a v75 cache; the next run with zstd adopts it and reaches $4,842.39.