Skip to content

fix(feishu): suppress fallback after intentional silent DM replies - #109937

Closed
goutamadwant wants to merge 2 commits into
openclaw:mainfrom
goutamadwant:fix-feishu-silent-block-fallback
Closed

goutamadwant wants to merge 2 commits into
openclaw:mainfrom
goutamadwant:fix-feishu-silent-block-fallback

Conversation

@goutamadwant

@goutamadwant goutamadwant commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #109912

Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

Fixes an issue where Feishu DM users received a misleading "reply completed without visible content" warning when an agent intentionally returned NO_REPLY through the message-end block-reply path.

Why This Change Was Made

Feishu now records an explicitly silent block reply as intentional silence, matching the existing final-reply behavior without weakening the fallback for genuinely empty DM turns. The state is ordered by assistant-message index: an older queued delivery cannot erase a newer silent skip, while a same-message or later visible delivery still clears the skip so a real send failure receives the recovery fallback.

The regression suite mocks the dispatcher through its current public Plugin SDK seam, matching the channel-runtime boundary on main.

User Impact

Intentional NO_REPLY results in Feishu DMs remain silent. Users still receive the existing recovery warning when a same-message or later visible block or final reply fails to send.

Evidence

  • Behavior addressed: message-end NO_REPLY arrives as { kind: "block", reason: "silent" }; before this patch, ensureNoVisibleReplyFallback() returned true and sent the warning.
  • The ordering regression covers an older queued block whose send fails after a newer assistant message was intentionally skipped. The newer silence marker remains authoritative and no fallback is sent.
  • The inverse regression covers a later visible block failure and confirms that the recovery fallback is still sent.
  • node scripts/run-vitest.mjs extensions/feishu/src/reply-dispatcher.test.ts passed all 95 tests on Node 24.16.0.
  • ./node_modules/.bin/oxfmt --check extensions/feishu/src/reply-dispatcher.ts extensions/feishu/src/reply-dispatcher.test.ts passed.
  • ./node_modules/.bin/oxlint extensions/feishu/src/reply-dispatcher.ts extensions/feishu/src/reply-dispatcher.test.ts passed.
  • Both commits on the rebased branch have verified signatures.
  • Live Feishu tenant proof remains unavailable because this environment has no Feishu credentials. The issue supplies the live before-fix report; after-fix evidence currently exercises the production dispatcher with the repository's mocked Feishu transport.

Disclosure: AI was used to understand the codebase and review the fix.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S labels Jul 17, 2026
@goutamadwant
goutamadwant force-pushed the fix-feishu-silent-block-fallback branch from 5946282 to ed42e49 Compare July 17, 2026 10:47
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 7:02 PM ET / 23:02 UTC.

Summary
Updates the Feishu reply dispatcher to treat intentional silent block replies as terminal silence, preserve that state by assistant-message order, and add dispatcher regressions for fallback suppression and later visible-delivery failures.

PR surface: Source +10, Tests +74. Total +84 across 2 files.

Reproducibility: no. live reproduction was run in this review; source inspection gives a high-confidence path because current main ignores { kind: "block", reason: "silent" } for the fallback state.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #109912
Summary: This PR is a concrete candidate fix for the linked Feishu silent-block fallback bug; the issue should remain open until this PR or another fix merges.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Attach redacted real Feishu DM evidence showing an intentional silent block produces no fallback.
  • Show the retained recovery fallback for a same-message or later visible delivery failure.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR reports focused mocked dispatcher tests and checks, but its own body confirms no redacted after-fix run from a real Feishu workspace; add a redacted transcript or runtime logs before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P2] This changes a DM recovery fallback: before merge, a real Feishu run should show both that intentional NO_REPLY remains silent and that a same-message or later visible delivery failure still produces the recovery warning.

Maintainer options:

  1. Add real Feishu proof before merge (recommended)
    Run the patched dispatcher in a real Feishu DM and attach redacted evidence for intentional silence plus the retained failure fallback.
  2. Accept mocked-only validation
    Merge based on the focused dispatcher regressions while explicitly accepting that tenant behavior was not observed after the fix.

