Release beta 1.2.1.1019
check / local-gate (push) Failing after 16m58s

This commit is contained in:
JWeBot Contributors
2026-10-19 17:26:44 +08:00
parent e6d6ddf1c6
commit 3a7c11e44d
17 changed files with 162 additions and 77 deletions
+56 -6
View File
@@ -233,11 +233,15 @@ class RoutingTests(unittest.TestCase):
"李神是谁喵",
)
self.assertEqual(
MODULE.clean_chat_reply(
MODULE.unpack_reply_parts(MODULE.clean_chat_reply(
"这波像是脑子知道要撤,但是手完全没同意,"
"而且还顺手把队友也拖下水了。"
),
"这波像是脑子知道要撤\n但是手完全没同意\n而且还顺手把队友也拖下水了喵",
)),
[
"这波像是脑子知道要撤喵",
"但是手完全没同意喵",
"而且还顺手把队友也拖下水了喵",
],
)
def test_profile_memory_rejects_bare_versions_but_keeps_audio_context(self):
@@ -433,6 +437,52 @@ class LedgerAndApplicationTests(unittest.TestCase):
"chat_delivered",
)
def test_delivery_sends_multi_reply_as_separate_helper_calls(self):
runtime_python = Path(self.temporary.name) / "python"
delivery_helper = Path(self.temporary.name) / "jwebot_edge_delivery.py"
runtime_python.write_text("# runtime\n", encoding="utf-8")
delivery_helper.write_text("# helper\n", encoding="utf-8")
result = mock.Mock(returncode=0, stdout="", stderr="")
reply = MODULE.pack_reply_parts(["第一段喵", "第二段喵"])
with mock.patch.object(MODULE, "DELIVERY_HELPER", delivery_helper), \
mock.patch.dict(
os.environ,
{"JWEBOT_RUNTIME_PYTHON": str(runtime_python)},
), \
mock.patch.object(
MODULE.subprocess,
"run",
return_value=result,
) as run:
self.application.deliver(
{
"event_id": "event-1",
"group_fingerprint": "group-a",
"result_text": reply,
}
)
payloads = [
json.loads(call.kwargs["input"])
for call in run.call_args_list
]
self.assertEqual(
payloads,
[
{
"event_id": "event-1:part-1",
"group_fingerprint": "group-a",
"reply": "第一段喵",
},
{
"event_id": "event-1:part-2",
"group_fingerprint": "group-a",
"reply": "第二段喵",
},
],
)
def test_two_direct_generations_run_in_parallel(self):
entered = []
entered_lock = threading.Lock()
@@ -946,9 +996,9 @@ class LedgerAndApplicationTests(unittest.TestCase):
self.assertEqual(version["route"], "local")
self.assertIn("JWeBot 版本", version["text"])
self.assertIn("kernel", version["text"])
self.assertIn("最新版本:beta 1.2.0.1019", version["text"])
self.assertIn("更新时间:2026-10-19 17:05:47", version["text"])
self.assertIn("更新摘要:优化 Taffy 群聊语气", version["text"])
self.assertIn("最新版本:beta 1.2.1.1019", version["text"])
self.assertIn("更新时间:2026-10-19 17:23:58", version["text"])
self.assertIn("更新摘要:修复 Taffy 短句拆分只换行不分条", version["text"])
self.assertEqual(debug["route"], "local")
self.assertIn("调试埋点", debug["text"])
self.assertEqual(balance["route"], "local")