From c27d54a4c763cb89cf016f3fcaf12449be01f814 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 22 Nov 2026 13:46:22 +0100 Subject: [PATCH] Persona K56: the words gate settles when a round holds and cuts nothing new; an unsent draft is held for every covering hold in its wake (pin) Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/projection/interpret.rs | 6 ++++-- .../src/projection/interpret/tests.rs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/crates/mind-body/src/projection/interpret.rs b/crates/mind-body/src/projection/interpret.rs index b6134fb..36f8d1a 100644 --- a/crates/mind-body/src/projection/interpret.rs +++ b/crates/mind-body/src/projection/interpret.rs @@ -1445,10 +1445,12 @@ fn held_gate(lines: &[GateLine], packet: &Packet, opening: &[(String, Option = lines.iter().filter(|line| line.say && live(line) && !held.contains_key(&(line.into.clone(), line.draft.n))).map(|line| line.draft.n).collect(); let cut: Vec = going.into_iter().skip(MAX_LINES).collect(); - let settled = cut.is_empty() && held == gate.held; + // Settled when this round held and cut nothing new: both only grow, so the gate ends. + let settled = held == gate.held; gate.held = held; + let over = gate.over.len(); gate.over.extend(cut); - if settled { + if settled && gate.over.len() == over { return gate; } } diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index 7c32752..2de20d7 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -2827,6 +2827,25 @@ fn k56_every_covering_hold_holds_and_each_asker_is_told() { assert!(told.contains(&format!("{} and {} asked him to hold it", names[0], names[1])), "{told}"); } +/// The same in one wake: Meta's and Kiko's holds are open over #minds, carrying nothing like the welcome; she declines +/// the welcome and says "Kiko, here it is: {welcome}". The unsent welcome is held words under both holds, so the line is +/// held for both. This pins `s-first-covering-hold-only`, the same-wake shape of Soul's mutant. +#[test] +fn k56_an_unsent_draft_is_held_for_every_covering_hold_in_its_wake() { + let mut packet = x1_packet(); + let at = u64::try_from(now().timestamp_millis()).unwrap(); + packet.quotable.push(crate::projection::select::Quotable { id: "q7".into(), event: "$q7".into(), room: MINDS.into(), who: "Kiko".into(), sender: KIKO.into(), at_ms: at - 100_000, text: "Libby, keep that welcome to yourself for now, don't post it in here yet.".into() }); + let prose = "Both asked me to hold it. Meta, Kiko: holding it."; + let holds = json!([{ "line": "q3", "words": "hold it, don't post it in here yet", "where": "here" }, { "line": "q7", "words": "don't post it in here yet", "where": "here" }]); + let (state, _) = committed(&answered(&packet, prose, json!({ "say": [say_holding(1, json!([]))], "gaps": [], "hold": holds })), prose); + let p2 = kiko_asks(&state["holds"]); + assert_eq!(p2.holds.len(), 2, "{state}"); + let prose = format!("Kiko asked. {K45_WELCOME} I'll give it to Kiko. Kiko, here it is: {K45_WELCOME}"); + let d = answered(&p2, &prose, json!({ "say": [say_holding(2, json!([]))], "gaps": [], "unsent": [{ "draft": 1, "how": "superseded", "quote": "I'll give it to Kiko" }] })); + let ids: Vec<&str> = d["refused"][0]["holds"].as_array().unwrap().iter().filter_map(|hold| hold["id"].as_str()).collect(); + assert_eq!((texts(&d), reasons(&d), ids), (Vec::::new(), vec![Some("held")], vec!["h1", "h2"]), "{d}"); +} + /// Her listed line in the covered room whose time is unknown counts toward the measure, and one posted at the very /// instant the hold was made does not: the split welcome's second half is held over the first, and goes out over the /// second. This pins Soul's surviving mutants `s-listed-unknown-time-excluded` and `s-listed-at-made-counts`.