Repository navigation
Description
Summary
The /remember endpoint ignores custom metadata. The RememberRequest struct (main.rs:98-113) only accepts content, tags, namespace, type, valid_from, valid_until, detect_contradiction — no meta, metadata, entity, category, importance, slug, or source fields.
The server builds metadata from only type → metadata["type"], valid_from → metadata["valid_from"], valid_until → metadata["valid_until"]. All custom metadata sent via API is silently discarded.
Meanwhile, the CLI (--meta key:value, --entity) correctly stores custom metadata to the SQLite metadata TEXT column as JSON. So the DB schema fully supports it — only the API is missing.
Root Cause
uteke-server/src/main.rs lines 98-113 (RememberRequest) and 606-620 (metadata builder).
Expected Behavior
POST /remember
{
"content": "DrawOver launched on Product Hunt",
"tags": ["drawover", "product-launch"],
"namespace": "cmo",
"entity": "drawover-ph-launch",
"category": "marketing",
"meta": {"platform": "producthunt", "votes": 42, "url": "https://..."}
}Should store the full metadata JSON in the metadata column, matching what the CLI does.
Acceptance Criteria
Functional
- Add
entity,category,meta(arbitrary JSON object),importance,slug,sourcefields toRememberRequest - Merge custom fields into the
metadatamap alongside auto-generated ones (type,valid_from,valid_until) -
metafield accepts arbitrary JSON object — merged directly into metadata - Existing CLI-stored memories with custom metadata are correctly returned by API (no regression)
Verification (CMO can run without reading code)
-
curl POST /rememberwith{"content":"test","entity":"drawover","meta":{"votes":42}}→ returns 200 with metadata containing entity & votes -
curl POST /recallwith{"query":"test","entity":"drawover"}→ returns the remembered memory -
curl POST /rememberwithentity: ""ormeta: null→ returns 200, no crash, empty values ignored -
curl POST /rememberwith no custom fields → returns 200, behavior identical to before
Tests
- Unit: remember with custom metadata → recall with entity filter matches
- Unit: remember with empty meta → recall still works (no null crash)
Priority
High — blocks all structured data use cases (social media tracking, CRM, etc.)
Activity
ajianaz commentedon Jul 14, 2026
Duplicate of #672 (same scope, newer issue)