const HANDLER: &str = include_str!("../channels/whatsapp/handler.rs");
#[test]
fn group_history_is_deduped_through_the_shared_preamble() {
assert!(
HANDLER.contains("group_history::build_preamble("),
"WhatsApp must route group history through the shared deduping preamble (#1618)"
);
}
#[test]
fn the_hand_rolled_history_block_is_gone() {
assert!(
!HANDLER.contains("[Recent group history ({} messages):"),
"the raw un-deduped history block is back; it re-sends the window every turn"
);
}
#[test]
fn group_turns_carry_the_sender_label() {
assert!(
HANDLER.contains("group_history::current_sender_label("),
"WhatsApp group turns must name the current sender so the model does not \
address them by a name that only appears in the history (#682)"
);
assert!(
HANDLER.contains("\"WhatsApp group\","),
"the label must name the surface as a WhatsApp group"
);
}
#[test]
fn one_to_one_chats_keep_their_own_shape() {
assert!(
HANDLER.contains("[WhatsApp message from {}]"),
"the one-to-one identity line must survive the group-path rewrite"
);
}