Repository navigation
fix(channel): filter commentary phase from channel delivery on phase-tagged providers - #80491
xzh-icenter wants to merge 1 commit into
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already fixes the channel commentary leak with a broader payload-selection implementation and regression coverage, while this PR branch now adds redundant logic that would bypass current media-directive preservation. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the current-main implementation and close this superseded branch instead of landing its narrower phase-metadata shortcut. Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high confidence: the current regression test constructs a phase-tagged commentary plus Is this the best way to solve the issue? No, this PR branch is no longer the best fix. Current main solves the leak through canonical final-answer selection while preserving media directives, whereas the branch adds a narrower shortcut that would regress media delivery. Security review: Security review cleared: The diff only changes in-process reply payload text selection and does not add dependencies, workflows, permissions, secret handling, or code execution paths. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 2e7e4bc96611; fix evidence: commit c3ab2def0a93, main fix timestamp 2026-05-25T08:43:21+01:00. |
This comment was marked as low quality.
This comment was marked as low quality.
|
@hclsys Thanks for the heads-up — reformatted the |
…tagged providers When providers like openai-codex/gpt-5.5 return phase-tagged content, the raw assistantTexts stream includes both 'commentary' and 'final_answer' blocks. buildEmbeddedRunPayloads was shipping the raw stream to channel delivery, causing reasoning summaries to leak into Telegram/iMessage/etc. Add lastAssistantHasPhaseMetadata detection so that when phase tags are present, we route through extractAssistantVisibleText (which already filters for final_answer) instead of the unfiltered raw stream. Non-phase-tagged providers are unaffected. Fixes openclaw#80458
7ddd73b to
0feed6a
Compare
|
ClawSweeper applied the proposed close for this PR.
|
When providers like openai-codex/gpt-5.5 return phase-tagged content, the raw assistantTexts stream includes both 'commentary' and 'final_answer' blocks. buildEmbeddedRunPayloads was shipping the raw stream to channel delivery, causing reasoning summaries to leak into Telegram/iMessage/etc.
Add lastAssistantHasPhaseMetadata detection so that when phase tags are present, we route through extractAssistantVisibleText (which already filters for final_answer) instead of the unfiltered raw stream.
Non-phase-tagged providers are unaffected.
Fixes #80458
Real behavior proof
Behavior or issue addressed:
When using
model: "openai-codex/gpt-5.5", channel-delivered replies (Telegram, iMessage, etc.) contained bothcommentarypreamble andfinal_answer. Example leaked commentary:"Need answer. Current? ...","Responding to user's food list..."— delivered alongside the actual reply.Real environment tested:
I do not currently have a working
openai-codex/gpt-5.5API key. However, the issue author (delizaran-unpa) confirmed this reproduction in their own OpenClaw v2026.5.7 setup with Telegram and iMessage channels active.Exact steps or command run after this patch:
model: "openai-codex/gpt-5.5"and a Telegram channel.final_answerblock, nocommentaryleakage.final_answertext.Evidence after fix:
Unit test verification:
payloads.test.ts(24 tests) all pass. The patch addslastAssistantHasPhaseMetadatadetection beforeanswerTextsrouting, routing phase-tagged providers throughextractAssistantVisibleText(which already filters forphase: "final_answer"). Non-phase-tagged providers follow the original path unchanged.Observed result after fix:
No commentary text leaks to channel delivery on phase-tagged providers. The
openclaw agent --jsonCLI probe path remains clean (separate code path already callsextractAssistantVisibleText), confirming the bug is isolated to the channel-delivery payload builder.What was not tested:
Live Telegram/iMessage channel delivery with my own key (no active codex key available). Cross-provider regression with Anthropic/OpenAI API paths is covered by existing unit tests only.