Skip to content

fix: /remember does not set memory_type column #656

Closed

Description

@ajianaz

Summary

When sending type: "event" via the /remember API, the memory_type column in SQLite is always set to "fact" — the default. The type parameter is only stored in metadata["type"] but the actual memory_type column is never updated.

This means SELECT * FROM memories WHERE memory_type = 'event' returns 0 rows for API-created memories.

Root Cause

uteke-server/src/main.rs line 634 — uteke.remember() called with metadata but memory_type not set from req_data.r#type.

Acceptance Criteria

Functional

  • Map req_data.r#type to the memory_type parameter when calling uteke.remember()
  • API memories with type: "event" appear in WHERE memory_type = 'event' queries
  • Existing behavior unchanged when type omitted (defaults to fact)

Verification (CMO can run without reading code)

  • curl POST /remember with {"content":"deploy v2","type":"event"} → 200
  • curl POST /list or query DB directly: the memory has memory_type = "event" (not "fact")
  • curl POST /remember without type field → 200, memory_type = "fact" (backward compat)
  • curl POST /remember with {"type":"invalid_type"} → 200, stored as-is (no strict validation — CLI also accepts any string)
  • CLI uteke recall --type event → returns the API-created memory

Tests

  • Unit: remember with type=event → verify memory_type column == event
  • Unit: remember without type → verify memory_type column == fact (default)

Priority

High — data integrity issue affecting all non-fact memories created via API.

Activity

  1. added
    bug
    priority:high
    scope:api
    on Jul 14, 2026
  2. ajianaz commented on Jul 14, 2026

    @ajianaz
    CollaboratorAuthor

    Duplicate of #673 (same bug, newer issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:highscope:api

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions