Persona K60: the test shim states clear_of without inserting an absent amend list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
61ff97daf7
commit
1a76451219
1 changed files with 1 additions and 1 deletions
|
|
@ -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<_>>());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue