Repository navigation
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
dargoner
force-pushed
the
fix/compaction-media-semantics
branch
from
October 18, 2026 13:13
3ba92eb to
06acb88
Compare
dargoner
force-pushed
the
fix/compaction-media-semantics
branch
from
October 29, 2026 11:59
06acb88 to
06610b0
Compare
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
…semantics # Conflicts: # agentscope-harness/src/main/java/io/agentscope/harness/agent/memory/compaction/ConversationCompactor.java # agentscope-harness/src/test/java/io/agentscope/harness/agent/memory/compaction/ConversationCompactorTest.java # docs/v2/en/docs/harness/context.md # docs/v2/zh/docs/harness/context.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
2.1.0-SNAPSHOT (based on
main@ 5f7f8e6)Description
Background
Compaction did not treat media specially: messages that carry images/audio (base64 payloads or file references) could be silently dropped from the summarization input, and tool-result eviction could prune media-bearing blocks, leaving summaries and subsequent requests with dangling media references.
Changes
MediaReference,CompactionMediaRenderer): media blocks are extracted and replaced with stable placeholder tokens plus digest-based references, so summaries keep the semantic slot without shipping raw bytes to the summarization model.ConversationCompactor,CompactionConfig): messages carrying media are protected from summarization-dropping; the summarization input renders them as placeholders while the original messages stay in the retained tail.ToolResultEvictionMiddleware): pruning skips media-bearing blocks (with redacted logs and failure paths) so eviction never creates dangling references.Tests
CompactionMediaRendererTest(new): 11 cases.ConversationCompactorTest8 → 19,ToolResultEvictionMiddlewareTest7 → 9.agentscope-core(2630) +agentscope-harness(1269) suites: 0 failures (18 environment skips, same as baseline).mvn spotless:checkpasses; docs (EN/ZH) updated andnpm test/npm run checkpass.Checklist
mvn spotless:applymvn test)