Skip to content

[BUG] memory-json import counts relations whose source entity is absent from the input #2186

Backlog

Description

@spark142857142857

In an empty local project, bm import memory-json reports a relation as added even when no imported note contains the link.

Reproduction

Save these two lines as memory.json and run bm import memory-json memory.json.

{"type":"entity","name":"Atlas","entityType":"project"}
{"type":"relation","from":"Missing Team","to":"Atlas","relationType":"owns"}

The command exits successfully and prints Added 1 relations. The only generated note is project/Atlas.md, and its body contains only # Atlas. The expected count is zero.

As a control, reverse the endpoints so that Atlas owns Missing Team. The importer then writes - owns [[Missing Team]] in Atlas.md and correctly reports one relation. An unresolved target can still be represented in Markdown.

Reproduced on Windows with Python 3.13.2 and Basic Memory built from 27ac74c3. I propose counting the relations attached to each successfully written source note.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions