Repository navigation
fix(codex): stream large session files - #1123
pretendhigh wants to merge 1 commit into
Conversation
Read Codex JSONL sessions through a buffered line reader instead of loading each file into memory at once. This keeps codex reports usable when a session file grows to multiple gigabytes while preserving the existing line-level parsing, model tracking, and usage aggregation behavior.
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactored Codex session file parsing to use streaming ChangesCodex Streaming Parser
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
@pretendhigh I have started the AI code review. It will take a few minutes to complete. |
🧩 Analysis chain🏁 Script executed: Length of output: 6148 🏁 Script executed: Length of output: 21859
Review of
|
|
Historical audit: this pull request was auto-closed by the legacy contributor gate. That closure did not assess technical importance. Audit result: needs review. The current state does not prove resolution, but a fresh technical or product check is required before deciding whether the underlying request is still relevant. This closed PR will not be revived as-is; create a new PR only after reviewing the related issue and current |
Streams Codex JSONL session files through a buffered line reader instead of reading each file fully into memory. This keeps
ccusage codex dailyusable when local Codex sessions grow to multi-GB files while preserving the existing token-count parsing, model tracking, and aggregation behavior.Testing:
Summary by cubic
Stream Codex JSONL session files with a buffered line reader instead of loading whole files into memory. This keeps
ccusage codex dailyusable with multi‑GB session files while preserving token parsing, model tracking, and aggregation.BufRead/BufReaderto keep memory usage low.visit_codex_session_readerand a streaming test to verify parsing.Written for commit 0035388. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
Refactor
Tests