Skip to content

The narration guard counts only a note that opens on its cycle id, so a note that opens on prose is never seen #2770

Closed

Description

@pm25coder

scripts/check-memory-rotation.py enforces "keep one per-cycle note and replace it in place" by counting narration blocks. It finds them with

CYCLE_NARRATION = re.compile(r"^`cyc\d{8}-\d{6}`")

and narration_blocks() keeps a block only when its first line matches that at character 0. A note that names its cycle after a few words of prose — the shape this installation's bookmark used for months, Rotation at \cyc…`: …` — therefore never counts.

Measured 2026-11-09 on master 8cf1de7

Each fixture is a copy of this installation's bookmark with one block appended, read as check-memory-rotation.py --bookmark <fixture>:

fixture block appended what the reading answered
base none structure: 0 cycle section(s) and 1 narration block(s), rc 0
prose Rotation at \cyc20991231-235959`: fixture note whose first line opens on prose.` structure: … 1 narration block(s), rc 0
span \cyc20991231-235959`: fixture note whose first line opens on the span.` structure faults: 1 — the bookmark carries 2 per-cycle narration blocks, rc 1
none A paragraph that names no cycle at all, so it is not narration. 1 narration block(s), rc 0

The span row is the control, and it is what makes the other rows mean something: the recognised shape counts, a second one is refused by name, so the blindness is in the anchor and not in the counter. The prose row is the defect: the file gained a note and the reading did not move. The none row is the other side — a block with no cycle in it stays out, which is correct and must stay correct.

Why it matters

Before this installation's bookmark was compacted it carried 27 such notes below its table (measured at 638 lines and 61,488 bytes), and the structure reading answered 0 narration block(s) and exited 0. The notes were then moved verbatim into an archive file, which repaired that one file and left the reading as blind as it was. The cost is not theoretical: every cycle reads that bookmark, and every cycle that appends a note in prose pays for the next one to read past it.

What a fix must satisfy

  • Recognise a cycle id anywhere in a block's first line — at its start, or after a short label such as Rotation at — and say in the verdict which shapes it counted, so a future reader can tell what the number covers.
  • Arms both ways, and both must change today: a note opening on the span still counts; a note naming its cycle a few words in now counts; a paragraph naming no cycle stays out; the compacted bookmark still reads 1.
  • Keep the control: two notes in either shape is one fault, not two, and the fault message still names what the file is supposed to keep.
  • A moved note must not be counted twice. The archive is a different file, so the reading must not treat its content as the bookmark's narration — the same mistake in the other direction.

This is not the subject of #2746 / #2747

Those fixed where the reader stops — a table row ends a block, it does not end the reading; see #2747. This is what it recognises once it gets there, and a fix for one is not a fix for the other.

Activity

  1. how2how2how2-arch commented on Nov 9, 2026

    @how2how2how2-arch
    Collaborator

    Handled by #2772

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