Repository navigation
fix(harness): preserve structured output during snapshot overflow recovery - #4237
Merged
jujn merged 2 commits intoNov 18, 2026
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 |
guslegend0510
approved these changes
Nov 18, 2026
guslegend0510
left a comment
Contributor
There was a problem hiding this comment.
Approved. The snapshot overflow retry now preserves the requested structured output and avoids duplicating user input. I verified that both the class-based and JSON Schema regression cases fail on the base implementation and pass with this fix.
jujn
approved these changes
Nov 18, 2026
Collaborator
|
Assign to @guslegend0510 (Review) |
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@5a7e8e533.Description
Fixes #4235.
In snapshot mode (
journalEnabled(false)), context-overflow recovery retries structured requests through the plain call overload. The call can complete after emergency compaction without the structured data requested through Class or JsonNode schema parameters.Preserve the original invocation through the recovery chain while passing the adjusted retry input. This retains the requested output format and the existing protection against duplicate user input.
Add four regression cases covering Class/schema calls with and without overflow, and update the English and Chinese context-management documentation.
Testing
HarnessAgentOverflowRecoveryTest: all 7 cases passed. Before the fix, both new overflow cases failed.mvn -B -T1C clean verifypassed on a clean source snapshot of main@5a7e8e533 plus this patch: 12,888 passed, 245 skipped, and no failures or errors.git diff --checkpassed.npm test(20 tests),npm run validateandnpm run broken-links.The development workspace contains an unrelated, pre-existing untracked LocalFilesystemErrorHandlingTest with four failures. It was left untouched; the full-build result above applies to the clean source snapshot containing this patch.
Overflow regression tests use a local model fixture without a real provider or API key.
Checklist
mvn spotless:applyclean verifyon the clean source snapshot described above