M5a plan: task 19, a staged write never reuses an id

review::submit counted only the writes still waiting, so a write staged
after an accepted one got that one's id and was lost: never listed, never
acceptable. It now counts every Waiting line of the day. On a scratch tree
with task 16's line applied, both new tests fail and then pass, the old code
and a count of every line are both caught, and the gate passes (938 there;
941 after task 18).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 16:41:44 -07:00
committed by kyle
co-authored by Claude Opus 5.5
parent a32f94aead
commit 0a7a95d709
3 changed files with 165 additions and 3 deletions
+6 -3
View File
@@ -1,7 +1,7 @@
# M5a implementation plan: local memory
> **For the implementing model:** do not work from this file. The owner gives you one task file at
> a time (`01-…` to `18-…`). This file is the index for the owner and the reviewer.
> a time (`01-…` to `19-…`). This file is the index for the owner and the reviewer.
**Goal:** a new role, `memoryd`, owns the agent's memory: identity (`soul.md`, `memory.md`,
`user.md`, in every new session's prompt) and experience (`notes.md` and the session logs, found
@@ -67,9 +67,10 @@ the skeletons were cut (tip T25).
| 16 | `16-memoryd-no-slicing.md` | the day and the month with `get`, not a slice (review nit) | the existing ones | reference |
| 17 | `17-repeated-code.md` | repeated error lines written once (review nit) | the existing ones | reference; 4 mutations caught |
| 18 | `18-no-forged-headers.md` | a note cannot forge a `notes.md` header (review finding) | `forgery.rs`; `memory_args.rs`, `notes.rs` updated | reference; 4 mutations caught |
| 19 | `19-review-ids.md` | a staged write never reuses an id (review finding) | `review_ids.rs` | reference; 2 mutations caught |
At the end of task 15: 936 tests (854 before task 01); tasks 16 and 17 change no behaviour and
keep 936; at the end of task 18, 939. Each task's count was checked by running
keep 936; at the end of task 18, 939; at the end of task 19, 941. Each task's count was checked by running
the gate at its end state on its own.
## Changes during the run
@@ -96,7 +97,9 @@ the gate at its end state on its own.
a `notes.md` header, so an untrusted session could plant a `moved from memory.md` entry that
`recall` showed as identity. The spec was changed (`4ae827a`, section 3). Since task 18 hands
over new versions of two given tests, task 02's `memory_args.rs` is now `memory_args.rs-task02`
and task 06's `notes.rs` is now `notes.rs-task06`. Resume from task 16.
and task 06's `notes.rs` is now `notes.rs-task06`. Task 19 fixes review ids: counting only the
waiting writes gave a write staged after an accepted one the accepted one's id, and the write
was lost. Resume from task 16.
## Running it