Repository navigation
test(gateway): align recovery fixtures with run-owned notices - #170926
Merged
Merged
Conversation
Align the Gateway stream-completion regression with the terminal failure notice contract from #170820. Failed attempts retain partial authored text without exposing their diagnostic stopReason in display history. Require one failure notice for the exact run and preserve text-output coverage alongside the existing error events and no-tool-execution assertions.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
…70926) ## What Problem This Solves Scheduled main fails the incomplete-stream and terminal recovered-output cases because their assertions still expect failure copy and error metadata on assistant messages. The verified culprit is d4caae2 (openclaw#170820), which deliberately separates authored partial output from the run-owned failure notice. Update both Gateway fixtures to retain partial assistant output and require one durable failure receipt for the started run. The recovered-output fixture also requires exactly one live `chat.error`; custom transcript receipts are persisted in history and do not publish through `session.message`. Preserve zero execution of incomplete tools, retry counts, assistant publication, and exactly-once effects. No production behavior changes. ## Evidence - Main run [38378024699](https://github.com/openclaw/openclaw/actions/runs/38378024699): jobs 115231440064 and 115231445890 contain the original failures. - The incomplete-stream case passed in [PR CI job 115239150688](https://github.com/openclaw/openclaw/actions/runs/38380241269/job/115239150688), 14.227 seconds. That file is unchanged by the follow-up correction. - Initial PR CI passed continuation, fallback and settled-write cases but rejected the first fixture's expectation of a custom notice in live messages. The correction follows `recordGatewaySessionRunFailure`, the transcript report kernel, and `emitChatTerminal`: persist the receipt, then emit the live error. The corrected candidate passed all five recovered-output cases in [PR CI job 115245143256](https://github.com/openclaw/openclaw/actions/runs/38382045299/job/115245143256): terminal 3.933 seconds, no-fallback 1.826 seconds; Vitest 73.22 seconds. The unchanged incomplete-stream case also passed again in 10.305 seconds (Vitest 43.28 seconds). - Changed-file formatting, lint, whitespace checks and normal commit hooks pass. Two isolated Codex review rounds completed; the final correction is scoped-clean with no actionable findings. No local suite, build, Knip or type scan ran. - Test-only: +43/-5; production LOC 0. SQL statements/requests and T1 unchanged; no performance claim or harness. No production checks removed, schema/SDK/update-path change, or new accepted edge case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Scheduled main fails the incomplete-stream and terminal recovered-output cases because their assertions still expect failure copy and error metadata on assistant messages. The verified culprit is b957f1a (#170820), which deliberately separates authored partial output from the run-owned failure notice.
Update both Gateway fixtures to retain partial assistant output and require one durable failure receipt for the started run. The recovered-output fixture also requires exactly one live
chat.error; custom transcript receipts are persisted in history and do not publish throughsession.message. Preserve zero execution of incomplete tools, retry counts, assistant publication, and exactly-once effects. No production behavior changes.Evidence
recordGatewaySessionRunFailure, the transcript report kernel, andemitChatTerminal: persist the receipt, then emit the live error. The corrected candidate passed all five recovered-output cases in PR CI job 115245143256: terminal 3.933 seconds, no-fallback 1.826 seconds; Vitest 73.22 seconds. The unchanged incomplete-stream case also passed again in 10.305 seconds (Vitest 43.28 seconds).