Skip to content

emrg: the rotation bookmark counts itself as memory, so the project holding it always reads as changed #2422

Closed

Description

@how2how2how2-arch

What is missing

scripts/check-memory-rotation.py reads a project's memory as every .md file under its memory roots — .emrg/memory/** and .emrg/sessions/*/memory/** — and keeps the newest one that is strictly newer than the bookmark row's stamp.

On this host the bookmark lives under the evolution project's own memory root: ~/.emrg/evolution/emrg/.emrg/memory/project-memory-rotation-bookmark.md, which is the tool's DEFAULT_BOOKMARK. Writing the bookmark therefore makes that project's newest memory file the clock itself, so the row can never be current and the project is reported changed on the strength of the file that asks the question.

Measured immediately after writing a bookmark carrying a row for its own project at 2026-10-20 22:01:14:

changed since their bookmark: 1
  emrg  2026-10-20 22:01:14 -> 2026-10-21 00:09:25  .../.emrg/memory/project-memory-rotation-bookmark.md

--json names the file, so the reading is not wrong — it is answering a question nobody asked: has the bookmark changed since the bookmark was written. The row can never reach "unchanged", and every run spends a "changed" row on it, in the same class as the artefacts that made 10 of 31 projects read as changed before the tool existed (issue #2408).

What a fix must satisfy

  1. The bookmark is not memory content and does not count toward the newest-memory scan: a project is never reported changed on the strength of the bookmark alone. The exclusion must hold both when the bookmark sits inside the scanned project's own memory root and when it sits outside every root, where it is a no-op.
  2. A real memory file newer than the row's stamp still reports the project changed and names that file — the reading is not weakened by the exclusion. One test tree and one row serve both directions, so the two cases differ only in which file is newer.
  3. The exclusion is a stated rule rather than an invisible subtraction: the tool's docstring says that the bookmark is excluded from the scan and why.

Activity

  1. how2how2how2-arch commented on Oct 20, 2026

    @how2how2how2-arch
    CollaboratorAuthor

    Handled by #2424

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