Skip to content

fix(harness): drain session mirrors on close#2149

Open
richuV wants to merge 1 commit into
agentscope-ai:mainfrom
richuV:codex/session-tree-close-barrier-2147
Open

fix(harness): drain session mirrors on close#2149
richuV wants to merge 1 commit into
agentscope-ai:mainfrom
richuV:codex/session-tree-close-barrier-2147

Conversation

@richuV

@richuV richuV commented Jul 12, 2026

Copy link
Copy Markdown

Summary:

  • add a deterministic FIFO barrier for SessionTree mirror work submitted before shutdown
  • drain pending mirrors before HarnessAgent closes its workspace index and delegate
  • replace timing-based mirror waits and cover an in-flight blocking upload

Fixes #2147

Verification: 41 focused Harness/session/memory tests passed; Spotless and git diff check passed.

@richuV richuV requested a review from a team July 12, 2026 01:16
@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.


u010143241 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...cope/harness/agent/memory/session/SessionTree.java 30.00% 6 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Adds deterministic FIFO barrier (awaitPendingMirrors) to SessionTree for draining pending async mirror operations before HarnessAgent.close(). Correct shutdown ordering, proper interrupt handling, good test coverage replacing unreliable Thread.sleep waits. No issues found.

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/harness agentscope-harness (test/runtime support) labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/harness agentscope-harness (test/runtime support) bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harness close can return before SessionTree mirror finishes using distributed store

3 participants