fix: 评估任务正在取工参时补取任务一分钟后再来,不用等定时检查;工作区没就绪时把页面文字记进日志

This commit is contained in:
2026-11-12 12:43:03 +08:00
parent 3a7a5b39b4
commit 1c1ff6a0af
6 changed files with 54 additions and 11 deletions
+4
View File
@@ -225,6 +225,10 @@ def test_provision_gives_up_or_reports_expired_login():
looping = OpenCode(FakeNqi([Reply(307, "/pro-opencode/api/provision?x=1")]), poll_seconds=0, provision_wait=0)
with pytest.raises(OpenCodeError, match="没有跳转到工作区"):
asyncio.run(looping.provision())
page = Reply(200)
page.text = "<html><style>p{}</style><body><p>正在准备 工作区</p><a href='?token=ticket&t=TGT-123456-abcdef'>x</a> TGT-999999-zzzzzz</body></html>"
assert never._page_hint(page) == "正在准备 工作区 x <票据>"
assert never._page_hint(Reply(200)) == ""
class FakeSession(OpenCode):