Next step before merge

  • [P1] The remaining blocker is contributor-supplied live Feishu evidence, which an automated repair lane cannot create without the contributor’s tenant.

Security
Cleared: The two-file channel-dispatcher and regression-test diff adds no dependency, workflow, secret, permission, or supply-chain surface.

Review details

Best possible solution:

Keep the ordered dispatcher fix, add a redacted real Feishu DM transcript or runtime logs proving both silence and recovery-fallback cases, then complete ordinary channel-owner review.

Do we have a high-confidence way to reproduce the issue?

No live reproduction was run in this review; source inspection gives a high-confidence path because current main ignores { kind: "block", reason: "silent" } for the fallback state.

Is this the best way to solve the issue?

Yes, conditionally: extending the existing Feishu dispatcher state at the public reply-runtime boundary is narrower than changing global silent-reply policy, and the assistant-message ordering guard avoids erasing a newer silent decision.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 781913025b6f.

Label changes

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P1: The change addresses a current direct-message workflow that sends misleading recovery text to users after an intentional silent reply.
  • merge-risk: 🚨 message-delivery: The patch changes the condition that suppresses or sends Feishu’s no-visible-reply fallback in direct-message delivery.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused mocked dispatcher tests and checks, but its own body confirms no redacted after-fix run from a real Feishu workspace; add a redacted transcript or runtime logs before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +10, Tests +74. Total +84 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 2 +10
Tests 1 74 0 +74
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 86 2 +84

What I checked:

Likely related people:

  • vincentkoc: Recent commits on the current Feishu reply-dispatcher history cover streaming-card closeout, final-delivery coalescing, and failed-stream start behavior adjacent to this fallback state. (role: recent area contributor; confidence: high; commits: 84a22a6, 455eba7, 4df0e10; files: extensions/feishu/src/reply-dispatcher.ts)
  • Takhoffman: Feishu reply-dispatcher history repeatedly associates this person with merged channel reply and streaming changes, including block-delivery fixes. (role: adjacent feature reviewer; confidence: medium; commits: e6f34b2, 024af2b, 477de54; files: extensions/feishu/src/reply-dispatcher.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (5 earlier review cycles)
  • reviewed 2026-07-17T10:55:00.847Z sha ed42e495d143028037979507a2faa02c871fb4bf :: needs real behavior proof before merge. :: [P2] Preserve later silent skips across earlier queued deliveries
  • reviewed 2026-07-17T14:53:10.018Z sha 67b4d3d2b57ee4b55fc85d710e0b98692efd8314 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T20:07:47.469Z sha 87af6bc052df6f552d18fcca55112871ff831ef8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T20:37:07.732Z sha 400a9b92bf0a41538439203ea794e3b9e431e3d6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T22:19:45.496Z sha 07f43d4 :: needs real behavior proof before merge. :: none

@goutamadwant
goutamadwant force-pushed the fix-feishu-silent-block-fallback branch 5 times, most recently from 2ed72ca to 5a26490 Compare July 17, 2026 22:15
@goutamadwant
goutamadwant force-pushed the fix-feishu-silent-block-fallback branch from 5a26490 to 07f43d4 Compare July 17, 2026 22:17
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 17, 2026
@steipete

Copy link
Copy Markdown
Contributor

Thank you @goutamadwant for identifying this exact Feishu NO_REPLY dispatcher bug and contributing the fix for #109912. The same issue is now fixed on main by #115530 in canonical merge commit 232613f.

The merged implementation covers your intentional silent-block case and the newer-silence/older-failure race, and adds explicit regression coverage ensuring an unindexed or later failed delivery still emits its legitimate recovery fallback. Verification included fail-first reproduction, all 221 Feishu dispatcher, bot, and durable-ingress tests, the complete changed-file gate, clean independent xhigh review, and passing exact-head hosted CI: https://github.com/openclaw/openclaw/actions/runs/30420254605. Your independent contribution and @openagent-ai’s original report are both credited in the merged PR.

Closing this overlapping PR because the reported issue and changed production surface are now covered on main; thank you again for helping make the edge-case behavior clear.

@steipete steipete closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu 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.

Feishu: NO_REPLY block reply in DM triggers "no visible content" fallback

2 participants