docs: M5d-1 checklist fixes before hand-over

Given tests: Action::Turn (not To), send_turn of epoch 1, clippy on
compact_summary, jsonl-without-baseline, live turn after compact sends
the carry. send_turn maps Damaged to Local("log") as read_turn did.
Gate counts 1484 → 1508. Mutations recorded in the README.

Co-Authored-By: Grok 4.6 <noreply@x.ai>
This commit is contained in:
2026-10-02 22:36:51 -07:00
co-authored by Grok 4.6
parent 3726ae585f
commit c3b05cf003
10 changed files with 135 additions and 52 deletions
@@ -3,7 +3,7 @@
mod support;
use bxcore::{Epoch, LogRecord, SessionId, TurnEvent};
use loopd::baseline::Baseline;
use loopd::baseline::{Baseline, CARRY_HEADING};
use loopd::compact;
use loopd::llama::Client;
use loopd::memory::NoMemory;
@@ -125,11 +125,31 @@ fn usage_at_the_threshold_compacts_before_the_turn_returns() {
w.finish(&mut s, "hi", outcome).unwrap();
assert_eq!(s.epoch(), Epoch(1));
assert_eq!(s.carry(), Some("the sum"));
w.server.route(CHAT, vec![sse("next", 0, 20)]);
let mut events = Vec::new();
run_turn(&mut s, &w.runtime(), "again", None, &mut |e| {
events.push(e.clone())
})
.unwrap();
let sent = w.server.requests_to(CHAT);
assert_eq!(sent.len(), 2);
assert_eq!(sent.len(), 3);
assert_eq!(sent[0].json()["id_slot"], 0);
assert_eq!(sent[1].json()["id_slot"], 1);
assert!(sent[1].json().get("tools").is_none());
let live = sent[2].json();
assert_eq!(live["id_slot"], 0);
let contents: Vec<&str> = live["messages"]
.as_array()
.unwrap()
.iter()
.map(|m| m["content"].as_str().unwrap_or(""))
.collect();
assert!(
contents
.iter()
.any(|c| c.contains(CARRY_HEADING) && c.contains("the sum")),
"{contents:?}"
);
let old = w.home.records("a");
assert!(matches!(
old.last(),