Skip to content

fix: add missing metadata fields to HTTP POST /remember (#682) - #683

Merged
ajianaz merged 2 commits into
developfrom
fix/remember-metadata-fields-682
Jul 14, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/remember-metadata-fields-682

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #682

RememberRequest was missing 5 fields that the CLI supports, making /recall entity/category filters unusable for HTTP-stored memories.

Changes

  • types.rs: Added 5 new Option fields to RememberRequest:
    • entity — stored as metadata key "entity"
    • category — stored as metadata key "category"
    • metadata — arbitrary JSON object merged into metadata map
    • source — provenance, set via set_source() after storage
    • source_type — defaults to "user"
  • handlers.rs: Merges entity/category/metadata into the metadata map (matching CLI), and calls set_source() after successful remember (matching CLI). Logs error if set_source fails.

Backward Compatibility

All new fields are Option<String> / Option<serde_json::Value> with #[serde(default)]. Existing clients that don't send these fields are unaffected — zero breaking change.

Test Plan

  • curl -X POST /remember -d '{"content":"test","entity":"foo","category":"bar"}' → stores with metadata
  • curl -X POST /recall -d '{"query":"test","entity":"foo"}' → returns the memory
  • curl -X POST /remember -d '{"content":"test","source":"cli","source_type":"manual"}' → source columns set
  • Existing clients without new fields → unchanged behavior

RememberRequest was missing 5 fields that the CLI supports:
- entity: stored as metadata key "entity"
- category: stored as metadata key "category"
- metadata: arbitrary JSON object merged into metadata map
- source/source_type: set via set_source() after storage

All new fields are Option + serde(default), fully backward compatible.
Enables /recall entity/category filters to work with HTTP-stored memories.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit e819dba into develop Jul 14, 2026
8 checks passed
@ajianaz
ajianaz deleted the fix/remember-metadata-fields-682 branch July 15, 2026 11:19
ajianaz added a commit that referenced this pull request Aug 13, 2026
…-682

fix: add missing metadata fields to HTTP POST /remember (#682)
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.

fix: add missing metadata fields to HTTP POST /remember

1 participant