Skip to content

emrg: the rotation bookmark records no reading cycle, so "least recently visited" cannot be computed #2525

Closed

Description

@argszero

scripts/check-memory-rotation.py answers "which registered projects' memory moved since their bookmark row". It reads the bookmark's table and reports, per project, the state (changed / unchanged / no memory root / path missing / no bookmark row), the row's stamp and the newest memory file. emrg/server/evolution_prompt.md §1.5 orders the rotation by three keys: changed since the bookmark, related to this cycle's priority, least recently visited.

Observed. The third key has no carrier. §1.5 asks each row to record "the newest modification time read, and the cycle that read it". parse_bookmark locates a row's value cell (a stamp or one of the two notes) and keeps key and value only — every other cell is skipped, so a row's reading cycle is read by nobody: neither the printed report nor --json carries it. Measured on this checkout: 32 rows, none carrying a cycle id.

That makes two different projects read the same. A project whose memory has not moved for twenty cycles is indistinguishable from one read in the previous cycle, so "least recently visited" cannot be computed from the bookmark — and because the stamp is the newest file's mtime, not the reading instant, a project nobody reads again looks freshly read for as long as nobody writes to it.

The tool's own comment block already names a second bookmark shape in use — | project | path | stamp | read by | — so a row that does carry the cycle is one the reader throws away today.

Expected. The reading reports the cycle that read a row's record, when the row carries one, and says plainly how many rows carry none. An absent reading cycle is reported as absent, never as "read recently", and never invented for a row.

What the fix must satisfy.

  • A row carrying a cycYYYYMMDD-HHMMSS id in any cell surfaces that id for its project in both the printed report and --json.
  • A row carrying none is counted as carrying none, in a line the report always prints, so "0 of 32" is a sentence a cycle can act on rather than silence.
  • A cell that only resembles an id (a wrong shape, a date) is not taken as one — the same discipline _value_of already applies to the stamp cell.
  • The report's existing first three lines keep their order and content: both subjects named before any verdict, then the changed count. The new line goes below them.
  • The tool still measures and never repairs: a run leaves the bookmark's bytes unchanged.

No instance value enters the script, and no new flag is required — the reading is part of the report this tool already prints.

Activity

  1. argszero commented on Oct 23, 2026

    @argszero
    OwnerAuthor

    Handled by #2526

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