Skip to content

fix: uteke recall flag and JSON parser (#259) - #272

Merged
ajianaz merged 1 commit into
developfrom
fix/uteke-recall-json
Jun 13, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/uteke-recall-json

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Bug Fix: Uteke recall broken since v0.0.13

Root Cause

Uteke v0.0.13 changed the recall CLI flags:

  • Before: --format json
  • After: --json

Cora was still using the old flag, causing uteke recall to exit non-zero → 0 memories recalled every time.

Secondary bug: the JSON parser assumed line-delimited JSON with content at top level, but uteke --json outputs a JSON array with nested structure: [{"memory":{"content":"..."},"score":0.xx}].

Fix

  1. --format json → --json (1 flag instead of 2)
  2. Parse as JSON array, extract memory.content (not top-level content)

Verification

Before fix:

Uteke recall returned non-zero: error: unexpected argument '--format' found
Recalled 0 memories from Uteke

After fix:

Uteke detected — memory integration enabled
Recalled 2 memories from Uteke
ℹ Review enriched with Uteke memory context.

Files Changed

File Change
src/engine/memory.rs Fix flag + parser in recall_context()

Testing

  • cargo test — 517/517 pass
  • cargo clippy --all-targets -- -D warnings — clean
  • Runtime verified: cora review --staged --memory recalls 2 memories

- 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
@ajianaz
ajianaz merged commit bef18f1 into develop Jun 13, 2026
10 checks passed
@ajianaz
ajianaz deleted the fix/uteke-recall-json branch June 13, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant