Repository navigation
fix(browser): recover bounded backfill captures safely - #2824
Conversation
A service worker can stop between recording a bridge-sized capture and\npausing its job. Detect that durable hold before scheduling, fetching, or\nterminal completion and restore the operator-action pause.\n\nCo-Authored-By: Claude <[email protected]>
A malformed compact ChatGPT response is a provider contract failure for one\nqueue item, not a transport outage. Preserve that distinction and allow the\nremaining backfill queue to proceed.\n\nCo-Authored-By: Claude <[email protected]>
Capture fidelity is part of the durable backfill provenance. Preserve the\ncompact designation through acknowledgement, receiver retry, contract pause,\nand native-empty outcomes instead of restating native_full.\n\nCo-Authored-By: Claude <[email protected]>
Route bounded ChatGPT bridge projections through the envelope-turn parser\npath with explicit compact-native provenance, rather than treating the\nreduced mapping as a full native payload.\n\nAccount for the complete scripting result, classify browser-side size\nrejections without retry churn, and preserve the compact designation in\nthe backfill ledger.\n\nCo-Authored-By: Claude <[email protected]>
Expose the compact capture provenance flag from the browser parser module\nso strict type checking recognizes the cross-language parser contract.\n\nCo-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ 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 |
Summary
Carry the post-merge safety fixes for bounded ChatGPT browser backfill capture that were identified during cold review of the already-merged bridge-limit PR.
Problem
The original bridge-limit implementation compacted oversized source responses, but cold review found four completion risks: compact envelopes could be interpreted as a partial full-native mapping; fidelity could be rewritten to
native_fullin durable receiver paths; Chrome’s outer scripting-result boundary was not explicitly accounted for; and a service-worker stop between queue hold and job pause could make the job appear complete. A malformed compact mapping also entered transport retry/backoff instead of failing only that item.Solution
chatgpt-native-compact-v1artifacts through the envelope-turn parser path and emitcapture:browser-native-compact, rather than applying full-native ChatGPT parsing to a deliberately reduced mapping.native_compactthrough acknowledgement, retry, and empty outcomes.contract_drift, preserving zero transport retries and allowing later queue items to complete.Acceptance criteria
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; run20260713T044243Z-quick-1788143-981c83d8Anti-vacuity
The parser regression supplies a compact marker plus a conflicting raw mapping and proves the durable envelope turns win. The bridge-hold restart test persists the exact intermediate state then wakes a worker and asserts it performs no provider request. The contract-drift test processes a malformed item followed by a valid one and asserts the latter completes without a transport breaker.