Skip to content

fix(feishu): DMs send a spurious no-visible-reply fallback after an intentional silent NO_REPLY - #110730

Closed
YangManBOBO wants to merge 1 commit into
openclaw:mainfrom
YangManBOBO:fix/feishu-block-silent-noreply
Closed

YangManBOBO wants to merge 1 commit into
openclaw:mainfrom
YangManBOBO:fix/feishu-block-silent-noreply

Conversation

@YangManBOBO

@YangManBOBO YangManBOBO commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Related: #109912
Closes: #110744

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

  1. Feishu DM users receive a spurious "⚠️ This reply completed without visible content..." fallback after an intentional silent NO_REPLY (block-kind skip was not recorded by onSkip).
  2. extensions/feishu/src/delivery-trace.test.ts fails on unmodified main with dispatcher options were not captured, blocking openclaw/ci-gate for any PR that pulls in the Feishu reply-dispatcher shard.

Why This Change Was Made

NO_REPLY fallback: Feishu's default blockReplyBreak: "message_end" routes the final assistant text through sendBlockReply (kind: "block"). The shared normalizer correctly reports { kind: "block", reason: "silent" } for NO_REPLY, but Feishu's onSkip only recorded kind === "final", so ensureNoVisibleReplyFallback still fired. The fix also captures silent block skips; non-silent empty block skips still get the fallback.

delivery-trace: PR #110095 moved inbound turn execution into core and migrated msteams/slack delivery-trace suites off the createReplyDispatcherWithTyping capture seam, but missed feishu. This applies the same pattern as #110775 / #110095 (msteams): build step-driver options from created.dispatcherOptions + created.delivery.deliver, and drop the retired mock (plus leftover afterEach/afterAll cleanup for that seam).

User Impact

  • Intentional NO_REPLY in Feishu DMs no longer produces a confusing fallback; genuinely empty completions still do.
  • Feishu delivery-trace goldens pass again, unblocking the required CI gate for Feishu dispatcher PRs.

Evidence

This PR is AI-assisted (built with Cursor/Claude); I reviewed and understand the change.

NO_REPLY — full dispatch-pipeline before/after

# Before (one-line onSkip reverted): positive case fails through real pipeline
× suppresses the fallback for a real NO_REPLY block reply through the full dispatch pipeline
AssertionError: expected true to be false
Tests  1 failed | 1 passed | 94 skipped

# After
Test Files  1 passed (1)
     Tests  96 passed (96)

delivery-trace — before/after (mirrors #110775)

# Before
× records streaming-happy / final-only / cancel-mid-stream / rate-limit / overflow
Error: dispatcher options were not captured
Tests  5 failed (5)

# After (this branch)
✓ feishu delivery-trace 5/5
✓ reply-dispatcher 96/96
Test Files  2 passed (2)  |  Tests  101 passed (101)

Lint/format

Touched files pass oxfmt --check and oxlint for the extension tsconfig.

Diff scope: reply-dispatcher.ts (one-line onSkip widen), reply-dispatcher.test.ts (callback + full-pipeline regressions), delivery-trace.test.ts (capture-seam migration).

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: XS labels Jul 18, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 12:54 PM ET / 16:54 UTC.

Summary
The branch records silent Feishu block skips as terminal so intentional NO_REPLY output suppresses the DM fallback, and migrates the Feishu delivery-trace test from the retired dispatcher-capture seam.

PR surface: Source 0, Tests +56. Total +56 across 3 files.

Reproducibility: yes. source-reproducible: the current Feishu callback only records final skips while the shared path can report NO_REPLY as a silent block skip, leaving the fallback eligible.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #109912
Summary: This PR is a candidate fix for the canonical Feishu NO_REPLY fallback report, while its trace-test portion partially overlaps separate active work.

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:

Proof guidance:

  • [P1] Needs real behavior proof before merge: The supplied before/after terminal output exercises the production dispatch pipeline but mocks outbound Feishu delivery; add a redacted live DM transcript, recording, or runtime log before merge and redact private workspace details. 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] The patch suppresses a user-visible Feishu DM fallback, but all supplied behavioral proof is test-based with mocked outbound delivery; a real after-fix DM observation is still needed before merge.
  • [P1] The delivery-trace migration overlaps fix(feishu): migrate delivery-trace goldens off the retired capture seam #110775, so maintainers should select one PR to own that independent test repair and avoid duplicate conflict resolution.

