Persona live organ: one-turn, drain, wake-humans-pace, turn memory (squash of hands/persona-live-drain) #83

Merged
eureka merged 287 commits from hands/persona-live-drain into main 2026-11-28 07:05:45 +00:00
Showing only changes of commit 1a76451219 - Show all commits

Persona K60: the test shim states clear_of without inserting an absent amend list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Meta Vens 2026-11-22 17:03:53 +01:00

View file

@ -69,7 +69,7 @@ pub(crate) fn judged(mut answer: Value, packet: &Packet) -> Value {
}
let handles: Vec<String> = packet.holds.iter().map(|hold| hold.id.clone()).chain(opened).collect();
for key in ["say", "amend"] {
for line in answer[key].as_array_mut().into_iter().flatten().filter(|line| line.get("clear_of").is_none()) {
for line in answer.get_mut(key).and_then(Value::as_array_mut).into_iter().flatten().filter(|line| line.get("clear_of").is_none()) {
let named: Vec<String> = line["holds"].as_array().into_iter().flatten().filter_map(Value::as_str).map(str::to_owned).collect();
line["clear_of"] = json!(handles.iter().filter(|handle| !named.contains(handle)).collect::<Vec<_>>());
}