Skip to content

fix(feishu): prefer native thread id for topic sessions - #92128

Closed
hanhuihanhui wants to merge 1 commit into
openclaw:mainfrom
hanhuihanhui:fix/feishu-thread-id-topic-scope
Closed

hanhuihanhui wants to merge 1 commit into
openclaw:mainfrom
hanhuihanhui:fix/feishu-thread-id-topic-scope

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: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 11, 2026
@clawsweeper

clawsweeper Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask.

Close this stale external PR: it has remained unchanged since June 11, 2026, after a dated request for real Feishu proof, and its global session-key priority change still introduces a normal-group continuity regression. The underlying Feishu report remains open at #85653, so this does not discard the product problem.

So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again.

Review details

Best possible solution:

Retain the current normal-group continuity rule and land a fresh, rebased Feishu fix only when native topic context is positively identified at the inbound owner boundary, with regression coverage for both native topic groups and normal groups.

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

No live after-fix reproduction is available from this PR. Source inspection provides a high-confidence routing trace: a normal group can move from the current root_id key to the branch's thread_id key when a follow-up supplies both fields.

Is this the best way to solve the issue?

No. A global thread_id preference is not the narrowest safe fix because current main intentionally limits that priority to native topic groups; native-topic detection must remain explicit while normal groups retain their existing key.

Security review:

Security review cleared: The two-file routing and test change introduces no dependency, secret, permission, workflow, or supply-chain concern.

AGENTS.md: found and applied where relevant.

What I checked:

  • Current main preserves normal-group continuity: Current main creates a topic-group-specific thread identifier only when chatType is topic_group; otherwise its topic scope keeps rootId ahead of threadId. That preserves the established normal-group session key when a later event gains a thread identifier. (extensions/feishu/src/bot-content.ts:1391, 9c3503a4437f)
  • Branch broadens the priority change beyond native topic groups: The proposed patch removes the chatType === "topic_group" guard and changes the shared fallback order to threadId, then rootId; its revised regression test explicitly accepts the resulting omt_* key for a later normal-group event. (extensions/feishu/src/bot-content.ts:86, 59a211ece933)
  • Prior blocker remains unresolved: The completed ClawSweeper review cycles already identified the same P1 continuity problem, and the current head is still 59a211ece93301416320004a03f719330090e833 with no corrective follow-up commit. (extensions/feishu/src/bot.test.ts:3100, 59a211ece933)
  • Proof request expired without response: The external PR body leaves every real-behavior-proof field blank. triage: needs-real-behavior-proof and status: 📣 needs proof were applied on June 11, 2026; the stale notice on July 21, 2026 and unchanged head establish an adequate response window. (59a211ece933)
  • Canonical remaining report stays open: The open report documents the same omt_* versus om_* Feishu topic-session split and remains the appropriate place for a replacement fix that preserves normal-group behavior.

Likely related people:

  • joeyzenghuan: Authored the broader open Feishu topic-session repair that explicitly distinguishes native topic context from normal groups and overlaps this routing boundary. (role: related Feishu repair contributor; confidence: low; commits: 68eb9300fc36; files: extensions/feishu/src/bot-content.ts, extensions/feishu/src/bot.test.ts)

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

@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: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 11, 2026
@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. and removed stale Marked as stale due to inactivity labels Jul 21, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jul 30, 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: XS 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.

1 participant