Build 060.28: implement Persistent Checkpoint and Startup Recovery

This commit is contained in:
2026-08-01 20:55:32 +03:00
parent 58e5a12a4d
commit 8c485e32b1
63 changed files with 12430 additions and 92 deletions

View File

@@ -557,6 +557,8 @@ def test_application_cancellation_performs_full_cleanup() -> None:
"telegram-polling",
"trade-stream-runtime",
"application-shutdown",
"market-data-storage-startup",
"market-data-storage-shutdown",
}
}
@@ -637,6 +639,8 @@ def test_simultaneous_root_failures_are_awaited_deterministically() -> None:
"telegram-polling",
"trade-stream-runtime",
"application-shutdown",
"market-data-storage-startup",
"market-data-storage-shutdown",
}
}
@@ -647,6 +651,7 @@ def test_repeated_cancellation_does_not_interrupt_cleanup() -> None:
async def scenario() -> None:
dispatcher = FakeDispatcher()
runtime = BlockingStopRuntime()
storage = FakeStorageLifecycle()
bot = FakeBot()
task = asyncio.create_task(
run_application(
@@ -654,6 +659,7 @@ def test_repeated_cancellation_does_not_interrupt_cleanup() -> None:
dispatcher=dispatcher,
runtime=runtime,
bot=bot,
storage_lifecycle=storage,
)
)
)
@@ -664,6 +670,8 @@ def test_repeated_cancellation_does_not_interrupt_cleanup() -> None:
await runtime.stop_entered.wait()
task.cancel()
await asyncio.sleep(0)
assert storage.stop_calls == 0
runtime.stop_release.set()
with pytest.raises(asyncio.CancelledError):
@@ -673,6 +681,7 @@ def test_repeated_cancellation_does_not_interrupt_cleanup() -> None:
assert dispatcher.cancelled.is_set()
assert runtime.stop_calls == 1
assert runtime.stopped.is_set()
assert storage.stop_calls == 1
assert bot.session.close_calls == 1
await asyncio.sleep(0)
assert not {
@@ -685,6 +694,8 @@ def test_repeated_cancellation_does_not_interrupt_cleanup() -> None:
"telegram-polling",
"trade-stream-runtime",
"application-shutdown",
"market-data-storage-startup",
"market-data-storage-shutdown",
}
}