fix: avoid search/embedding coalesce poison after last-waiter abort#1212
Conversation
Delete dying search/embedding inflight map entries when the last waiter disconnects, and ceil fractional PDF render dimensions before the safe-integer pixel budget check.
|
Warning Review limit reached
Next review available in: 13 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: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ 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 |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Close without merge: tip is stale/conflicting and the remediation family already landed on main; live coalesce/PDF fixes stay in #1212.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Hygiene review (2026-07-26): GitHub reports CONFLICTING/DIRTY and update-branch returned 422. Local merge-tree against origin/main needs a human sync in a worktree (do not force). This PR is the clean coalesce fix-forward — keep open, merge origin/main and resolve, then push. Not closing. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex resolve merge conflict and tell me if this is worth merging |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…e-main-4711 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Found while reviewing PR #1196 (now closed as superseded by #913 / current
main). The same cancel/PDF defects were already onmain.When the last waiter disconnects from a coalesced search or query-embedding flight, the shared producer is aborted but the map entry stayed until the producer's
.finallyran. A healthy same-key retry could join the dying promise and fail (AbortError/ search HTTP 500) even though its own signal was live. Answer coalescing already recovered from foreign aborts; search/embed did not.Also fixes fractional PDF render dimensions (
100.5×100.5) being rejected byNumber.isSafeInteger(pixels)and aborting the whole JS PDF fallback.Verification
tests/openai-cache.test.ts,tests/pdf-extraction-budget.test.ts,tests/private-access-routes.test.ts— 163 passednode scripts/repro-coalesce-poison-race.mjs(buggy poisoned / fixed recovers)PR requiredSUCCESS)Risk and rollout
maxRenderPixels.Clinical Governance Preflight
Notes
CONFLICTINGand superseded by Fix repository regression findings #913; remote branch retained (no delete).mainfor the residual live defects.RAG impact: no retrieval behaviour change — cancel coalescing + PDF render budget validation only