Skip to content

feat: compress rollout files#16338

Open
jif-oai wants to merge 7 commits intomainfrom
jif/compressed-rollouts
Open

feat: compress rollout files#16338
jif-oai wants to merge 7 commits intomainfrom
jif/compressed-rollouts

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Mar 31, 2026

Compress rollout files using ZSTD. I chose ZSTD because you can append to the compressed payload

On my local ~/.codex this is a 76% compression

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Mar 31, 2026

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

let text = tokio::fs::read_to_string(path).await.ok()?;

P2 Badge Decode compressed rollouts before parsing latest cwd

New rollouts are now created as .jsonl.zst, but this function still reads the file with tokio::fs::read_to_string. For compressed files that returns an invalid UTF-8 error, so parse_latest_turn_context_cwd returns None and latest_thread_cwd falls back to stale thread metadata. That can make resume --last/cwd filtering pick the wrong thread after in-session cwd changes.


let text = tokio::fs::read_to_string(path).await.ok()?;

P2 Badge Read zstd rollout when deriving TUI TurnContext state

read_latest_turn_context now fails on newly compressed rollout files because it uses read_to_string on .jsonl.zst. When state DB is unavailable, read_session_model/read_session_cwd can no longer recover the latest TurnContext, so resume/fork flows may silently fall back to defaults or initial session metadata instead of the last persisted context.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Mar 31, 2026

Indeed I have to fix backward compatibility with resume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant