Tighten up message broadcast contract

This commit is contained in:
Jack Kingsman
2026-03-06 15:55:04 -08:00
parent 3330028d27
commit dd13768a44
6 changed files with 220 additions and 8 deletions
+3
View File
@@ -157,6 +157,7 @@ class TestOutgoingChannelBroadcast:
assert data["type"] == "CHAN"
assert data["conversation_key"] == chan_key.upper()
assert data["sender_name"] == "MyNode"
assert data["channel_name"] == "#general"
@pytest.mark.asyncio
async def test_send_channel_msg_response_includes_current_ack_count(self, test_db):
@@ -177,6 +178,7 @@ class TestOutgoingChannelBroadcast:
# Fresh message has acked=0
assert message.id is not None
assert message.acked == 0
assert message.channel_name == "#acked"
@pytest.mark.asyncio
async def test_send_channel_msg_includes_sender_key(self, test_db):
@@ -498,6 +500,7 @@ class TestResendChannelMessage:
assert event_type == "message"
assert event_data["id"] == result["message_id"]
assert event_data["outgoing"] is True
assert event_data["channel_name"] == "#broadcast"
@pytest.mark.asyncio
async def test_resend_byte_perfect_still_enforces_window(self, test_db):