Fix paginated Codex metadata and native-chat RPC image bounds - #13573
Conversation
📝 WalkthroughWalkthroughCodex parsing now uses dedicated consumers for response, completed-item, and legacy-event formats. Paginated histories record 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d1470b06-755e-409e-be52-971524c5be04
📒 Files selected for processing (6)
src/main/ai-vault/session-scanner-codex-message-records.tssrc/main/ai-vault/session-scanner-codex-parser.test.tssrc/main/ai-vault/session-scanner-codex-parser.tssrc/main/runtime/rpc/methods/native-chat-rpc-image-block.tssrc/main/runtime/rpc/methods/native-chat.test.tssrc/main/runtime/rpc/methods/native-chat.ts
d3e5792 to
e834179
Compare
e834179 to
47128df
Compare
Built-app proofValidated exact head
Representative passing run: page@3925c940fc4637d830bfb9ea742540f6.webm |
(cherry picked from commit 6206945)

Why this follow-up is needed
#13393 restored native-chat history across the three Codex transcript formats, but the readiness review found two related consumers outside that decoder:
response_itemmessage copies used for model context. The AI Vault session scanner is separate from the native-chat transcript reader and still consumed those copies. That could double-count messages and use model-only prompt text for the tab title, preview, or last-user-prompt metadata.data:URLs. The local Electron IPC path can render those bytes directly, but native-chat RPC also publishes the same blocks to mobile, web/runtime, SSH, and relay clients. One inline image could therefore turn a small history response into a multi-megabyte RPC frame.This PR closes those gaps so #13393 can be cherry-picked without leaving incorrect metadata or an unbounded remote payload path.
What changed
history_modewhile scanning session metadataitem_completedrecordsresponse_itemmessage copies while preserving unwrapped-response and wrapped-event legacy formatsdata:bodies, including URL-parser whitespace/control-prefixed formsUser impact
Compatibility
This is an additive hardening follow-up with no persisted-schema, route, RPC field, stream opcode, dependency, or protocol-version change. Existing image-ref fields are optional, and older clients already tolerate a fieldless image placeholder. Legacy Codex transcript modes retain their prior behavior.
Cherry-pick order
This PR is one commit intended to follow merged PR #13393:
If #13393 is already present, only cherry-pick
47128dfa168fd9db7186568fe5bef2bfa091477f.Validation
git diff --checkpasseddata:regression and resolved the review threadReadiness review