Skip to content

feat(lark): suspend workers when their topic root is recalled - #3503

Draft
HomyeeKing wants to merge 3 commits into
deepcoldy:masterfrom
HomyeeKing:feat/topic-recall-release
Draft

HomyeeKing wants to merge 3 commits into
deepcoldy:masterfrom
HomyeeKing:feat/topic-recall-release

Conversation

@HomyeeKing

@HomyeeKing HomyeeKing commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Recalling or deleting a topic root can leave its worker consuming memory. This makes a delivered root-withdrawal event suspend this bot's exact bound worker by default: current execution is terminated, while the logical session, topic binding, saved context and working directory remain available for cold resume.

There is no new configuration switch, configuration page, startup scan or periodic polling. The next valid task uses the existing cold-resume path. Explicit /close retains its existing session-close meaning.

  • im.message.recalled_v1 dispatches lifecycle work after ACK, independently of group-context recording, and deduplicates event delivery.
  • Suspension uses the existing verified backing teardown directly, including during working/analyzing states; it does not queue behind natural turn completion.
  • Match bot, chat, thread scope, root ID, worker identity and generation. Recalled replies, other topics and peer workers are unaffected; stale bindings cannot retire a replacement worker.
  • Persist the confirmed suspend reason and publish it to Dashboard. Clear it on cold resume. Refused or unverified teardown is not reported as success.

Dashboard feedback

The configuration UI was removed because this is now default lifecycle behavior. This screenshot shows the actual SessionsTableBase component with synthetic session rows, including the new “已挂起 · 话题已删除或撤回” state. It is browser-rendering evidence, not a live Feishu integration test.

Dashboard topic worker suspension

Validation: seven related suites pass with 914 tests, including 11 topic-specific suspension cases and suspension during idle/working/analyzing. Full bun run build and its type/asset audits pass; the final Dashboard label was rebuilt and browser-checked for visible suspension reason, unaffected peer row, no horizontal overflow and no browser errors. git diff --check passes.

Limits: the native Lark “Close current topic” action still lacks a confirmed subscribable event in the inspected public topic documentation and SDK, so that integration is not claimed as complete. This entry point currently uses supported local tmux/herdr/zellij/zmx suspension; PTY, remote backends and durable primary retain existing refusal/fencing behavior. Live Feishu end-to-end delivery has not been verified.

@HomyeeKing HomyeeKing changed the title fix(lark): release workers when their topic root is recalled feat(lark): add configurable automatic topic resource cleanup Nov 16, 2026
@HomyeeKing
HomyeeKing marked this pull request as ready for review November 16, 2026 05:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T05:49:28.244651Z f8417f5 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@HomyeeKing
HomyeeKing marked this pull request as draft November 16, 2026 05:57
@HomyeeKing HomyeeKing changed the title feat(lark): add configurable automatic topic resource cleanup feat(lark): suspend workers when their topic root is recalled Nov 16, 2026
@deepcoldy

Copy link
Copy Markdown
Owner

你好,想确认一下这个 draft 的状态:d285219 这一版是否已经做完、准备转 ready?

另外两个问题:一是这版默认开启且没有开关,会改变 master 上「撤回消息不影响会话」的现有行为,这点需要和维护者对齐;二是在 BOTMUX_COORDINATION_MODE=primary 下这个功能不生效、只打 warn,是否需要补上?

@deepcoldy

Copy link
Copy Markdown
Owner

你好,跟进一下 11-19 的确认:这个 Draft PR 已超过一周没有更新且当前与 master 冲突。这个功能本身改动清晰,但目前默认开启会改变现有「撤回消息不影响会话」的行为,且 BOTMUX_COORDINATION_MODE=primary 路径未覆盖。如果你还打算继续(例如改成默认关闭开关并同步最新 master),请回复告知;如 3 天内无回复或暂不打算继续,我们先关闭这个 Draft,后续随时可 reopen。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants