Skip to content

fix(feishu): keep memory probe replies visible - #92349

Closed
wangyaok1 wants to merge 1 commit into
openclaw:mainfrom
wangyaok1:codex/openclaw-feishu-memory-guard
Closed

wangyaok1 wants to merge 1 commit into
openclaw:mainfrom
wangyaok1:codex/openclaw-feishu-memory-guard

Conversation

@wangyaok1

Copy link
Copy Markdown

Summary

  • suppress Feishu SOP internal-noise final text before outbound delivery
  • keep short memory governance / true @ / mention probe replies visible
  • add regression coverage for both suppression and visible probe replies

Test

  • PATH=/Users/wangyadong/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/wangyadong/.codex/tmp/arg0/codex-arg0lv9slW:/Users/wangyadong/.nvm/versions/node/v18.20.8/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/Applications/Codex.app/Contents/Resources corepack pnpm --dir /Users/wangyadong/Documents/18_写作团队/artifacts/memory-governance/source/openclaw exec vitest run extensions/feishu/src/reply-dispatcher.test.ts --config test/vitest/vitest.extension-feishu.config.ts
  • result: 79/79 passed

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 12, 2026
@clawsweeper

clawsweeper Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 8:27 AM ET / 12:27 UTC.

Summary
The PR adds Feishu reply-dispatcher text classifiers that suppress SOP/internal-noise final text, preserve one memory-governance probe answer, and add regression tests for both cases.

PR surface: Source +56, Tests +30. Total +86 across 2 files.

Reproducibility: yes. for the patch regression. Source inspection shows a short final such as OK or 收到 would make shouldDeliverText false and return from Feishu delivery after the shared dispatcher already counted a queued final.

Review metrics: 1 noteworthy metric.

  • Content-based delivery gate: 1 added. The PR makes Feishu visible delivery depend on outbound text classification before any platform send, which is the central merge-risk surface.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

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

Rank-up moves:

  • Replace Feishu text heuristics with an explicit producer-owned internal-only or dispatcher-cancellation signal.
  • [P2] Add fallback-aware coverage for ordinary short replies and the intended suppression path.
  • [P1] After conflict resolution, add redacted real Feishu transcript, runtime log, screenshot, video, live output, or linked artifact proof.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body and comments show only local/mock Vitest output; no redacted after-fix real Feishu transcript, log, screenshot, video, live output, or linked artifact is present. 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] Valid Feishu final replies such as OK, 收到, or 好的 can be suppressed while generic dispatch still records a queued final, so no-visible fallback may not recover the message.
  • [P1] Workflow-specific phrase matching in the Feishu transport can suppress legitimate answers containing terms such as profile, mapping, Agent, or mention.
  • [P1] No redacted live Feishu transcript, runtime log, screenshot, recording, live output, or linked artifact proves the intended suppression and preserved probe reply after the patch.
  • [P1] Live GitHub reports the PR branch as conflicting with the base branch, so conflict resolution is required before final merge review.

Maintainer options:

  1. Move suppression before channel delivery (recommended)
    Have the producer or shared dispatcher mark internal-only output before queued final accounting, then keep Feishu text delivery focused on transport sends and fallback state.
  2. Accept transport heuristics explicitly
    Maintainers could accept the false-positive risk only with documented scope and live Feishu proof that ordinary short replies and expected probe replies remain visible.
  3. Pause until proof and owner direction
    If the producer-owned signal is not ready, leave this PR paused or close it in favor of a narrower owner-approved fix.

Next step before merge

  • [P1] Human review is needed for the producer/channel ownership decision, conflict resolution, and contributor-provided real Feishu proof; this is not a safe automated repair lane.

Security
Cleared: The diff changes Feishu reply classification and tests only, with no dependency, workflow, permission, credential-storage, or executable-artifact changes.

Review findings

  • [P1] Preserve normal short final replies — extensions/feishu/src/reply-dispatcher.ts:54-58
  • [P1] Move internal-noise decisions out of Feishu delivery — extensions/feishu/src/reply-dispatcher.ts:76-77
Review details

Best possible solution:

Use an explicit producer-owned internal-only or dispatcher-cancellation signal before queued final accounting, keep Feishu delivery content-agnostic, and add fallback-aware tests plus redacted real Feishu proof.

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

Yes for the patch regression. Source inspection shows a short final such as OK or 收到 would make shouldDeliverText false and return from Feishu delivery after the shared dispatcher already counted a queued final.

Is this the best way to solve the issue?

No. The branch is a plausible local workaround, but the best fix is to carry an explicit internal-only or intentional-silence signal from the producer/shared dispatcher instead of classifying answer text inside the Feishu transport.

