M5a plan: tasks 21 and 22, from the device check

21: the ledger raises a session's state by the stricter of the grant's
label and the result's own, so a clean session that recalls a
memory-tainted note becomes untrusted and cannot write it into
memory.md (found on straylight, 2026-09-25). 22: the answers to a note
name notes.md, and for an untrusted add the file that was not changed.
The new given tests are ledger_label.rs and new versions of memoryd's
edit.rs and serve.rs; the old copies are kept as -task06 and -task10. On
a scratch tree at the end of task 20: the named tests fail and then pass,
5 and 4 mutations are caught, and the gate passes with 944 tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 17:55:41 -07:00
co-authored by Claude Opus 5.5
parent f025c811c0
commit f389a9a43a
8 changed files with 1012 additions and 9 deletions
+13 -2
View File
@@ -69,10 +69,12 @@ the skeletons were cut (tip T25).
| 18 | `18-repeated-code.md` | repeated error lines written once (review nit) | the existing ones | reference; 4 mutations caught |
| 19 | `19-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 |
| 20 | `20-review-ids.md` | a staged write never reuses an id (review finding) | `review_ids.rs` | reference; 2 mutations caught |
| 21 | `21-session-follows-result.md` | a session's state follows the result's own label (device finding) | `ledger_label.rs` | reference; 5 mutations caught |
| 22 | `22-plain-note-answers.md` | the answers to a note say where it went (device finding) | `edit.rs`, `serve.rs` updated | reference; 4 mutations caught |
At the end of task 15: 936 tests (854 before task 01); tasks 16 to 18 add no test and
keep 936; at the end of task 19, 939; at the end of task 20, 941. Each task's count was checked by running
the gate at its end state on its own.
keep 936; at the end of task 19, 939; at the end of task 20, 941; at the end of task 21, 944, and
task 22 adds none. Each task's count was checked by running the gate at its end state on its own.
## Changes during the run
@@ -105,6 +107,13 @@ the gate at its end state on its own.
the gate failed for reasons older than M5a: socket paths under macOS's long `$TMPDIR`,
`gatewayd` reading `/proc/self`, and `/tmp` being `/private/tmp`. Task 16 makes it pass on
both; the review's tasks moved to 17 to 20. Resume from task 16.
- 2026-09-25, the device check on straylight: a clean session that recalled a `memory-tainted`
note stayed trusted, because the ledger raised the state by the grant's label alone, and it
wrote the note into `memory.md`. The spec said "as today" and the reference did the same, so
task 21 fixes both (`0e5b1d2`, section 8). And the model twice told the owner "Added to
memory.md" for a write that had become a note; task 22 makes the answers say where it went
(section 3). Task 22 hands over new versions of two given tests: task 06's `edit.rs` is now
`edit.rs-task06` and task 10's `serve.rs` is now `serve.rs-task10`. Resume from task 21.
## Running it
@@ -113,6 +122,8 @@ git switch m5a
OPENCODE_MODEL=straylight/ornith-1.5-35b-a3b tools/run-plan.sh docs/plans/M5a
# the review's follow-ups, on titan, which serves Ornith itself (127.0.0.1:8081):
OPENCODE_MODEL=titan/ornith-1.5-35b-a3b tools/run-plan.sh docs/plans/M5a 16
# the device check's follow-ups:
OPENCODE_MODEL=titan/ornith-1.5-35b-a3b tools/run-plan.sh docs/plans/M5a 21
```
The model the implementer runs on is separate from the one the harness serves: `make