fix(memory): accept extra digest fields - #12675
Merged
johnnyeric merged 3 commits intoJul 30, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by claude-sonnet-5 · Input: 16 · Output: 2.5K · Cached: 289.2K Review guidance: REVIEW.md from base branch |
johnnyeric
approved these changes
Jul 30, 2026
Contributor
|
Thanks for the fix! |
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.
Issue
Fixes #12674
Context
Memory digest generation can return valid JSON containing useful model-specific fields in addition to
topicandsummary. The digest schema rejected the entire response when those extra keys were present, causing amemory.errorevent and fallback behavior even though the required digest fields were valid.Implementation
Allow the digest-only schema to use Zod's default unknown-key handling. Additional fields are accepted and stripped from the parsed result, while
topicandsummaryretain their existing validation and defaults. The stricter schemas used for typed memory operations remain unchanged.A regression test covers the reported
next_stepandblockersfields and verifies that onlytopicandsummaryreach downstream code.Screenshots / Video
N/A — this is a parser behavior fix with no visual changes.
How to Test
Manual/local verification
bun test test/capture.test.tsinpackages/kilo-memory— 29 passed.bun testinpackages/kilo-memory— 165 passed.bun run typecheckinpackages/kilo-memory— passed.bun run lintat the repository root — passed with 0 errors and existing warnings only.Reviewer test steps
topicandsummaryfields plus additional keys such asnext_stepandblockers.topicandsummary.Blocked checks and substitute verification
Checklist
Get in Touch
Please reach out through GitHub on this PR.