Full review comments:

  • [P1] Preserve normal short final replies — extensions/feishu/src/reply-dispatcher.ts:54-58
    Do not classify ordinary short text as an empty shell. Values such as OK, 好的, and 收到 make shouldDeliverText false and return without sending, while the shared dispatcher has already counted the final so Feishu's no-visible fallback stays off.
    Confidence: 0.99
  • [P1] Move internal-noise decisions out of Feishu delivery — extensions/feishu/src/reply-dispatcher.ts:76-77
    Replace the workflow-specific allowlist and denylist with an explicit internal-only signal from the producer or shared dispatcher. Terms such as profile, mapping, Agent, and mention can occur in legitimate answers, so transport-level phrase matching creates an expanding silent-drop policy unrelated to Feishu delivery.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 08d15ec32db3.

Label changes

Label justifications:

  • P1: The patch can silently drop normal final messages in active Feishu conversations.
  • merge-risk: 🚨 message-delivery: Merging this PR could suppress valid Feishu replies while existing dispatch accounting prevents recovery fallback delivery.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body and comments show only local/mock Vitest output; no redacted after-fix real Feishu transcript, log, screenshot, video, live output, or linked artifact is present. 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 +56, Tests +30. Total +86 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 56 0 +56
Tests 1 30 0 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 86 0 +86

What I checked:

  • Repository policy read: Read the full root policy plus scoped extensions policy; the applicable guidance requires deep PR review, channel message-delivery proof, and plugin-boundary review before verdict. (AGENTS.md:1, 08d15ec32db3)
  • PR branch adds a Feishu content gate before sends: The diff adds empty-shell/internal-noise classifiers and makes shouldDeliverText require suppressedTextReason to be null before Feishu sends run. (extensions/feishu/src/reply-dispatcher.ts:37, e5327592325f)
  • Current main delivery is content-agnostic: Current main computes shouldDeliverText from text/media/duplicate/streaming state and returns only when no text should be delivered and no media exists; it does not classify final answer wording. (extensions/feishu/src/reply-dispatcher.ts:692, 08d15ec32db3)
  • Queued final accounting happens before channel delivery: The shared dispatcher increments queuedCounts before awaiting the channel deliverer, so a Feishu deliverer that returns early can still look queued and successful. (src/auto-reply/reply/reply-dispatcher.ts:226, 08d15ec32db3)
  • No-visible fallback does not cover a successful queued final: Feishu fallback is selected only for an eligible zero-final dispatch or a queued final with failed final count, so a suppressed-but-successful final can bypass recovery. (extensions/feishu/src/bot.ts:90, 08d15ec32db3)
  • Existing review comment identified the short-reply drop: The live review comment flags the same issue at the PR line where ordinary short acknowledgements such as OK, 好的, and 收到 become suppressible. (extensions/feishu/src/reply-dispatcher.ts:58, e5327592325f)

Likely related people:

  • Vincent Koc: Recent Feishu history includes message/mention type work and reasoning-preview gating in the dispatcher and bot surfaces touched by this PR. (role: recent Feishu contributor; confidence: high; commits: 2b96f53f9782, d609f71c9b74; files: extensions/feishu/src/reply-dispatcher.ts, extensions/feishu/src/bot.ts, extensions/feishu/src/reply-dispatcher.test.ts)
  • Xinhua Gu: A prior Feishu dispatcher fix specifically addressed silent reply drops by changing block-streaming behavior in the same dispatcher and test surface. (role: adjacent bug-fix contributor; confidence: medium; commits: 024af2b738d1; files: extensions/feishu/src/reply-dispatcher.ts, extensions/feishu/src/reply-dispatcher.test.ts)
  • steipete: History shows a Feishu chunked reply delivery refactor in the same text-send path that this PR changes. (role: adjacent delivery contributor; confidence: medium; commits: 143ae5a5b070; 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e532759232

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +56 to +58
return ["收到", "好的", "ok", "已收到", "处理中", "格式", "下"].includes(
normalized.toLowerCase(),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid suppressing normal short acknowledgements

When a Feishu final reply is legitimately just OK, 好的, 收到, or another 1–2 character acknowledgement, this new empty-shell classifier makes shouldDeliverText false and deliver() returns without sending anything. The dispatcher still records the final as queued/successful (src/auto-reply/reply/reply-dispatcher.ts:206 and :248), so the Feishu no-visible fallback in extensions/feishu/src/bot.ts:1782 does not run because counts.final is nonzero and no final failed. This turns common visible replies into silent drops; the suppression needs to be gated to the specific SOP/internal-noise shape rather than all short acknowledgements.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 12, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

@wangyaok1 thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@wangyaok1 thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(feishu): keep memory probe replies visible This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jul 26, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict stalled_unproven_pr (decision packet 2026-07-26T04:16:59.300Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

@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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants