From 4c9db02afed630565f5ac199bd5c561527a8d3dc Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 23 Nov 2026 01:45:01 +0100 Subject: [PATCH] Persona T5: the plain unsent row, derived by code with no label (map 16.35.6, 16.35.12) - outcome: Part::Unsent { room, text, reach }. Each draft of the wake (the decision now carries `drafts`) that was not said, added to a line, left for Self, refused, or named by an addressee or elsewhere gap is told "{Subj} had drafted "...", and it did not go out."; its event form carries no words. settle checks it against the receipts as every such row; a missing_affordance reach on it is a clause of its one row (K63). - R15 X.1 r1's dropped reply to Meta is told next wake; R15/R16 E.1/E.5 gap-only answers are told plainly. - Tests per 16.35.12 T5; row-table tests list the new variant. Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/projection/interpret.rs | 2 + .../src/projection/interpret/tests.rs | 23 ++++++++- crates/mind-body/src/projection/outcome.rs | 39 ++++++++++++-- .../mind-body/src/projection/outcome/tests.rs | 51 +++++++++++++++++-- 4 files changed, 105 insertions(+), 10 deletions(-) diff --git a/crates/mind-body/src/projection/interpret.rs b/crates/mind-body/src/projection/interpret.rs index d2737b7..1728f01 100644 --- a/crates/mind-body/src/projection/interpret.rs +++ b/crates/mind-body/src/projection/interpret.rs @@ -760,6 +760,8 @@ pub(crate) fn decide_in(model: &dyn Model, segment_id: &str, packet: &Packet, na if !about_dropped.is_empty() { decision["memory_about_dropped"] = json!(about_dropped); } + // Every draft of the wake, by number: what her next outcome derives the drafts that did not go out from (map 16.35.6). + decision["drafts"] = json!(found.drafts.iter().map(|draft| json!({ "n": draft.n, "text": draft.text })).collect::>()); // A gap about a draft that went somewhere, or quoting from one, contradicts what happened: it is kept for the trace as // `acted` and never shown to her. A reach naming a draft she said or added is an act her line says she will do and her // body cannot, and is kept (`persona-unbacked-intent-say-then-amend`, 16.20.6). diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index 12af05a..1298904 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -1722,7 +1722,7 @@ fn k63_e5_r1_a_draft_she_did_not_send_with_a_gap_is_one_row() { let decision = answered(&packet, E5_EUREKA_R1, json!({ "say": [], "gaps": [gap] })); assert_eq!((decision.get("retried"), texts(&decision).len(), decision["refused"].clone()), (None, 0, json!([])), "{decision}"); let told = told_her(&decision); - assert!(told.len() == 1 && told[0].contains("She had drafted: \"Yes, Kiko. I'll send the door-fix diff as a file"), "{told:?}"); + assert!(told.len() == 1 && told[0].starts_with("- She had drafted \"Yes, Kiko. I'll send the door-fix diff as a file") && told[0].ends_with(", and it did not go out. It reaches for something she has no way to do from here."), "T5: told plainly, the reach a clause of its one row: {told:?}"); assert!(told.iter().all(|line| !line.contains("She wrote")), "{told:?}"); } @@ -1918,3 +1918,24 @@ fn t4_a_memory_off_the_contract_is_not_the_contract() { assert_eq!((decision["retried"]["failed"].as_str(), decision["state"].clone()), (Some("the answer is not the speech contract"), json!([])), "{bad}: {decision}"); } } + +// --------------------------------------------------------------------------------------------- +// T5 (map 16.35.6): the plain row for a draft that did not go out. + +/// Libby's r1 prose in R15 X.1, verbatim (`variants/R15/sims/X.1.md` lines 254-260): her reply to Meta is her one draft. +const R15_X1_LIBBY_R1: &str = "I can't say what's live today, so I won't point the welcome at anything. That answers Heimdall's question as far as I can see, and Meta can correct me if something is live. Two lines that only say hello and leave the door open can't send anyone toward something dark.\n\nI keep the first line plain and put the small poke in the second: invite them to try the first small thing they'd think of, and tell us what happened.\n\nMeta, the two lines are ready, held and not posted anywhere. 1) Hello, and welcome, we're glad you're here. 2) Poke at whatever you're curious about first, and tell us what happened, even if it's small. They point at nothing specific, since I don't know what's live today. If something is, tell me and I'll name it. Heimdall can rule on these words as they stand."; +const R15_X1_HEIMDALL_R1: &str = "Meta, I'll rule once Libby's lines are ready, so I'm ruling on the actual words. One thing I need from you first: should the welcome point newcomers at anything that's live today, or only say hello? If it points at something still dark, my answer is not yet."; + +/// T5 (mutant: drop `Part::Unsent` for a refusal-free omitted draft): R15 X.1 r1. Her reply to Meta was left out of the +/// answer (R15's free "unsent, held" fate), so nothing went out. Her next wake tells it, plainly, with no reason of +/// anyone's; the Projector is told only that a line did not go out. +#[test] +fn t5_x1_r1_dropped_reply_is_told() { + let packet = libby_packet(&[(META, "Meta", X1_META_R1, true), (HER, "Heimdall", R15_X1_HEIMDALL_R1, true)]); + let decision = answered(&packet, R15_X1_LIBBY_R1, json!({ "say": [], "gaps": [] })); + assert_eq!((texts(&decision).len(), decision["refused"].clone()), (0, json!([])), "{decision}"); + let draft = drafts(R15_X1_LIBBY_R1).drafts[0].text.clone(); + assert_eq!(told_her(&decision), [format!("- She had drafted {}, and it did not go out.", spoken(&draft))]); + let outcome = crate::projection::outcome::outcome_of(&record_of(&decision)).unwrap(); + assert_eq!(outcome.event(0, forms(&libby()), &[]), "- She had drafted a line, and it did not go out."); +} diff --git a/crates/mind-body/src/projection/outcome.rs b/crates/mind-body/src/projection/outcome.rs index 913e8c5..2a482c8 100644 --- a/crates/mind-body/src/projection/outcome.rs +++ b/crates/mind-body/src/projection/outcome.rs @@ -23,6 +23,10 @@ //! That holds by type (map 16.30.3, K46): every text of a record a row carries is `Words`, which only `Form::words` reads, //! and the event form reads none; a read is named to the Projector by a closed `EventPhrase`, never by its address or //! search words. No row names a person: what she promised, held or owes is not a row (map 16.35). +//! +//! Which of her drafts did not go out is derived here, from the decision's `drafts` and what became of each (map +//! 16.35.6): a draft no act, refusal or addressee or elsewhere gap tells is told plainly as one that did not go out +//! (`Part::Unsent`), with no reason of anyone's, and `settle` checks it against the receipts as every such row is. use serde_json::Value; @@ -212,6 +216,10 @@ enum Part { Gap { kind: GapKind, room: Option, quote: Quote, reach: bool }, /// A draft she did not finish: the turn ended first, or the length limit cut it (`by_limit`, Soul's R6). Unfinished { room: Option, text: Words, by_limit: bool }, + /// A draft of hers that did not go out (map 16.35.6), derived by code: no receipt, refusal or addressee or elsewhere gap + /// tells it, it was neither said, added nor left for Self, and it is no unfinished draft. No label says why: she knows + /// her own reason. `reach` as on `Refused`. + Unsent { room: Option, text: Words, reach: bool }, /// An edited receipt with no refusal: her words were added after a line of hers; `unbacked` when a /// `missing_affordance` gap names the addition's draft (map 16.21). Amended { room: String, added: Words, unbacked: bool }, @@ -419,6 +427,22 @@ pub(crate) fn outcome_of(record: &Value) -> Option { for cut in decision["cut_by_cap"].as_array().into_iter().flatten().filter_map(words_of) { outcome.parts.push(Part::Unfinished { room: room.clone(), text: cut, by_limit: true }); } + // Each draft of hers that did not go out and that no row above tells, said plainly (map 16.35.6): derived from the + // drafts and what became of each, never from a label. A draft said, added to a line, left for Self or refused is told by + // its own row or receipt; one an addressee or elsewhere gap names is told by the gap; words a receipt shows went out + // went out. + for draft in decision["drafts"].as_array().into_iter().flatten() { + let n = &draft["n"]; + let Some(text) = words(&draft["text"]) else { continue }; + let names = |key: &str, field: &dyn Fn(&Value) -> &Value| decision[key].as_array().into_iter().flatten().any(|item| field(item) == n); + let acted = names("said", &|line| &line["rests_on"]["draft"]) || names("amended", &|item| &item["draft"]) || names("suggestions", &|item| &item["draft"]) || names("refused", &|item| &item["draft"]); + let gapped = decision["gaps"].as_array().into_iter().flatten().any(|gap| gap["from"] == "draft" && gap["draft"] == *n && matches!(serde_json::from_value::(gap["kind"].clone()), Ok(GapKind::Addressee | GapKind::Elsewhere))); + if acted || gapped { + continue; + } + rows.push((n, outcome.parts.len())); + outcome.parts.push(Part::Unsent { room: room.clone(), text: Words::new(text), reach: false }); + } // One draft, one row (K63): a reach naming a draft some row tells is a clause of that row; one whose draft no row tells is // its own row. for (draft, quote) in reaching { @@ -470,14 +494,14 @@ impl Part { /// Whether a reach she cannot do names this row's draft (K63). fn reaches(&self) -> bool { match self { - Self::Refused { reach, .. } | Self::Gap { reach, .. } | Self::NotAmended { reach, .. } => *reach, + Self::Refused { reach, .. } | Self::Gap { reach, .. } | Self::NotAmended { reach, .. } | Self::Unsent { reach, .. } => *reach, _ => false, } } /// Tells this draft's row that a reach she cannot do names it (K63). fn add_reach(&mut self) { - if let Self::Refused { reach, .. } | Self::Gap { reach, .. } | Self::NotAmended { reach, .. } = self { + if let Self::Refused { reach, .. } | Self::Gap { reach, .. } | Self::NotAmended { reach, .. } | Self::Unsent { reach, .. } = self { *reach = true; } } @@ -486,7 +510,7 @@ impl Part { /// receipts. None for a row that is a receipt, or that carries no words of hers. fn own_words(&self) -> Option<(Option<&str>, &Words)> { match self { - Self::Refused { room, text, .. } | Self::Unfinished { room, text, .. } => Some((room.as_deref(), text)), + Self::Refused { room, text, .. } | Self::Unfinished { room, text, .. } | Self::Unsent { room, text, .. } => Some((room.as_deref(), text)), Self::Gap { room, quote: Quote::Wrote(text), .. } => Some((room.as_deref(), text)), Self::NotAmended { room, added, .. } => Some((room.as_deref(), added)), _ => None, @@ -499,6 +523,7 @@ impl Part { Self::Refused { .. } => "refused line", Self::Gap { .. } => "gap", Self::Unfinished { .. } => "unfinished draft", + Self::Unsent { .. } => "draft that did not go out", Self::NotAmended { .. } => "unmade addition", _ => "row", } @@ -509,7 +534,7 @@ impl Part { fn rank(&self) -> u8 { match self { Self::Failed => 0, - Self::Refused { .. } | Self::Gap { .. } | Self::Unfinished { .. } | Self::NotAmended { .. } | Self::NoteRefused(_) | Self::ReadFailed { .. } | Self::ReadRefused { .. } => 1, + Self::Refused { .. } | Self::Gap { .. } | Self::Unfinished { .. } | Self::Unsent { .. } | Self::NotAmended { .. } | Self::NoteRefused(_) | Self::ReadFailed { .. } | Self::ReadRefused { .. } => 1, Self::SaidUnbacked { .. } | Self::Amended { unbacked: true, .. } => 2, Self::Said { .. } | Self::Amended { .. } | Self::NoteLeft(_) | Self::Read { .. } => 3, Self::BrokeAfter { .. } => 4, @@ -540,6 +565,11 @@ impl Part { Self::Refused { reason: Refusal::Echo, room, .. } | Self::Gap { kind: GapKind::Unwritten | GapKind::Unresolved, room, .. } => format!("Nothing reached {}.", place(room)), Self::Refused { reason: Refusal::NoRoom, .. } => "Nothing reached anyone.".to_owned(), Self::Refused { room, .. } | Self::Unfinished { room, .. } => format!("Nothing of this reached {}:", place(room)), + // A draft that did not go out, said plainly (map 16.35.6): code's fact, with no reason of anyone's. + Self::Unsent { text, .. } => match form.words(text) { + Some(quote) => format!("{cap_subj} had drafted {quote}, and it did not go out."), + None => format!("{cap_subj} had drafted a line, and it did not go out."), + }, Self::Gap { kind: GapKind::Addressee | GapKind::Elsewhere, .. } => "Nothing reached anyone.".to_owned(), Self::Gap { kind: GapKind::MissingAffordance, .. } => "Nothing happened.".to_owned(), Self::NotAmended { refusal: None, room, .. } => format!("Nothing changed, and nothing reached {}:", place(room)), @@ -578,6 +608,7 @@ impl Part { }; match self { Self::Said { .. } => String::new(), + Self::Unsent { .. } => reach.clone(), Self::Amended { unbacked: false, .. } => " The rest of the line is as it was.".to_owned(), Self::Amended { unbacked: true, .. } => format!(" The rest of the line is as it was. What {subj} added promises something {subj} {has} no way to do, now or later, and it will not happen by itself."), Self::SaidUnbacked { .. } => format!(" It promises something {subj} {has} no way to do, now or later, and it will not happen by itself. The line stands as {subj} wrote it; {subj} can add to it."), diff --git a/crates/mind-body/src/projection/outcome/tests.rs b/crates/mind-body/src/projection/outcome/tests.rs index fda4cdf..26b10a5 100644 --- a/crates/mind-body/src/projection/outcome/tests.rs +++ b/crates/mind-body/src/projection/outcome/tests.rs @@ -56,6 +56,8 @@ fn each_gap_is_told_by_its_kind_with_a_draft_as_written_and_a_thought_as_thought [ "- Nothing happened. He reached for something he has no way to do from here, now or later, and it will not happen by itself. In his thought: \"I want to see the shape of that sound.\". That he wanted it is kept in his record; no one has taken it up.", "- Nothing reached #minds:gamecult.org. He meant to say something and wrote no words to send. In his thought: \"I'll tell Meta I'm fine, more or less.\".", + // T5: the draft no gap names did not go out, and is told plainly. + "- He had drafted \"Fine, you win.\", and it did not go out.", ] ); assert!(lines.iter().all(|line| !line.contains("MODEL-DETAIL")), "the model's detail is never what he is told"); @@ -179,9 +181,10 @@ fn a_note_to_self_is_told_as_left_and_never_as_read() { let prose = "Then I stop for now. The kettle wants a softer attack. And the door."; let note = |suggest: Value| record(prose, json!({ "say": [], "gaps": [], "suggest": suggest }), &[]); let (left, _) = told(¬e(json!([{ "kind": "idea", "draft": 1, "about": null, "private": false }]))); - assert_eq!(left, ["- He left Self a note: \"The kettle wants a softer attack.\". It waits in Self's inbox until Self reads it; nothing tells him when, and nothing in it happens by itself."]); + // T5: the draft that was no note did not go out, and is told plainly. + assert_eq!(left, ["- He had drafted \"And the door.\", and it did not go out.", "- He left Self a note: \"The kettle wants a softer attack.\". It waits in Self's inbox until Self reads it; nothing tells him when, and nothing in it happens by itself."]); let (private, _) = told(¬e(json!([{ "kind": "idea", "draft": 1, "about": null, "private": true }]))); - assert_eq!(private, ["- No note was left: it carried something he may not pass on."]); + assert_eq!(private, ["- No note was left: it carried something he may not pass on.", "- He had drafted \"And the door.\", and it did not go out."]); let (second, _) = told(¬e(json!([{ "kind": "idea", "draft": 1, "about": null, "private": false }, { "kind": "idea", "draft": 2, "about": null, "private": false }]))); assert_eq!(second, ["- No second note was left: one a turn.", "- He left Self a note: \"The kettle wants a softer attack.\". It waits in Self's inbox until Self reads it; nothing tells him when, and nothing in it happens by itself."]); } @@ -247,7 +250,8 @@ fn i16_10_every_lines_first_clause_is_what_its_receipt_says_reached_the_room() { // "{Room} has" only on a receipt that a line went out or was added to. let receipt = matches!(part, Part::Said { .. } | Part::SaidUnbacked { .. } | Part::Amended { .. }); assert_eq!(reached.starts_with("#minds:gamecult.org has"), receipt, "{form}: {part:?}: {reached}"); - assert!(receipt || matches!(part, Part::NoteLeft(_)) || reached.starts_with("Nothing") || reached.starts_with("No "), "{form}: {part:?}: {reached}"); + let unsent = matches!(part, Part::Unsent { .. }) && reached.ends_with(", and it did not go out."); + assert!(receipt || unsent || matches!(part, Part::NoteLeft(_)) || reached.starts_with("Nothing") || reached.starts_with("No "), "{form}: {part:?}: {reached}"); for claim in ["Nothing reached", "reached the room", "reached anyone", " has, from", " has a line", "now ending with", "now added to", "went out"] { assert!(!rest.contains(claim), "{form}: {part:?}: only the first clause says what reached the room: {rest}"); } @@ -374,12 +378,13 @@ fn k49_every_row_with_words_is_settled_by_its_room() { ("gap", decision(json!({ "gaps": [{ "kind": "elsewhere", "from": "draft", "draft": 1, "words": SENTINEL }] }))), ("unfinished draft", decision(json!({ "unfinished": SENTINEL }))), ("unfinished draft", decision(json!({ "cut_by_cap": [SENTINEL] }))), + ("draft that did not go out", decision(json!({ "drafts": [{ "n": 1, "text": SENTINEL }] }))), ("unmade addition", decision(json!({ "refused": [{ "reason": "not_amendable", "text": SENTINEL, "draft": 1 }] }))), ]; for (row, decision) in rows { let at = |room: &str| outcome_of(&json!({ "interpreter": decision, "posted": [{ "event": "40", "room": room, "text": SENTINEL }], "edited": [] })).unwrap(); let here = at(MINDS); - let not_reached = |outcome: &Outcome| outcome.lines(packet().forms).into_iter().filter(|line| line.starts_with("- Nothing")).count(); + let not_reached = |outcome: &Outcome| outcome.lines(packet().forms).into_iter().filter(|line| line.starts_with("- Nothing") || line.ends_with(", and it did not go out.")).count(); assert_eq!(not_reached(&here), 0, "{row}: {:?}", here.lines(packet().forms)); assert!(here.omitted.iter().any(|why| why == &format!("a {row} of words a receipt shows reached {MINDS}: {SENTINEL}")), "{row}: {:?}", here.omitted); let elsewhere = at(SWARM); @@ -408,6 +413,7 @@ fn variant(part: &Part) -> &'static str { Part::Refused { .. } => "refused", Part::Gap { .. } => "gap", Part::Unfinished { .. } => "unfinished", + Part::Unsent { .. } => "not_sent", Part::Amended { .. } => "amended", Part::NotAmended { .. } => "not_amended", Part::NoteLeft(_) => "note_left", @@ -420,7 +426,7 @@ fn variant(part: &Part) -> &'static str { } } -const VARIANTS: usize = 14; +const VARIANTS: usize = 15; /// Every row kind, and every arm that renders a different sentence, with `s` in every text of a record it carries and in /// every read's target; and whether her told form shows those words (an echo, a held @@ -445,6 +451,7 @@ fn fixtures(s: &str) -> Vec<(Part, bool)> { out.push((Part::Gap { kind: GapKind::Elsewhere, room: room(), quote: Quote::Wrote(w()), reach: true }, true)); for by_limit in [false, true] { out.push((Part::Unfinished { room: room(), text: w(), by_limit }, true)); + out.push((Part::Unsent { room: room(), text: w(), reach: by_limit }, true)); } for unbacked in [false, true] { out.push((Part::Amended { room: MINDS.into(), added: w(), unbacked }, true)); @@ -574,3 +581,37 @@ fn k63_a_said_line_with_a_gap_keeps_both() { let (lines, omitted) = told(&said); assert_eq!(lines, ["- Nothing happened. He reached for something he has no way to do from here, now or later, and it will not happen by itself. In his thought: \"I want to hear the kettle myself\". That he wanted it is kept in his record; no one has taken it up.".to_owned(), format!("- #minds:gamecult.org has, from him: \"{text}\". It promises something he has no way to do, now or later, and it will not happen by itself. The line stands as he wrote it; he can add to it.")], "{omitted:?}"); } + +// --------------------------------------------------------------------------------------------- +// T5 (map 16.35.6, 16.35.12): a draft that did not go out is said plainly, derived by code from the drafts, with no label. + +/// K63's rule holds with the new row: a draft some other row tells (refused, gapped addressee or elsewhere, said, added +/// to a line, left for Self) gets no row of its own; only the draft nothing tells does, once. +#[test] +fn t5_refused_draft_one_row() { + let prose = "One. Two. Three."; + let (over, _) = told(&record(prose, json!({ "say": [{ "draft": 1 }, { "draft": 2 }, { "draft": 3 }], "gaps": [] }), &["One.", "Two."])); + assert_eq!(over.len(), 3, "{over:?}"); + assert!(!over.iter().any(|line| line.contains("did not go out")), "{over:?}"); + let (lines, _) = told(&record(prose, json!({ "say": [{ "draft": 1 }], "gaps": [{ "kind": "addressee", "draft": 2, "quote": null, "detail": "" }], "suggest": [{ "kind": "idea", "draft": 1, "about": null, "private": false }] }), &["One."])); + let unsent: Vec<&String> = lines.iter().filter(|line| line.contains("did not go out")).collect(); + assert_eq!(unsent, ["- He had drafted \"Three.\", and it did not go out."], "{lines:?}"); + assert_eq!(lines.iter().filter(|line| line.contains("\"Two.\"")).count(), 1, "the addressee gap alone tells draft 2: {lines:?}"); + let (echo, _) = told(&record("The economy is still the least-built part!", json!({ "say": [{ "draft": 1 }], "gaps": [] }), &[])); + assert_eq!(echo.len(), 1, "the echo row alone: {echo:?}"); + // A reach naming a draft that did not go out is a clause of its one row (R15 E.1 r1's gap-only answer, told plainly). + let (reach, _) = told(&record("I'll send the render tonight.", json!({ "say": [], "gaps": [{ "kind": "missing_affordance", "draft": 1, "quote": null, "detail": "" }] }), &[])); + assert_eq!(reach, ["- He had drafted \"I'll send the render tonight.\", and it did not go out. It reaches for something he has no way to do from here."]); +} + +/// K46 holds with the new row: its event form carries none of her words, with or without the reach clause. +#[test] +fn t5_event_form_has_no_words() { + const S: &str = "ospreyledger"; + let record = record(&format!("{S} at the door. And {S} again."), json!({ "say": [], "gaps": [{ "kind": "missing_affordance", "draft": 2, "quote": null, "detail": "" }] }), &[]); + let outcome = outcome_of(&record).unwrap(); + let her = packet().forms; + let events: Vec = (0..outcome.len()).map(|at| outcome.event(at, her, &[])).collect(); + assert_eq!(events, ["- He had drafted a line, and it did not go out.", "- He had drafted a line, and it did not go out. It reaches for something he has no way to do from here."]); + assert!(outcome.lines(her).iter().all(|line| line.contains(S)), "{:?}", outcome.lines(her)); +}