Repository navigation
fix(feishu): scope topic queue dispatch - #93266
LucienShui wants to merge 14 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 11:27 PM ET / 03:27 UTC. Summary PR surface: Source +572, Tests +1884, Docs +1175, Config -12, Other -696. Total +2923 across 69 files. Reproducibility: yes. at source level. Current main still returns a chat-wide Feishu queue key for normal messages, while the PR body provides redacted after-fix Feishu logs showing different topics dispatch concurrently and same-topic replies stay FIFO. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve the Feishu queue/session fix idea, but land it as a clean Feishu-only branch with focused tests and the existing redacted Feishu proof, then let maintainers choose it as the canonical path over the overlapping Feishu PRs. Do we have a high-confidence way to reproduce the issue? Yes at source level. Current main still returns a chat-wide Feishu queue key for normal messages, while the PR body provides redacted after-fix Feishu logs showing different topics dispatch concurrently and same-topic replies stay FIFO. Is this the best way to solve the issue? No, not as the branch currently stands. The Feishu implementation is a plausible right-layer fix, but the best mergeable solution is a Feishu-only cleaned branch plus maintainer/channel-owner acceptance of the fallback ordering behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa3c9de45965. Label changesLabel justifications:
Evidence reviewedPR surface: Source +572, Tests +1884, Docs +1175, Config -12, Other -696. Total +2923 across 69 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
c337db1 to
85c6d6b
Compare
85c6d6b to
205e357
Compare
|
@clawsweeper re-review Updated this PR to address the inbound debounce finding: Feishu |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Ready for maintainer/channel review. Current state:
Suggested review focus:
|
205e357 to
e4ca6a8
Compare
|
Hi @vincentkoc and @steipete, sorry for the direct ping. Could one of you take a look when you have bandwidth? This Feishu PR is now CI-green and merge-clean. It includes real Feishu after-fix proof in the PR body, and ClawSweeper has it at The main review question is whether this should be treated as the canonical Feishu topic queue/session identity fix versus #72972 / #64920. Thanks. |
cf892a7 to
2cb024f
Compare
|
Closing this PR because it looks dirty (too many unrelated or unexpected changes). This usually happens when a branch picks up unrelated commits or a merge went sideways. Please recreate the PR from a clean branch. |
Summary
/stopand/btw, while keeping other session-mutating commands behind the normal per-chat key-resolution gate.topic_groupstarter messages that arrive withoutthread_id, and passes the hydrated event into message handling so queue routing and session routing do not drift./stopand/btwescape behavior, and whether queue/session identity stays aligned.Linked context
Which issues, PRs, or discussions are related?
Related #72972
Related #64920
Was this requested by a maintainer or owner?
No direct maintainer request in this PR. This follows prior Feishu topic queue attempts and keeps the fix narrower by preserving existing scoped session semantics.
Real behavior proof (required for external PRs)
thread_id.c337db1with FeishugroupSessionScope=group_topictemporarily enabled for the proof. The workspace, topic group id, message ids, and card ids are redacted below.20260616012136, then manually sent two replies in the same Feishu topic with marker202606160131.Different-topic concurrency under the same Feishu topic group:
Same-topic reply FIFO in the same Feishu topic:
01:21:41.152while Topic A was still running and before either response completed; both responses began streaming about 55 ms apart at01:21:56, showing different Feishu topic keys under the same topic group can run concurrently. The same-topic reply proof dispatched reply 2 only after reply 1 completed, preserving FIFO in that reply lane.omt_*topic id while replies surfaced anom_*id before session bootstrap. The starter/reply identity alignment is covered by the focused unit and handler-level regression tests below.Tests and validation
Which commands did you run?
node scripts/run-vitest.mjs extensions/feishu/src/sequential-key.test.ts extensions/feishu/src/monitor.message-handler.sequential-key.test.tsnode scripts/run-vitest.mjs extensions/feishu/node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/feishu/src/monitor.account.ts extensions/feishu/src/monitor.message-handler.ts extensions/feishu/src/sequential-key.ts extensions/feishu/src/sequential-key.test.ts extensions/feishu/src/monitor.message-handler.sequential-key.test.tsgit diff --check.agents/skills/autoreview/scripts/autoreview --mode localWhat regression coverage was added or updated?
extensions/feishu/src/sequential-key.test.tsfor group/session scopes, per-group overrides, legacy topic mode, successful and failed thread hydration, hydration timeout, and/stop//btwnon-hydrating escape lanes.extensions/feishu/src/monitor.message-handler.sequential-key.test.tsfor async key resolution ordering, hydrated event forwarding, fallback ordering,/stopbypass, session-mutating command ordering, and concurrent different-topic dispatch.What failed before this fix, if known?
topic_groupstarters withoutthread_idcould choose a fallback key before session routing later observed the hydrated thread identity./stopand/btw.If no test was added, why not?
Tests were added.
Risk checklist
Did user-visible behavior change? (
Yes/No)Yes. Feishu topic-group dispatch can now run different topic/sender-scoped queues concurrently while preserving same-topic ordering.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)No.
What is the highest-risk area?
The fallback path when a native topic starter cannot hydrate
thread_idbefore queue selection.How is that risk mitigated?
Fallback starters set a handler-level ordering flag so later non-escape messages in the same chat wait for that starter to be enqueued and completed before resolving their own keys.
/stopand/btwremain chat-wide escape lanes and do not trigger hydration.Current review state
What is the next action?
Real Feishu after-fix proof has been added; request maintainer review after the proof gate/checks are green.
What is still waiting on author, maintainer, CI, or external proof?
Waiting on CI/proof-gate rerun and maintainer review.
Which bot or reviewer comments were addressed?
Local autoreview findings were addressed:
/stopbypass no longer applies to generic session-mutating slash commands.