fix: recover eligible model GPU routes

This commit is contained in:
CoolBoy
2026-09-20 10:47:22 +08:00
parent 3077b169c5
commit 75c034d588
13 changed files with 436 additions and 29 deletions

View File

@@ -27,10 +27,12 @@ class PollPolicyTests(unittest.TestCase):
def test_architecture_history_backfill_resumes_and_keeps_only_decision_state(self) -> None:
class PagedHistoryClient:
calls: list[int] = []
end_times: list[datetime] = []
def list_tasks_page(self, **kwargs): # noqa: ANN003, ANN201
current = int(kwargs["current"])
self.calls.append(current)
self.end_times.append(kwargs["end_time"])
records = {
1: [
{
@@ -101,6 +103,8 @@ class PollPolicyTests(unittest.TestCase):
self.assertTrue(second["complete"])
self.assertNotIn("seenTaskIds", second)
self.assertEqual([1, 2], client.calls)
self.assertTrue(all(isinstance(value, datetime) for value in client.end_times))
self.assertEqual(client.end_times[0], client.end_times[1])
self.assertEqual(3, restored.get_stats_report()["terminalRecords"])
self.assertEqual([], json.loads(outcomes.read_text(encoding="utf-8") or "[]"))
persisted_progress = progress_path.read_text(encoding="utf-8")