diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index 8de2b09..cc451e4 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -2430,9 +2430,11 @@ fn k51_released_hold_carries_nothing() { let (state, _) = held_then_kiko_asks(&[K45_WELCOME]); let mut next = heimdall(); next["holds"] = state["holds"].clone(); - let room = Room { messages: vec![line(MINDS, "@meta:gamecult.org", "Meta", "Go ahead and post it, Libby.", true)], here: Some(MINDS.into()), ..Room::default() }; + let at = u64::try_from(now().timestamp_millis()).unwrap(); + let meta = RoomLine { event: "$go".into(), at_ms: at - 90_000, ..line(MINDS, "@meta:gamecult.org", "Meta", "Go ahead and post it, Libby.", true) }; + let room = Room { messages: vec![meta, line(MINDS, KIKO, "Kiko", "Libby, what did you end up writing for the newcomers?", true)], here: Some(MINDS.into()), ..Room::default() }; let p2 = packet_in(TurnKind::Chat, &next, &room, 1); - let go = p2.quotable[0].id.clone(); + let go = p2.quotable.iter().find(|line| line.event == "$go").map(|line| line.id.clone()).unwrap_or_else(|| panic!("{:?}", p2.quotable)); let prose = "Meta let it go, and I wait to post it. Thanks, Meta, posting it next."; let release = answered(&p2, prose, json!({ "say": [], "gaps": [], "hold_released": [{ "hold": "h1", "line": go }], "unsent": [{ "draft": 1, "how": "declined", "quote": "I wait to post it" }] })); let (after, applied) = crate::projection::commit::apply(&state, &json!({ "interpreter": release, "posted": [], "edited": [] }), prose, "r1-t3", now()); diff --git a/crates/mind-body/src/projection/tests.rs b/crates/mind-body/src/projection/tests.rs index 7e7c203..b0f9a35 100644 --- a/crates/mind-body/src/projection/tests.rs +++ b/crates/mind-body/src/projection/tests.rs @@ -2988,8 +2988,8 @@ fn k37_her_view_shows_what_she_holds() { assert!(!narrate::projector_prompt(&packet, &Tuning::default()).contains("don't tell Kiko"), "the Projector gets nothing of them"); } -/// K45 (map 16.30.2): under each hold in her view, what she has held for it, in her own words; the Interpreter's list and -/// the Projector carry none of it. +/// K45 (map 16.30.2): under each hold in her view, what she has held for it, in her own words; the Projector carries +/// none of it. K51 (map 16.31.3): the Interpreter's list does, so naming has what a hold carries to judge by. #[test] fn k45_her_view_shows_what_she_has_held() { let mut with = promising(1); @@ -2998,6 +2998,8 @@ fn k45_her_view_shows_what_she_has_held() { let block = "Held for others:\n- held for Meta, the operator, asked about half an hour ago in #swarm:gamecult.org: \"hold it, don't post it in here yet\". Not to go in #swarm:gamecult.org until Meta, the operator lets it go.\n - you have held, for Meta, the operator: \"Hello, and welcome, we're glad you're here.\"\n - you have held, for Meta, the operator: \"Kiko, here it is: the welcome.\""; assert!(packet.in_view.contains(block), "{}", packet.in_view); assert_eq!(packet.holds[0].carries.len(), 2); - assert!(!interpret::speech_prompt(&packet, "The room is warm.", "y", &Tuning::default()).contains("glad you're here"), "the Interpreter's list carries none of it"); + let speech = interpret::speech_prompt(&packet, "The room is warm.", "y", &Tuning::default()); + assert!(speech.contains("until Meta, the operator lets it go; she has held for them: \"Hello, and welcome, we're glad you're here.\", \"Kiko, here it is: the welcome.\". +"), "{speech}"); assert!(!narrate::projector_prompt(&packet, &Tuning::default()).contains("glad you're here"), "the Projector gets nothing of them"); }