Skip to content

修复:AutoContextMemory 在 WebFlux/reactive 场景下的阻塞问题#1480

Open
guslegend0510 wants to merge 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1447
Open

修复:AutoContextMemory 在 WebFlux/reactive 场景下的阻塞问题#1480
guslegend0510 wants to merge 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1447

Conversation

@guslegend0510
Copy link
Copy Markdown

说明

修复 AutoContextMemory 在 WebFlux/reactive 执行链路中可能触发 .block() 阻塞 event-loop 的问题。

变更

  • compressIfNeededAsync() 暴露为 public,作为 reactive 场景的推荐入口
  • AutoContextHook 直接调用异步压缩入口,避免额外调度干预
  • 增加回归测试,验证可从非阻塞调度器正常调用异步压缩

测试

  • mvn -s codex-maven-settings.xml -pl agentscope-extensions/agentscope-extensions-autocontext-memory -am "-Dtest=AutoContextMemoryTest,AutoContextHookTest" test

关联

@guslegend0510 guslegend0510 requested a review from a team May 24, 2026 04:29
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

[Bug]:AutoContextMemory calls block() during WebFlux reactive execution

3 participants