Skip to content

kg rename-project with the same name removes the project from every memory #519

Description

@kevintseng

What happens

memesh kg rename-project --from X --to X --apply (the same name twice, e.g. a typo) reports 0 renamed, N merged and exits 0, and afterwards no memory carries project:X any more. The dry run warns about it but --apply goes ahead.

Related: the backup --apply writes goes to ./data/backups/ under the current directory, not next to the database, so running it from another directory scatters backups; and the dry run always reports 0 blocked message rows, so it cannot predict what the apply will refuse.

Steps

  1. memesh kg rename-project --from acme --to acme --apply on a graph where 286 memories carry project:acme.
  2. Output: 0 renamed, 286 merged.
  3. project:acme is gone from all 286.

Expected

Renaming a project to itself is refused. The backup is written beside the database. The dry run reports the same numbers the apply will produce.

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

    needs-triageNot yet judged — the default entry point for a new issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions