Repository navigation
fix(harness): reject incomplete memory consolidation - #3857
Merged
Merged
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
jujn
approved these changes
Oct 30, 2026
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
Summary
An output-limit response currently replaces
MEMORY.mdand advances its consolidation watermark, losing the prior curated memory. Reject incomplete or invalid candidates before writing, and advance the watermark only after confirming the write.Reuse
ContextModelCalls.auxiliary,FinishReasons, and the existing workspace/store routing. Keep the body-text target separate from the model API output limit. Update both memory guides; an unconfirmed write preserves the watermark but may already have changed the body.Refs #3834, slice 05. The shared tracking issue remains open for the other slices.
Evidence
lengthresponse passes the existing text-only accumulator and overwrites memory/progress.After:
lengthPartialRejected_thenValidResultCommittedpreserves the old memory/watermark for that response, then commits a subsequent complete candidate.mvn -B -T1C -pl agentscope-harness -am spotless:check testpassed: 5,040 tests, no failures/errors, 41 skipped (Core: 2,942; AG-UI: 554; Harness: 1,544).npm test(13 passed) andnpm run validatepassed. The full-sitenpm run broken-linksreports 2,222 links in 328 files on Windows, matching the existing recorded count; this change adds no links.spotless:applyandgit diff --checkpassed. The full repository suite and live-provider tests were not run.Merge Danger
Door: two-way. No public API, dependency, or storage-format changes.
Blast Radius: memory. Consolidation can retry ledgers when a candidate is refused or a write cannot be confirmed; no cross-store transaction is introduced.
Checklist
mvn spotless:apply.