Repository navigation
fix(browser): bound oversized backfill conversations - #2823
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe backfill bridge now enforces separate ChatGPT response limits, compacts valid conversations, propagates capture fidelity, and handles oversized responses through a paused ChangesChatGPT bridge backfill
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ChatGPT
participant PageTransport
participant BackfillCoordinator
participant BackfillStore
participant Popup
ChatGPT->>PageTransport: return conversation response
PageTransport->>PageTransport: enforce limits and compact conversation
PageTransport-->>BackfillCoordinator: return capture or bridge oversize error
BackfillCoordinator->>BackfillStore: hold item and pause job
BackfillStore-->>Popup: expose bridge cooldown state
Popup->>BackfillCoordinator: request explicit resume
BackfillCoordinator->>BackfillStore: requeue item as eligible
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Problem: full ChatGPT conversation mappings above the 32 MiB scripting\nbridge cap were treated as transport failures and retried without an\noperator-visible recovery path.\n\nWhat changed: compact bounded ChatGPT conversation projections inside MAIN\nworld, retain separate source and bridge limits, and hold any remaining\noversize item until explicit resume.\n\nCo-Authored-By: Claude <[email protected]>
The compact ChatGPT bridge payload must permit valid conversation text\nthat exceeds a conservative initial limit while remaining below Chrome's\n32 MiB scripting-result constraint.\n\nUse a 24 MiB compact projection bound with 8 MiB headroom and exercise\nboth a successful >8 MiB projection and the fail-closed upper bound.\n\nCo-Authored-By: Claude <[email protected]>
2c8dfaa to
d0563c6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c8dfaa05f
ℹ️ 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".
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Make ChatGPT conversation backfill survive oversized source responses without sending a full raw conversation through Chrome’s scripting-result bridge.
Problem
The paused ChatGPT backfill has four remaining retries; two failed at Chrome’s 32 MiB bridge. The provider endpoint returns a complete conversation mapping plus non-conversation metadata. The old page transport returned that raw JSON through
chrome.scripting.executeScript, so the bridge—not provider auth or the daily policy—rejected the capture.Solution
native_compactpluscapture:browser-native-compact, never a false native-full or DOM-fallback label.Acceptance criteria
executeScriptrejection regressionsProposed Bead (not created)
The shared
.beads/issues.jsonlis staged/owned by another publisher, so this PR records the proposed P1 instead of racing that state:Recover oversized browser backfill captures through bounded MAIN-world projectionScope: the acceptance criteria above and controlled operational verification of the four paused ChatGPT retries after an explicit extension reload. Non-goal: this PR does not reload the extension, resume the live job, mutate browser profiles, or alter daemon services.
Verification
npm test -- --run tests/page_transport.test.js tests/backfill.test.js tests/popup.test.js tests/background.test.js— 125 passednpm run lint— cleannpm run validate—manifest okdevtools test tests/unit/sources/test_browser_capture.py -k compact_chatgpt_projection_uses_envelope_turns— 1 passed, 32 deselecteddevtools verify --quick— success; run20260713T043804Z-quick-1781436-c43168c3npm test && npm run lint && npm run validate— 210 passed, lint clean, manifest validAnti-vacuity
The transport regression executes the production MAIN-world request function and proves a declared over-32 MiB source becomes a compact result rather than raw bridge data; removing the projection or source bound fails it. The browser-side size-rejection test drives the real background
executeScriptfailure path into an operator hold. The cross-language regression gives a compact envelope a conflicting raw mapping and proves the Python parser uses the durable envelope turns and compact provenance instead.