Repository navigation
Conversation
… responses Per OpenAI streaming spec, finish_reason must appear only on the final chunk at choices[0] level with an empty delta, not mixed into content chunks. Split writeAssistantContentChunk (always finish_reason: null) from a new writeAssistantFinishChunk (empty delta, finish_reason: stop). Emit the finish chunk from the lifecycle end handler, the error path, and the finally fallback path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 5:38 AM ET / 09:38 UTC. Summary PR surface: Source +18, Tests +24. Total +42 across 2 files. Reproducibility: yes. source-reproducible: current main still sends generic streaming internal-error content in the same content choice as Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Rebase or replace the branch around current main's Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main still sends generic streaming internal-error content in the same content choice as Is this the best way to solve the issue? No, not as written. The useful fix should be applied through current main's finalizer so usage chunks and Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cf2efbe5d515. Label changesLabel justifications:
Evidence reviewedPR surface: Source +18, Tests +24. Total +42 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
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
@niuma996 thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward. Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive. Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(gateway): separate finish_reason from content chunks in streaming This is item 1/1 in the current shard. Shard 0/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Emit every assistant content chunk with a null finish reason and rely on the canonical empty terminal choice for normal and error streams. Refs: #83203 Co-authored-by: niuma996 <[email protected]>
|
Thank you @niuma996 for correctly identifying that streamed assistant content must carry a null finish reason and be followed by a separate empty terminal stop chunk. This is now landed in #115718 at beca834, with your real Co-authored-by trailer preserved in the merged commit. We reproduced the defect against current main using the actual pinned official OpenAI SDK and the real Gateway SSE stream, verified all 112 relevant Gateway, Responses, and agent-filter tests plus the full changed gate, and confirmed green hosted CI and Workflow Sanity. Closing this superseded PR now that the contributor-credited fix has actually landed. Thank you again for the report and original patch. |
…aw#115718) Emit every assistant content chunk with a null finish reason and rely on the canonical empty terminal choice for normal and error streams. Refs: openclaw#83203 Co-authored-by: niuma996 <[email protected]>
Summary
Test plan
Closes #55210
🤖 Generated with Claude Code