Skip to content

fix(feishu): preserve replies before error finals#94428

Merged
steipete merged 1 commit into
mainfrom
fix/feishu-multiple-final-payloads-94360
Jun 18, 2026
Merged

fix(feishu): preserve replies before error finals#94428
steipete merged 1 commit into
mainfrom
fix/feishu-multiple-final-payloads-94360

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Preserve a completed Feishu streaming-card answer when core emits a later independent error final.
  • Keep cumulative final snapshots and first-error-after-partial behavior unchanged.
  • Re-evaluate Feishu's text limit after merging so oversized combined output uses the existing chunked fallback.

Linked context

Closes #94360

Related #94374
Related #94381

Real behavior proof (required for external PRs)

  • Behavior addressed: a final execution warning replaced the assistant answer in Feishu streaming cards.
  • Real environment tested: Azure-backed Crabbox Linux runner using the production Feishu reply dispatcher with mocked Feishu transport boundaries.
  • Exact steps or command run after this patch: OPENCLAW_VITEST_MAX_WORKERS=1 corepack pnpm test src/agents/embedded-agent-runner/run/payloads.errors.test.ts extensions/feishu/src/reply-dispatcher.test.ts; then the three focused multi-final/partial/limit scenarios.
  • Evidence after fix: 54 core payload tests and 82 Feishu dispatcher tests passed; all 3 focused multi-final scenarios passed.
  • Observed result after fix: the streaming card closes with the assistant answer followed by the independent error; cumulative snapshots do not repeat the answer; a first error replaces a partial preview; oversized merged text uses chunked delivery.
  • What was not tested: a live Feishu tenant with production credentials.
  • Proof limitations or environment constraints: transport calls were mocked to avoid posting into a real tenant; production dispatcher state transitions and Linux runtime were exercised.

Tests and validation

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/embedded-agent-runner/run/payloads.errors.test.ts extensions/feishu/src/reply-dispatcher.test.ts
  • Azure-backed Crabbox Linux: same 136 tests, plus 3 focused dispatcher scenarios.
  • pnpm format -- extensions/feishu/src/reply-dispatcher.ts extensions/feishu/src/reply-dispatcher.test.ts
  • git diff --check
  • Fresh Codex autoreview: clean after fixing three accepted edge-case findings (merged-size limit, cumulative error snapshots, partial-preview state).

Regression coverage verifies independent and cumulative error finals, partial previews, and merged text over the configured streaming limit.

Risk checklist

Did user-visible behavior change? Yes

Did config, environment, or migration behavior change? No

Did security, auth, secrets, network, or tool execution behavior change? No

Highest-risk area: distinguishing committed final text from replaceable streaming previews.

Mitigation: explicit per-stream final-text state, reset with the existing streaming lifecycle, plus focused regression coverage for both shapes.

Current review state

Ready for CI and maintainer review. No known author blocker. Live Feishu credential proof remains the only validation gap.

@steipete steipete self-assigned this Jun 18, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S maintainer Maintainer-authored PR labels Jun 18, 2026
@steipete

steipete commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready verification and landing for f86d6bddb5:

  • Local and Azure-backed Linux: 54 core payload tests plus 82 Feishu dispatcher tests passed.
  • Focused runtime scenarios verified independent error append, first-error replacement of a partial preview, cumulative snapshots, and merged-text chunk fallback.
  • Exact-SHA GitHub release gate 27762291341: all 126 jobs passed; Workflow Sanity also passed.
  • Fresh Codex autoreview: no accepted/actionable findings.
  • Landed through fix(feishu): preserve replies before error finals #94428 as 7cca3d4618b943f1507d407b4ec61a638f874e8f.

Proof gap: no live Feishu tenant credentials; production dispatcher state transitions ran with mocked transport boundaries to avoid sending messages.

@steipete
steipete requested a review from a team as a code owner June 18, 2026 09:50
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: openai channel: qqbot extensions: qa-lab extensions: codex plugin: google-meet extensions: gmi labels Jun 18, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: f86d6bddb5f603c68acc30e69e734de2b87eb8a0

@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label Jun 18, 2026
@steipete
steipete merged commit 7cca3d4 into main Jun 18, 2026
156 of 159 checks passed
@steipete
steipete deleted the fix/feishu-multiple-final-payloads-94360 branch June 18, 2026 13:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 19, 2026
Merged via squash.

Prepared head SHA: f86d6bd
Co-authored-by: steipete <[email protected]>
Reviewed-by: @steipete
cxbAsDev pushed a commit to cxbAsDev/openclaw that referenced this pull request Jun 23, 2026
Merged via squash.

Prepared head SHA: f86d6bd
Co-authored-by: steipete <[email protected]>
Reviewed-by: @steipete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Feishu - exec stderr output sent as user-visible reply, covers actual agent response

1 participant