Maintainer options:

  1. Prove the DM outcomes before merge (recommended)
    Capture redacted real Feishu evidence that a silent NO_REPLY produces no message and a real empty completion still receives the fallback, then rebase away whichever trace migration lands first.
  2. Accept the delivery-proof gap
    Merge the focused condition change on pipeline tests alone and explicitly accept the remaining uncertainty in a real Feishu workspace.

Next step before merge

  • [P1] A human with Feishu access must supply or explicitly waive real delivery evidence, and maintainers should coordinate the duplicated trace-test repair with the open focused PR.

Maintainer decision needed

  • Question: Should this PR wait for maintainer- or contributor-supplied redacted real Feishu DM evidence before the message-delivery change is merged?
  • Rationale: The implementation and mocked pipeline tests are coherent, but only someone with an appropriate Feishu workspace can establish the required user-visible after-fix behavior.
  • Likely owner: steipete — The current dispatcher ownership and trace seam date to the channel-lifecycle refactor authored in the relevant mainline history.
  • Options:
    • Capture live Feishu proof (recommended): Record a redacted DM transcript, terminal trace, or runtime log showing NO_REPLY stays silent while a genuinely empty completion still emits the fallback, then refresh review.
    • Accept test-only proof: Merge based on the focused pipeline regressions and CI while explicitly accepting that no live Feishu delivery evidence was collected.

Security
Cleared: The three-file TypeScript/test diff changes no dependencies, permissions, secrets, CI workflow, or supply-chain execution path.

Review details

Best possible solution:

Keep the narrow NO_REPLY change, obtain redacted real Feishu DM proof for both silent and genuinely empty outcomes, and let only one PR carry the delivery-trace seam migration.

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

Yes, source-reproducible: the current Feishu callback only records final skips while the shared path can report NO_REPLY as a silent block skip, leaving the fallback eligible.

Is this the best way to solve the issue?

Yes for the NO_REPLY bug: recording only an already-normalized silent block skip is the narrow owner-local fix; the unrelated trace migration should be coordinated with its existing focused PR.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 837db49ebb24.

Label changes

Label justifications:

  • P2: This is a focused direct-message delivery correctness fix with limited channel-specific blast radius.
  • merge-risk: 🚨 message-delivery: The changed terminal-skip condition determines whether Feishu users receive or do not receive a fallback message.
  • 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 supplied before/after terminal output exercises the production dispatch pipeline but mocks outbound Feishu delivery; add a redacted live DM transcript, recording, or runtime log before merge and redact private workspace details. 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 0, Tests +56. Total +56 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 77 21 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 78 22 +56

What I checked:

