From ac59e002e552bdeade6f88bc00a1f8023cd72577 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 20 Nov 2026 17:19:25 +0100 Subject: [PATCH] K18 fix-up: a note to Self runs the echo check (Soul at 0cfc386) - `suggest` refuses an echo as `say` and `amend` do, before the one-a-turn and private checks, whatever the note's kind. Soul's probe filed Nibu's line, refused as an echo when said, as her `idea` note. - A feedback note that passes someone's words on verbatim is refused too: Q-E is unanswered, so option A (the echo refusal applies) holds for notes as well. A note in her own words is left as before. - The K18 assertion that an echo-refused line's draft could be a feedback note is gone; a refused act still leaves its draft free (the amend case stays). Verification: the echo draft as an idea note and as a feedback note about Nibu is refused (say: echo, suggest: echo) and no note is left; a note in her own words is left. Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/projection/interpret.rs | 6 ++++-- .../src/projection/interpret/tests.rs | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/crates/mind-body/src/projection/interpret.rs b/crates/mind-body/src/projection/interpret.rs index 181261e..4844e97 100644 --- a/crates/mind-body/src/projection/interpret.rs +++ b/crates/mind-body/src/projection/interpret.rs @@ -492,8 +492,8 @@ pub(crate) fn decide(model: &dyn Model, request_id: &str, packet: &Packet, narra (reason, _) => refusals.push(refused(Act::Amend, Some(draft), None, reason.unwrap_or(Refusal::NotAmendable))), } } - // A note to Self (map 16.18): one whole draft, at most one a turn, refused when the Interpreter judges it carries - // something private. It is recorded in the turn's record and nowhere else; nothing here writes her Mind. + // A note to Self (map 16.18): one whole draft, at most one a turn, refused as an echo as a line is, and when the + // Interpreter judges it carries something private. It is recorded in the turn's record and nowhere else; nothing here writes her Mind. let mut suggestions: Vec = Vec::new(); for proposed in parsed.suggest { let Some(draft) = proposed.draft.and_then(|n| found.numbered(n)) else { @@ -502,6 +502,8 @@ pub(crate) fn decide(model: &dyn Model, request_id: &str, packet: &Packet, narra }; let reason = if used.contains(&draft.n) { Some(Refusal::Used) + } else if echo(&draft.text, &packet.bodies) { + Some(Refusal::Echo) } else if !suggestions.is_empty() { Some(Refusal::SecondNote) } else if proposed.private != Some(false) { diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index d9fed07..b0a357d 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -594,9 +594,21 @@ fn k18_a_refused_act_does_not_use_up_its_draft_and_is_told() { assert_eq!((refusals(&decision), decision["suggestions"][0]["text"].as_str()), (vec![("amend".to_owned(), "not_amendable".to_owned())], Some("Couldn't send it after all.")), "{decision}"); let told = crate::projection::outcome::outcome_of(&json!({ "interpreter": decision, "posted": [] })).unwrap().lines(packet().forms); assert!(told.iter().any(|line| line.starts_with("- Nothing changed, and nothing reached #minds:gamecult.org:")) && told.iter().any(|line| line.starts_with("- He left Self a note:")), "{told:?}"); - // An echo-refused line leaves its draft free for a note too. - let echoed = answered(&packet(), "The economy is still the least-built part!", json!({ "say": [{ "draft": 1 }], "gaps": [], "suggest": [{ "kind": "feedback", "draft": 1, "about": NIBU, "private": false }] })); - assert_eq!((refusals(&echoed), echoed["suggestions"].as_array().unwrap().len()), (vec![("say".to_owned(), "echo".to_owned())], 1), "{echoed}"); +} + +/// Soul's probe at 0cfc386: a draft refused as an echo was then left as her idea note. A note runs the echo check as a +/// line and an addition do, whatever its kind. +#[test] +fn an_echo_is_no_note_either() { + let echo = "v0.2.0 is tagged and the economy is still the least built part. I think this looks okay to ship."; + for kind in ["idea", "feedback"] { + let about = if kind == "feedback" { json!(NIBU) } else { Value::Null }; + let decision = answered(&packet(), &format!("{echo}"), json!({ "say": [{ "draft": 1 }], "gaps": [], "suggest": [{ "kind": kind, "draft": 1, "about": about, "private": false }] })); + assert_eq!((refusals(&decision), decision["suggestions"].as_array().unwrap().len()), (vec![("say".to_owned(), "echo".to_owned()), ("suggest".to_owned(), "echo".to_owned())], 0), "{kind}: {decision}"); + } + // A note of her own words is still left. + let own = answered(&packet(), "The economy wants a pass before we ship.", json!({ "say": [], "gaps": [], "suggest": [{ "kind": "idea", "draft": 1, "about": null, "private": false }] })); + assert_eq!(own["suggestions"].as_array().unwrap().len(), 1, "{own}"); } #[test]