Coverage for src/copytrading_engine/backup/ports.py: 100%
8 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-16 16:55 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-16 16:55 +0000
1"""What backup and restore need from the engine: a write fence, schemas, account preparation."""
3from __future__ import annotations
5from contextlib import AbstractAsyncContextManager
6from pathlib import Path
7from typing import Protocol
10class BackupFence(Protocol):
11 def __call__(self) -> AbstractAsyncContextManager[None]: ...
14class SchemaCatalogProvider(Protocol):
15 def __call__(self, member_path: str) -> tuple[tuple[str, str, str, str], ...]: ...
18class AccountSnapshotSchemaProvider(Protocol):
19 @property
20 def execution_schema_revision(self) -> int: ...
22 @property
23 def snapshot_json_schema_version(self) -> int: ...
25 def validate_snapshot(self, serialized: str) -> tuple[str | None, str | None]: ...
28class RestoredAccountPreparer(Protocol):
29 def __call__(self, path: Path) -> None: ...