K17 fix-up: a promise in a said line with no matching receipt is not told as nothing happening (Soul at 0cfc386)
- A missing_affordance gap on a draft the decision said, with no receipt carrying the line's words, rendered "Nothing happened..." beside the receipt's "...has, from him: ..." when the receipt's words differed (Soul's promise-receipt-mismatch row), and "Nothing happened" alone with no receipt. Whether that line reached the room is unknown, so the gap is omitted and reported, as the line itself already is; the receipt is told as said. - A promise gap on a draft that was not said is told as before. Verification: Soul's two rows: with a receipt whose words differ she is told only the receipt, with none she is told nothing; both report the line and the promise as omitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ac59e002e5
commit
ce57956a62
2 changed files with 17 additions and 0 deletions
|
|
@ -171,11 +171,15 @@ pub(crate) fn outcome_of(record: &Value) -> Option<Outcome> {
|
|||
Some(Quote::Wrote(text)) if kind == GapKind::MissingAffordance => (0..receipts.len()).find(|at| receipts[*at].text == *text && !promised.contains(at)),
|
||||
_ => None,
|
||||
};
|
||||
// A promise in a line the decision said and no receipt shows went out: whether it reached the room is unknown, so
|
||||
// she is told neither that nothing happened nor that it did (I16.10), as the line itself is not told.
|
||||
let unreceipted = |text: &str| decision["said"].as_array().into_iter().flatten().any(|line| line["text"].as_str() == Some(text));
|
||||
match (quote, sent) {
|
||||
(_, Some(at)) => {
|
||||
promised.push(at);
|
||||
outcome.parts.push(Part::Promise { room: receipts[at].room.clone(), text: receipts[at].text.clone() });
|
||||
}
|
||||
(Some(Quote::Wrote(text)), None) if kind == GapKind::MissingAffordance && unreceipted(&text) => outcome.omitted.push(format!("a promise in a line said with no receipt that it went out: {}", gap["words"])),
|
||||
(Some(quote), None) if kind != GapKind::Unresolved => outcome.parts.push(Part::Gap { kind, room: room.clone(), quote }),
|
||||
_ => outcome.omitted.push(format!("a gap she cannot be shown truly (kind {}, from {}): {}", gap["kind"], gap["from"], gap["quote"])),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,19 @@ fn a_promise_is_told_as_the_room_having_it_and_what_will_not_happen_by_itself()
|
|||
assert_eq!(told(&unsent).0, ["- Nothing happened. He reached for something he has no way to do from here, now or later, and it will not happen by itself. He wrote: \"Missed you too. I'll send the render tonight.\". That he wanted it is kept in his record; no one has taken it up."], "no receipt, no promise row");
|
||||
}
|
||||
|
||||
/// Soul's rows at 0cfc386: a promise in a said line whose receipt's words differ, or that has no receipt, was told
|
||||
/// "Nothing happened" beside the receipt's "has, from him". What reached the room is the receipt's alone (I16.10).
|
||||
#[test]
|
||||
fn a_promise_in_a_said_line_with_no_matching_receipt_is_not_told_as_nothing_happening() {
|
||||
let text = "I'll send it tonight.";
|
||||
let promise = |posted: Value| json!({ "interpreter": { "room": MINDS, "said": [{ "room": MINDS, "text": text }], "refused": [], "gaps": [{ "kind": "missing_affordance", "from": "draft", "draft": 1, "words": text }] }, "posted": posted });
|
||||
let (lines, omitted) = told(&promise(json!([{ "event": "40", "room": MINDS, "text": "I'll send it tonight!" }])));
|
||||
assert_eq!(lines, ["- #minds:gamecult.org has, from him: \"I'll send it tonight!\"."], "the receipt alone");
|
||||
assert!(omitted.len() == 2 && omitted[1].starts_with("a promise in a line said with no receipt"), "{omitted:?}");
|
||||
let (lines, omitted) = told(&promise(json!([])));
|
||||
assert!(lines.is_empty() && omitted.len() == 2, "{lines:?} {omitted:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_unfinished_draft_a_failed_turn_and_a_later_break_are_told_as_what_they_were() {
|
||||
let (lines, _) = told(&record("<typed>I was about to tell you that", json!({ "say": [], "gaps": [] }), &[]));
|
||||
|
|
|
|||
Loading…
Reference in a new issue