Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 19, 2026, 4:05 PM ET / 20:05 UTC. ClawSweeper reviewWhat this changesThe branch derives OpenAI-compatible SSE content from cumulative assistant text, delays finalization by a microtask, and adds regression tests for a split leading Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open: it targets the still-open HTTP SSE truncation report and has focused regression coverage, but its head is conflicted with current Priority: P2 Review scores
Verification
Before merge
Agent review detailsSecurityNone. PR surfaceSource +24, Tests +91. Total +115 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was established in this review. The linked report gives a concrete split-tag HTTP SSE scenario and the branch adds matching source-level regression tests, so the path is source-reproducible but still needs a real post-fix stream capture. Is this the best way to solve the issue? Unclear until the rebased branch is compared with current AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cb0bbcb1772c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
This comment was marked as spam.
This comment was marked as spam.
8c6ca10 to
f33c237
Compare
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
@honor2030 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. |
Preserve cumulative assistant snapshot prefixes and flush same-turn text before terminating OpenAI-compatible Gateway SSE. Fixes #81991 Refs: #82355 Co-authored-by: honor2030 <[email protected]>
|
Thank you, @honor2030, for identifying and implementing the two Chat Completions streaming fixes in this PR. Both defects are now fixed on main by #115652 and 1425a6c. The landed version preserves your snapshot and final-fragment solution, carries your actual Co-authored-by commit credit, and adds fail-first proof through the pinned official OpenAI SDK, real Gateway SSE, literal split-tag/filter regressions, 110 passing tests, and successful exact-commit CI. The linked issue #81991 was automatically closed as completed. Closing as fixed with sincere thanks for your work. |
…15652) Preserve cumulative assistant snapshot prefixes and flush same-turn text before terminating OpenAI-compatible Gateway SSE. Fixes openclaw#81991 Refs: openclaw#82355 Co-authored-by: honor2030 <[email protected]>
Summary
textpayloads when translating agent events into OpenAI-compatible SSE deltas, so leading<characters are not dropped whendeltastarts after a buffered tag prefix.[DONE].Fixes #81991
Real behavior proof
Behavior or issue addressed:
/v1/chat/completionsstreaming responses now keep a literal leading<in assistant content and flush the last assistant text fragment before the OpenAI-compatible SSE[DONE]frame.Real environment tested: Local OpenClaw source checkout on macOS with Node
v23.11.0and pnpm11.1.0, rebased on currentorigin/main(3156d94bca), exercising the repository's OpenAI-compatible HTTP SSE e2e harness for bothgateway-serverandgateway-clientprojects plus the embedded subscribe stream filter path.Exact steps or command run after this patch:
pnpm exec node --no-maglev node_modules/vitest/vitest.mjs run src/gateway/openai-http.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.filters-final-suppresses-output-without-start-tag.test.ts --reporter=dotEvidence after fix: Terminal output captured after the refreshed patch:
Observed result after fix: The OpenAI-compatible HTTP SSE e2e path emitted the full streamed assistant content in both gateway modes, including the leading
<case and the finalfinishfragment before stream completion; the embedded subscribe path preserved<xiaohai-banli>...when the literal tag opener was split after a bare<.What was not tested: A live external OpenAI/Codex provider call was not used; the proof exercises OpenClaw's local HTTP SSE gateway behavior and stream filtering path without sending provider credentials.
Tests
git diff --cached --check && git diff --checknode scripts/run-vitest.mjs run src/gateway/openai-http.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.filters-final-suppresses-output-without-start-tag.test.ts --reporter=dotpnpm exec node --no-maglev node_modules/vitest/vitest.mjs run src/gateway/openai-http.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.filters-final-suppresses-output-without-start-tag.test.ts --reporter=dot— 4 files / 70 tests passedpnpm check:test-types