fix(ollama): yield during dense stream processing#87818
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 31, 2026, 11:42 AM ET / 15:42 UTC. Summary PR surface: Source +47, Tests +86. Total +133 across 2 files. Reproducibility: yes. for the scoped dense Ollama stream path: current main parses all NDJSON lines from one body chunk without a cooperative wait, and the PR adds a regression test for timer progress before stream completion. The full Windows Gateway starvation scenario remains unverified in this review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge after a maintainer accepts the scoped Ollama proof and availability tradeoff, while keeping the broader Windows local-provider starvation issue open until all related paths are proven fixed. Do we have a high-confidence way to reproduce the issue? Yes for the scoped dense Ollama stream path: current main parses all NDJSON lines from one body chunk without a cooperative wait, and the PR adds a regression test for timer progress before stream completion. The full Windows Gateway starvation scenario remains unverified in this review. Is this the best way to solve the issue? Yes for the scoped Ollama native stream problem: bounded cooperative yielding mirrors the existing OpenAI transport cadence and preserves abort classification. It is not a complete solution for every local-provider starvation path in the related issue. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against e0e7bae61219. Label changesLabel justifications:
Evidence reviewedPR surface: Source +47, Tests +86. Total +133 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
78695aa to
a421761
Compare
da846ca to
c0f574b
Compare
5e82ef0 to
086c92c
Compare
c7181b1 to
0e486c8
Compare
ee47a2c to
3023487
Compare
623d5b2 to
41508c2
Compare
075f77c to
dd4520b
Compare
dd4520b to
4ee4bb4
Compare
b80967c to
3a478d7
Compare
3a478d7 to
d921190
Compare
|
Land-ready proof for d921190. Local proof after rebasing on current main:
Results:
Known proof gap: no live Windows/Ollama gateway reproduction was run here; this PR is scoped to the native Ollama dense NDJSON stream path and covered by the focused regression tests plus CI. |
Co-authored-by: uday <udaymanish.thumma@gmail.com>
Co-authored-by: uday <udaymanish.thumma@gmail.com>
Co-authored-by: uday <udaymanish.thumma@gmail.com>
Summary
Fixes part of #86599.
Verification
node scripts/run-vitest.mjs extensions/ollama/src/stream.test.ts --reporter=dotgit diff --check origin/main...HEADpnpm check:changedprovider=aws lease=cbx_2487c84328ab slug=violet-barnacle run=run_b85266d8d566 base=e18099b8c32420fa2ff5eddf8731e24c7278851b exit=0