Skip to content

test(gateway): align recovery fixtures with run-owned notices - #170926

Merged
steipete merged 3 commits into
mainfrom
dbasync/redmain-recovery-receipts
Oct 13, 2026
Merged

steipete merged 3 commits into
mainfrom
dbasync/redmain-recovery-receipts

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 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: jobs 115231440064 and 115231445890 contain the original failures.
  • The incomplete-stream case passed in PR CI 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: 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.

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.
@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T10:18:05.324827Z f2e9307 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 13, 2026
@steipete
steipete merged commit 548999b into main Oct 13, 2026
115 checks passed
@steipete
steipete deleted the dbasync/redmain-recovery-receipts branch October 13, 2026 10:25
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant