@@ -736,11 +736,11 @@ def test_run_command_returns_nonzero_exit_code():
736736 assert rc == 42
737737
738738
739- def test_parse_email_no_message_id_gives_empty_source_id ():
740- """A message without a Message-ID header must yield sourceId == '' ."""
739+ def test_parse_email_no_message_id_gives_synthetic_source_id ():
740+ """A message without a Message-ID header must fall back to a channel:git_id sourceId ."""
741741 raw = b"From: A <a@example.com>\n Subject: s\n Date: Mon, 1 Jan 2024 12:00:00 +0000\n \n body\n "
742742 parsed = _parse_email (raw , "src" , "chan" , "c1" , "b1" )
743- assert parsed ["activityData" ]["sourceId" ] == ""
743+ assert parsed ["activityData" ]["sourceId" ] == "chan:c1 "
744744
745745
746746def test_parse_email_no_subject_gives_none_title ():
@@ -856,10 +856,10 @@ def test_parse_email_url_contains_message_id():
856856
857857
858858def test_parse_email_url_with_no_message_id ():
859- """When Message-ID is absent the url must end with a slash under the source's /r/ path ."""
859+ """When Message-ID is absent the url must embed the synthetic channel:git_id id ."""
860860 raw = b"From: A <a@example.com>\n Subject: s\n Date: Mon, 1 Jan 2024 12:00:00 +0000\n \n body\n "
861861 parsed = _parse_email (raw , "src" , "chan" , "c1" , "b1" )
862- assert parsed ["activityData" ]["url" ] == "src/r/"
862+ assert parsed ["activityData" ]["url" ] == "src/r/chan:c1 "
863863
864864
865865def test_parse_email_result_structure ():
0 commit comments