Coverage for src/copytrading_engine/host/errors.py: 100%
11 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"""Typed failures raised by the engine self-test and installation store."""
4class WorkflowError(Exception):
5 """Base for declared workflow failures safe to map at the IPC boundary."""
8class InvalidCommand(WorkflowError):
9 """A self-test command violates a domain invariant."""
12class IdentityConflict(WorkflowError):
13 """A command ID was reused for different canonical command content."""
16class UnsupportedSelfTest(WorkflowError):
17 """The local deterministic parser does not support the source text."""
20class InvalidTransition(WorkflowError):
21 """A workflow stage transition is illegal or lost its compare-and-set race."""
24class WorkflowNotFound(WorkflowError):
25 """The requested command ID has no persisted workflow."""
28class StoreUnavailable(WorkflowError):
29 """The durable store is unavailable or has an uncertain commit outcome."""
32class StoreClosed(WorkflowError):
33 """The store is closing or has already been closed."""
36class InstallationAlreadyRunning(WorkflowError):
37 """Another process currently owns this installation's engine lock."""
40class ForeignInstallation(WorkflowError):
41 """The persisted database belongs to a different installation identity."""
44class UnknownSchemaVersion(WorkflowError):
45 """The database schema is not known to this engine version."""