From 2b015cb5dcc5f91738736b4f778742c893129e47 Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Thu, 16 Jul 2026 15:27:41 -0400 Subject: [PATCH] test(desktop): make omission-preservation test discriminate on instructions (#1988) Signed-off-by: Will Pfleger Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 --- desktop/src-tauri/src/commands/personas/inbound_tests.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop/src-tauri/src/commands/personas/inbound_tests.rs b/desktop/src-tauri/src/commands/personas/inbound_tests.rs index 81d6061cda..1000e48b70 100644 --- a/desktop/src-tauri/src/commands/personas/inbound_tests.rs +++ b/desktop/src-tauri/src/commands/personas/inbound_tests.rs @@ -468,6 +468,10 @@ fn inbound_team_omitted_fields_preserve_local() { // Sietch Tabr wipe: an old-shaped (or genuinely field-omitting) event // must not blank out a team that has real membership/instructions. let mut teams = vec![local_team()]; + // Give local_team real instructions so preservation is discriminating: + // the pre-fix blind-overwrite bug would collapse this to `None`, while + // the fix must leave it untouched on an omitted field. + teams[0].instructions = Some("local instructions".to_string()); apply_inbound_team( &mut teams, TEAM_ID.to_string(), @@ -481,8 +485,9 @@ fn inbound_team_omitted_fields_preserve_local() { "shared non-optional field still overwrites" ); assert_eq!( - t.instructions, None, - "local had no instructions; omission preserves that (no-op)" + t.instructions, + Some("local instructions".to_string()), + "omitted instructions preserves local value rather than wiping it" ); assert_eq!( t.persona_ids,