From 53f06855dcf845db3ed141da97be2ab413082d3a Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Tue, 6 Oct 2026 14:32:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=97=B6=E9=99=90=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=9A=84=E4=B8=A4=E5=A4=84=E8=AF=B4=E6=98=8E=E5=AF=B9?= =?UTF-8?q?=E4=B8=8A=E4=BB=A3=E7=A0=81=EF=BC=9A=E4=B8=8B=E6=B8=B8=E4=BD=99?= =?UTF-8?q?=E9=87=8F=E9=82=A3=E6=9D=A1=E5=86=99=E5=89=A9=20239=20=E7=A7=92?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=86=8D=E5=BC=80=E5=A7=8B=EF=BC=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=9F=A5=E7=9A=84=E5=B0=B1=E6=98=AF=20239=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E6=85=A2=E5=86=99=E6=8A=A5=E5=91=8A=E9=82=A3=E6=9D=A1?= =?UTF-8?q?=E5=86=99=E6=98=8E=E5=86=99=E6=8A=A5=E5=91=8A=E7=9A=84=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=99=A8=E6=8D=A2=E6=88=90=E4=BA=86=E8=A6=81=203=20?= =?UTF-8?q?=E7=A7=92=E7=9A=84=E6=9B=BF=E8=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/tests/test_run_deadline.py | 3 ++- backend/tests/test_verify_deadline.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/tests/test_run_deadline.py b/backend/tests/test_run_deadline.py index 2275163d..6f02da0a 100644 --- a/backend/tests/test_run_deadline.py +++ b/backend/tests/test_run_deadline.py @@ -127,7 +127,8 @@ async def test_the_reserve_follows_the_segment_length(clock): async def test_downstream_model_nodes_take_their_share(clock): - """下游还有写报告、反方审稿:剩 300 秒时给下游留 180 秒,这一项最多 90 秒(300 − 180 − 30);只剩 230 秒时不再开始。""" + """下游还有写报告、反方审稿:剩 300 秒时给下游留 180 秒,这一项最多 90 秒(300 − 180 − 30);剩 239 秒时(不到 + 180 + 30 + 30)不再开始。""" async with deadline.segment(clock.now + 300, 600): assert deadline.allot(120, grace=30.0, after=2) == deadline.Allot(True, 90.0, tightened=True, seconds=600) assert deadline.allot(120, grace=30.0).timeout_s == 120, "下游没有调模型的节点:照旧只留一份" diff --git a/backend/tests/test_verify_deadline.py b/backend/tests/test_verify_deadline.py index cd7aca75..dbb7bdc5 100644 --- a/backend/tests/test_verify_deadline.py +++ b/backend/tests/test_verify_deadline.py @@ -480,9 +480,9 @@ async def test_slow_blind_checks_no_longer_abort_the_run(monkeypatch, orders): async def test_a_slow_report_after_the_blind_checks_still_finishes(monkeypatch, orders): - """真的钟:双盲复算 → 写报告 → 成果,这一段只有 10 秒。盲算一项接一项,每项都查到时长用完(查不完的查询);写报告要 - 3 秒。双盲复算给下游的写报告多留了一份余量(4 秒),收尾之后报告写得完,运行照常完成——只留一份(2 秒)的话,盲算 - 用到最后,报告写到一半整次运行就被中止。几项来得及随机器快慢变,只断言不变的。""" + """真的钟:双盲复算 → 写报告 → 成果,这一段只有 10 秒。盲算一项接一项,每项都查到时长用完(查不完的查询);写报告的 + 执行器换成一个要 3 秒的替身(像写作模型慢)。双盲复算给下游的写报告多留了一份余量(4 秒),收尾之后报告写得完,运行 + 照常完成——只留一份(2 秒)的话,盲算用到最后,报告写到一半整次运行就被中止。几项来得及随机器快慢变,只断言不变的。""" monkeypatch.setattr(settings, "max_run_seconds", 10) monkeypatch.setattr(deadline, "RESERVE_S", 2.0) monkeypatch.setattr(verify_agent, "SETTLE_GRACE_S", 0.4)