Skip to content

remember (plain path): --type silently normalized to fact — contract break for typed writers #1302

Closed

Description

@ajianaz

What (description of the change)

uteke remember (plain namespace path, non---room) silently normalizes an unknown/unroutable --type value to fact. Repro on uteke CLI 0.19.0:

uteke remember "ISOLATION-TEST decision-typing direct" \
  --namespace repo-mem-e2e --type decision --tags "test,isolation" \
  --source "cto-debug" --source-type system
# → "✓ Memory stored"
uteke recall ... --json   # memory_type: "fact"   ← silently downgraded

Expected: either store the requested type (decision is a valid type on the ROOM path) or reject the call with an explicit error listing the supported values for this path. Silent fallback breaks the caller's data model contract.

Discovered while validating tole #143 (memory-loop decision typing): tole sends --type decision (unit-pinned in tole's argv contract) and the write lands with memory_type: fact; only the wrote tag survives as the discriminator.

Why (the problem you're solving)

Honest-data principle: a caller that asks for a specific type must be able to trust what it reads back. Silent normalization makes "recall every decision" queries (the whole point of typing) impossible to express reliably, and the mismatch is invisible at write time.

Testing (how you verified this works)

  • Isolation repro above (direct CLI, no tole involved): 2026-10-01, uteke 0.19.0.
  • Room-path control: uteke remember --room X --type decision is accepted per the documented room-type vocabulary — the gap is specific to the plain namespace path (or its schema mapping).

Activity

  1. added
    bug
    on Oct 1, 2026
  2. ajianaz commented on Oct 1, 2026

    @ajianaz
    CollaboratorAuthor

    Revalidation after the owner's fix (2026-10-01 ~14:25 WIB): still reproduces on the plain namespace path.

    • New isolation write: uteke remember "ISOLATION-TEST-3 decision typing revalidation" --namespace repo-mem-e2e --type decision ... → stored as memory_type: fact (id 01a0f65c-039, tags [test, isolation-3]).
    • tole 🔧 [P3] Fix shell hook PROMPT_COMMAND duplication issue #143's session summary entry (tags tole,session,wrote) — sent with --type decision — also lands as fact.
    • Environment: CLI /opt/data/.local/bin/uteke (build 2026-09-29, thin HTTP client → server at :8767 answers {"status":"ok"}). uteke-core already parses/serializes decision (memory/types.rs), so the downgrade is happening server-side on the plain /remember path (the room path honors it).

    Suspect: the server's remember handler maps the incoming type through a narrower enum than the room path (or validates against a vocabulary that predates decision) and silently defaults to fact. Suggested fix: server accepts the full MemoryType vocabulary on the plain path (parity with rooms) — or rejects unknown values loudly instead of defaulting.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions