Repository navigation
fix: uteke recall flag and JSON parser (#259) - #272
Merged
Merged
Conversation
- Fix flag: --format json → --json (uteke v0.0.13+ API change)
- Fix parser: uteke --json outputs array [{"memory":{"content":...}}]
not line-delimited JSON with top-level content
- Before: recall always returned 0 results (non-zero exit on bad flag)
- After: recall works correctly, memories enriched into review prompt
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.
Bug Fix: Uteke recall broken since v0.0.13
Root Cause
Uteke v0.0.13 changed the
recallCLI flags:--format json--jsonCora was still using the old flag, causing
uteke recallto exit non-zero → 0 memories recalled every time.Secondary bug: the JSON parser assumed line-delimited JSON with
contentat top level, but uteke--jsonoutputs a JSON array with nested structure:[{"memory":{"content":"..."},"score":0.xx}].Fix
--format json→--json(1 flag instead of 2)memory.content(not top-levelcontent)Verification
Before fix:
After fix:
Files Changed
src/engine/memory.rsrecall_context()Testing
cargo test— 517/517 passcargo clippy --all-targets -- -D warnings— cleancora review --staged --memoryrecalls 2 memories