Skip to content

fix: acknowledge IM tasks before debounce and queue wait - #233

Open
Ivor-NCUT wants to merge 3 commits into
zarazhangrui:mainfrom
Ivor-NCUT:fix/early-working-reaction-232
Open

fix: acknowledge IM tasks before debounce and queue wait#233
Ivor-NCUT wants to merge 3 commits into
zarazhangrui:mainfrom
Ivor-NCUT:fix/early-working-reaction-232

Conversation

@Ivor-NCUT

Copy link
Copy Markdown

Closes #232.

Moves the existing Typing working reaction from agent-run start to accepted-message intake. This gives users immediate feedback even when:

  • the 600 ms debounce window has not elapsed;
  • the same scope is waiting behind a long active run;
  • the global process pool delays the actual agent spawn.

The reaction promise stays non-blocking. Reactions are cleaned up after the corresponding batch finishes, including messages coalesced into one batch and messages cancelled by a slash command.

Validation:

  • pnpm vitest run tests/integration/bot/markdown-stream-startup-failure.test.ts (12 passed)
  • pnpm typecheck
  • pnpm build
  • git diff --check

@Ivor-NCUT

Copy link
Copy Markdown
Author

补充修复了截图中的长富文本 @ 场景和启动失败反馈:

  • 当 SDK 错误地给出 mentionedBot=false 时,用消息自带的结构化 mention + bot open_id/user_id 恢复识别;不使用名称或正文猜测。
  • 一旦消息通过访问控制与 @ 校验,仍会在 debounce / Agent 启动之前立即添加 Typing reaction。
  • Agent 进程启动失败时,固定回复:任务启动失败,请稍后重试。如果问题持续,请联系管理员检查 Agent 配置。,并移除 reaction,不泄露内部错误。
  • 新增长 post mention、提前 reaction、启动失败三个回归测试。

验证:

  • pnpm test -- --reporter=dot: 98 files / 626 tests passed
  • pnpm typecheck
  • pnpm build
  • git diff --check

生产日志中的对应证据是:一条带真实 @ 的长富文本消息进入 intake 后被记录为 skip-no-mention;本补丁修复的正是该结构化 mention 被 SDK 汇总标志漏判的路径。

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.

[UX/Bug] Follow-up IM messages silently queue behind an active same-scope run

1 participant