Likely related people:

  • steipete: Authored the merged channel lifecycle refactor that introduced the core-owned dispatcher seam used by the affected Feishu path and sibling trace migrations. (role: feature owner; confidence: high; commits: 601ffa253037; files: extensions/feishu/src/delivery-trace.test.ts, 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-18T14:20:18.850Z sha f478358ccfec54416cbcf9e932196596852bcbf5 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-18T14:54:38.401Z sha d3bdf8eb4204bbbc6f82399017cbacf0d72dae1c :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-18T14:59:55.404Z sha d3bdf8eb4204bbbc6f82399017cbacf0d72dae1c :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-18T15:06:03.521Z sha d3bdf8eb4204bbbc6f82399017cbacf0d72dae1c :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-18T15:23:24.441Z sha 9787e01750036c9677292c8df5076e0e2563a9f9 :: needs real behavior proof before merge. :: none

@YangManBOBO

YangManBOBO commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Added stronger real-behavior evidence: two new regression tests that drive the actual production dispatch pipeline (createReplyDispatcherWithTyping → shared normalizeReplyPayload → Feishu's real onSkip) instead of invoking the captured onSkip callback directly, so the silent-vs-empty decision is made by the unmodified production normalizer rather than being asserted by the test. Before/after proof for these included in the PR body.

Also: the failing checks-node-changed-* / openclaw/ci-gate check on this PR is caused by a pre-existing, unrelated bug in extensions/feishu/src/delivery-trace.test.ts ("dispatcher options were not captured"), introduced by #110095 for Feishu specifically (the equivalent msteams/slack tests were updated in that same PR, Feishu's was missed). Reproduces identically on unmodified upstream/main. Filed separately as #110744 rather than fixing it here, to keep this PR focused on the NO_REPLY fallback bug.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@YangManBOBO
YangManBOBO force-pushed the fix/feishu-block-silent-noreply branch from d3bdf8e to 9787e01 Compare July 18, 2026 15:20
@YangManBOBO

Copy link
Copy Markdown
Contributor Author

Rebased onto latest `main` (`63a32e3`) and reconfirmed on the rebased head, with dependencies reinstalled:

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@YangManBOBO

Copy link
Copy Markdown
Contributor Author

For maintainers: ClawSweeper's remaining ask is a redacted real Feishu DM transcript/recording/runtime log showing the after-fix behavior. I don't have access to a live Feishu workspace or bot credentials from this AI-assisted contribution flow, so I can't produce that directly — ClawSweeper's own review already acknowledges this is "contributor-owned real Feishu proof, which an automated repair worker cannot safely generate on the contributor's behalf."

What I could produce instead, as the closest available substitute:

  • Two regression tests that drive the actual production dispatch pipeline (createReplyDispatcherWithTyping → shared normalizeReplyPayload → Feishu's real onSkip), so the silent-vs-empty classification is made by the unmodified production normalizer rather than asserted by the test. Only the outbound Feishu HTTP calls are mocked.
  • Before/after proof for every regression test (reverted the one-line fix, confirmed the new tests fail exactly as the bug predicts, restored the fix).
  • Rebased onto latest main and reconfirmed the one remaining red CI check (extensions/feishu/src/delivery-trace.test.ts) is an unrelated pre-existing issue (Feishu delivery-trace golden tests fail: "dispatcher options were not captured" (stale capture-seam mock after #110095) #110744), independent of this branch.

If a maintainer (or anyone with a Feishu test bot handy) can capture a quick redacted DM transcript confirming: (1) an intentional NO_REPLY final produces no fallback, and (2) a genuinely empty completion still does — I'm happy to fold it into the PR body. Otherwise, given the fix is a one-line, narrowly-scoped condition change with the evidence above, I'd appreciate a maintainer call on whether that's sufficient to merge per the "Maintainer options" in ClawSweeper's review.

Feishu DM 中意图静默的 NO_REPLY 会经 block 路径跳过,但 onSkip 原先只记录 final,导致误发“无可见内容”兜底。现将 silent 的 block skip 一并纳入状态,并补充直接回调与完整调度管线回归测试。

同时按 openclaw#110775 / openclaw#110095 对 msteams/slack 的同一模式,移除 feishu delivery-trace 中已失效的 createReplyDispatcherWithTyping 捕获缝,改为直接使用 createFeishuReplyDispatcher 返回的 dispatcherOptions/delivery,修复 main 上既有的金标失败并解除 ci-gate 阻塞。

Related: openclaw#109912
Closes: openclaw#110744
@YangManBOBO
YangManBOBO force-pushed the fix/feishu-block-silent-noreply branch from 9787e01 to 8e2b01c Compare July 18, 2026 16:08
@YangManBOBO

Copy link
Copy Markdown
Contributor Author

Squashed into a single commit and incorporated the delivery-trace capture-seam migration (same approach as #110775 / #110095 for msteams/slack), plus leftover afterEach/afterAll cleanup for the retired mock.

Local validation on this head: delivery-trace.test.ts + reply-dispatcher.test.ts → 101/101 passed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. label Jul 18, 2026
@steipete

Copy link
Copy Markdown
Contributor

Thank you for isolating the silent Feishu NO_REPLY block path and for adding full-dispatch regression coverage. Closing as a duplicate of #109937, which preserves the same silent-block fix while also protecting assistant-message ordering. The separate Feishu delivery-trace fixture repair included here is already on main in #110838 (commit 50fdbc5), and its tracking issue #110744 is closed; current extensions/feishu/src/delivery-trace.test.ts directly uses created.dispatcherOptions and created.delivery.deliver. The underlying user-visible bug #109912 remains open until the canonical fix is independently verified and landed. Thank you again for the useful reproduction and tests.

@steipete steipete closed this Jul 28, 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. P2 Normal backlog priority with limited blast radius. 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 delivery-trace golden tests fail: "dispatcher options were not captured" (stale capture-seam mock after #110095)

2 participants