Skip to content

fix(feishu): scope queues by topic sessions - #89687

Closed
hanhuihanhui wants to merge 2 commits into
openclaw:mainfrom
hanhuihanhui:fix/feishu-topic-sequential-key
Closed

hanhuihanhui wants to merge 2 commits into
openclaw:mainfrom
hanhuihanhui:fix/feishu-topic-sequential-key

Conversation

@hanhuihanhui

Copy link
Copy Markdown

Summary

What problem does this PR solve?

Why does this matter now?

What is the intended outcome?

What is intentionally out of scope?

What does success look like?

What should reviewers focus on?

Summary guidance

This PR description is the contributor's durable explanation of the change. Write it for human maintainers first; ClawSweeper and Barnacle use the same text to understand intent, proof, risk, and current review state.

Describe the intent and outcome in 2-5 bullets. Avoid restating the diff; reviewers and bots can read the changed files.

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

Linked context

Which issue does this close?

Closes #

Which issues, PRs, or discussions are related?

Related #

Was this requested by a maintainer or owner?

Linked context guidance

Link the issue, PR, discussion, maintainer request, or owner request that explains why this PR should exist. Maintainer context helps reviewers and automation distinguish intended work from drive-by churn.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed:
  • Real environment tested:
  • Exact steps or command run after this patch:
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
  • Observed result after fix:
  • What was not tested:
  • Proof limitations or environment constraints:
  • Before evidence (optional but encouraged):
Real behavior proof guidance

External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only.

Screenshots are encouraged even for CLI, console, text, or log changes. Terminal screenshots, copied live output, redacted runtime logs, recordings, and linked artifacts count.

If your environment cannot produce the ideal proof, explain that under Proof limitations or environment constraints so reviewers and ClawSweeper can direct the next step properly.

Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.

Tests and validation

Which commands did you run?

What regression coverage was added or updated?

What failed before this fix, if known?

If no test was added, why not?

Testing guidance

List focused commands, not every incidental check. CI is useful support, but external PRs still need real behavior proof above when behavior changes.

Risk checklist

Did user-visible behavior change? (Yes/No)

Did config, environment, or migration behavior change? (Yes/No)

Did security, auth, secrets, network, or tool execution behavior change? (Yes/No)

What is the highest-risk area?

How is that risk mitigated?

Risk guidance

Use this for author judgment that is not obvious from the diff. ClawSweeper can see touched files, but it cannot know which behavior you think is risky, why the risk is acceptable, or what mitigation reviewers should verify.

Current review state

What is the next action?

What is still waiting on author, maintainer, CI, or external proof?

Which bot or reviewer comments were addressed?

Review state guidance

Keep this as the durable state for review progress. If useful information appears in comments, fold the current next action or blocker back here so maintainers and ClawSweeper do not need to reconstruct state from comment history.

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

clawsweeper Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: current main still has the Feishu topic queue bug, but the remaining work is now owned by the cleaner open canonical path at #96315, which is merge-clean and has live Feishu proof; this branch is conflicting, has blank real-behavior proof, and still carries queue-ordering risk.

Root-cause cluster
Relationship: superseded
Canonical: #96315
Summary: This PR and the canonical PR address the same Feishu topic queue/session root problem; the canonical PR is open, merge-clean, and has live proof, while this branch is conflicting and lacks proof.

Members:

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

Canonical path: Use #96315 as the canonical Feishu topic queue/session repair path and close this conflicting no-proof branch.

So I’m closing this here and keeping the remaining discussion on #96315.

Review details

Best possible solution:

Use #96315 as the canonical Feishu topic queue/session repair path and close this conflicting no-proof branch.

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

Yes, source-level. Current main and v2026.6.10 still compute normal Feishu sequential keys from account plus chat, while current session routing can already use topic-scoped peer IDs.

Is this the best way to solve the issue?

No. This branch is an earlier plausible implementation, but the best remaining path is to finish the proof-positive canonical repair at #96315 rather than keep overlapping conflicting PRs open.

Security review:

Security review cleared: No concrete security or supply-chain concern was found; the diff stays within Feishu runtime TypeScript and tests without dependency, workflow, lockfile, secret, or package metadata changes.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Root AGENTS.md and scoped extensions/AGENTS.md were read fully; the review applied the high-confidence PR review, plugin-boundary, proof, message-delivery, and session-state guidance for Feishu plugin work. (AGENTS.md:1, cd31cbcd17df)
  • Current main still has chat-scoped Feishu queue keys: On current main, getFeishuSequentialKey builds the normal base key from account plus chat id only; this confirms the underlying Feishu topic queue problem is not implemented on main. (extensions/feishu/src/sequential-key.ts:8, cd31cbcd17df)
  • Latest release has the same chat-scoped key: The latest release tag v2026.6.10 contains the same chat-scoped sequential key, so the product bug is not already shipped fixed. (extensions/feishu/src/sequential-key.ts:8, aa69b12d0086)
  • Current session routing already supports topic-scoped peer IDs: Current main resolves Feishu group_topic and group_topic_sender peer IDs through resolveFeishuGroupSession, which is the session identity contract the queue fix needs to align with. (extensions/feishu/src/bot-content.ts:82, cd31cbcd17df)
  • This PR is not a viable landing branch: Live GitHub state reports this PR as CONFLICTING/DIRTY, with blank real behavior proof fields and a failing Real behavior proof check. (1de8380ac54b)
  • This PR awaits async key resolution before enqueue: At the PR head, dispatch waits for async sequential-key resolution before putting the message task into the queue, which leaves a fallback ordering gap for topic starters whose thread id is missing or cannot hydrate. (extensions/feishu/src/monitor.message-handler.ts:188, 1de8380ac54b)

Likely related people:

  • ngutman: Commit 4b4ec4d added Feishu /btw out-of-band lane behavior and touched sequential-key tests, which this PR changes around. (role: sequential-lane contributor; confidence: high; commits: 4b4ec4dbc298; files: extensions/feishu/src/sequential-key.ts, extensions/feishu/src/sequential-key.test.ts, extensions/feishu/src/sequential-queue.ts)
  • yfge: Commit 36d69d0 introduced Feishu sender/topic-scoped group session routing, the identity contract the queue key work is trying to reuse. (role: group-session scope feature introducer; confidence: high; commits: 36d69d05e212; files: extensions/feishu/src/bot.ts, extensions/feishu/src/bot.test.ts, extensions/feishu/src/config-schema.ts)
  • songyaolun: Commit f22fc17 added Feishu thread_id preference for topic session routing adjacent to the native topic identity behavior in this PR cluster. (role: topic routing contributor; confidence: high; commits: f22fc17c78c2; files: extensions/feishu/src/bot.ts, extensions/feishu/src/bot.test.ts)
  • steipete: Commit bb5e278 stabilized Feishu topic group session keys across bot-content and tests, defining current topic_group routing behavior this queue work must align with. (role: recent topic-session contributor; confidence: high; commits: bb5e278f63bd; files: extensions/feishu/src/bot-content.ts, extensions/feishu/src/bot.ts, extensions/feishu/src/bot.test.ts)
  • martingarramon: Commit 0028e60 added the per-chat sequential queue timeout behavior next to the scheduling path affected by this PR. (role: recent queue-path contributor; confidence: medium; commits: 0028e6040a73; files: extensions/feishu/src/monitor.message-handler.ts, extensions/feishu/src/sequential-queue.ts, extensions/feishu/src/sequential-queue.test.ts)

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

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jun 3, 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. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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