Repository navigation
fix(openrouter): preserve completed music when stream cleanup fails - #111056
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 10:46 PM ET / July 19, 2026, 02:46 UTC. Summary PR surface: Source +2, Tests +6. Total +8 across 2 files. Reproducibility: yes. with medium confidence: the PR supplies a concrete native Review metrics: none identified. 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: Land the narrow cancellation-error containment after the assigned reviewer confirms the current-head merge result and required checks; retain the existing lock-release and incomplete-stream error behavior. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence: the PR supplies a concrete native Is this the best way to solve the issue? Yes: once AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 836538339147. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2, Tests +6. Total +8 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
Review history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
24d74bc to
73cf2f2
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
73cf2f2 to
990c197
Compare
|
Merged via squash.
|
…penclaw#111056) * fix(openrouter): preserve completed music when stream cleanup fails * test(openrouter): clarify stream cleanup authority * test(openrouter): propagate stream cancellation
…penclaw#111056) * fix(openrouter): preserve completed music when stream cleanup fails * test(openrouter): clarify stream cleanup authority * test(openrouter): propagate stream cancellation
Additional instructions
Allow edits from maintainers is enabled for this PR.
What Problem This Solves
Fixes an issue where OpenRouter music generation could return a failure after a complete audio stream and [DONE] marker had already been received, when best-effort stream cancellation rejected.
Why This Change Was Made
The completed audio result now remains authoritative while reader cancellation is still attempted and awaited. Risk: cleanup must still run exactly once and release the reader lock; the regression and runtime proof cover both conditions.
User Impact
Users keep successfully generated OpenRouter music instead of seeing a cleanup error after generation has completed.
Evidence
Node v24.18.0 production-entry proof used buildOpenRouterMusicGenerationProvider(), a native Response/ReadableStream, and only replaced the network transport seam. The underlying cancel callback rejected after [DONE].
Before on ec998a0:
After on current upstream main plus this commit:
Focused regression:
The same test failed before the production change with promise rejected Error: cancel failed. Targeted oxfmt, direct oxlint, and git diff --check passed. The changed-check wrapper was blocked before reaching these files by current checkout plugin-SDK boundary DTS errors in packages/net-policy/src/ip.ts; full build/check/test are left to fork CI.
AI-assisted: Codex helped implement and review the change; the behavior proof was run manually.