From b014a3d31514c6d21a4fa608d539a64ac79a92b0 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 5 May 2026 08:27:52 -0700 Subject: [PATCH] test(cron): update _isolate_tick_lock fixture for _get_lock_paths After PR #13725 replaced the module-level _LOCK_DIR/_LOCK_FILE constants with a dynamic _get_lock_paths() helper, the xdist-isolation fixture needs to patch the function instead of the removed constants. --- gateway/platforms/feishu.py | 9 +++++---- scripts/release.py | 1 + tests/cron/test_scheduler.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gateway/platforms/feishu.py b/gateway/platforms/feishu.py index ddf98e7830..0a28491240 100644 --- a/gateway/platforms/feishu.py +++ b/gateway/platforms/feishu.py @@ -4090,10 +4090,11 @@ class FeishuAdapter(BasePlatformAdapter): content=payload, uuid_value=str(uuid.uuid4()), ) - # Detect whether chat_id is an open_id (private message) or a group chat_id. - # Feishu API requires receive_id_type="open_id" for user DMs (oc_/ou_ prefix) - # and receive_id_type="chat_id" for group chats (ch_ prefix). - if chat_id.startswith(("oc_", "ou_")): + # Detect whether chat_id is a user open_id (DM) or a chat_id (group). + # Feishu API expects receive_id_type="open_id" for user DMs (ou_ prefix) + # and receive_id_type="chat_id" for group chats (oc_ prefix, which IS + # the chat_id format — see https://open.feishu.cn/document/). + if chat_id.startswith("ou_"): receive_id_type = "open_id" else: receive_id_type = "chat_id" diff --git a/scripts/release.py b/scripts/release.py index 09ca21f24d..1b795c27d3 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -55,6 +55,7 @@ AUTHOR_MAP = { "14046872+tmimmanuel@users.noreply.github.com": "tmimmanuel", "657290301@qq.com": "IMHaoyan", "revar@users.noreply.github.com": "revaraver", + "dengtaoyuan@dengtaoyuandeMac-mini.local": "dengtaoyuan450-a11y", "beardthelion@users.noreply.github.com": "beardthelion", "tangyuanjc@JCdeAIfenshendeMac-mini.local": "tangyuanjc", "leon@agentlinker.ai": "agentlinker", diff --git a/tests/cron/test_scheduler.py b/tests/cron/test_scheduler.py index 460c00add0..2182a1b17d 100644 --- a/tests/cron/test_scheduler.py +++ b/tests/cron/test_scheduler.py @@ -2055,8 +2055,8 @@ class TestParallelTick: """Point the tick file lock at a per-test temp dir to avoid xdist contention.""" lock_dir = tmp_path / "cron" lock_dir.mkdir() - with patch("cron.scheduler._LOCK_DIR", lock_dir), \ - patch("cron.scheduler._LOCK_FILE", lock_dir / ".tick.lock"): + lock_file = lock_dir / ".tick.lock" + with patch("cron.scheduler._get_lock_paths", return_value=(lock_dir, lock_file)): yield def test_parallel_jobs_run_concurrently(self):