Skip to content

A-4: Truncation-based key generation silently overwrites distinct facts #3

Description

@tcconnally

lines 303-312 (_make_key), 263 (transform)

Auto-generated keys from first ~50 chars of fact. Two different facts sharing prefix produce same (category, key) pair -- and Mimir's remember updates existing key, so second fact replaces first with no signal.

Impact: MEDIUM -- silent memory loss in core write path.

Fix: Append short content hash: key = f'{key[:42]}-{hashlib.sha1(fact.encode()).hexdigest()[:6]}'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions