Skip to content

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

Open
guslegend0510 wants to merge 4 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1447
Open

修复:AutoContextMemory 在 WebFlux/reactive 场景下的阻塞问题#1480
guslegend0510 wants to merge 4 commits 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

CLAassistant commented May 24, 2026

CLA assistant check
All committers have signed the CLA.

@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!

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/ext/memory Memory/session extension implementations labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ext/memory Memory/session extension implementations bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants