From 1fd4acc694e89519903401250fbfaf6124fe35be Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Mon, 24 Aug 2026 19:37:02 -0400 Subject: [PATCH] test(workflows): provide durable message provenance Update relay action-sink integration fixtures for the immutable workflow message context required by delivery persistence. Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson --- crates/buzz-relay/src/workflow_sink.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/buzz-relay/src/workflow_sink.rs b/crates/buzz-relay/src/workflow_sink.rs index d65533fb0a..4e03f3dd90 100644 --- a/crates/buzz-relay/src/workflow_sink.rs +++ b/crates/buzz-relay/src/workflow_sink.rs @@ -760,6 +760,17 @@ mod integration_tests { use buzz_db::CreateCommunityWithOwnerResult; use std::sync::Arc; + fn message_context() -> WorkflowMessageContext { + WorkflowMessageContext { + workflow_id: Uuid::new_v4(), + run_id: Uuid::new_v4(), + definition_event_id: nostr::EventId::all_zeros().to_hex(), + step_id: "message".to_string(), + execution_trace: serde_json::json!({}), + trigger_context: None, + } + } + /// Real-PG state mirroring `handlers::event::tests::test_state_with_redis_url`. async fn test_state() -> Arc { let mut config = crate::config::Config::from_env().expect("default config loads"); @@ -865,6 +876,7 @@ mod integration_tests { &channel.id.to_string(), "heads up @Robby — please take a look", &author_hex, + &message_context(), None, ) .await @@ -941,6 +953,7 @@ mod integration_tests { &channel.id.to_string(), "root message", &author_hex, + &message_context(), None, ) .await @@ -953,6 +966,7 @@ mod integration_tests { &channel.id.to_string(), "threaded reply", &author_hex, + &message_context(), Some(&root_hex), ) .await @@ -1095,6 +1109,7 @@ mod integration_tests { &channel_hex, "workflow reply", &author_hex, + &message_context(), Some(&parent_hex), ) .await @@ -1176,6 +1191,7 @@ mod integration_tests { &channel_hex, "workflow reply to root-only parent", &author_hex, + &message_context(), Some(&root_only_parent_hex), ) .await @@ -1238,6 +1254,7 @@ mod integration_tests { &channel.id.to_string(), "orphan reply", &author_hex, + &message_context(), Some(&unknown), ) .await