-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrift.py
More file actions
30 lines (23 loc) · 1 KB
/
Copy pathdrift.py
File metadata and controls
30 lines (23 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Drift detection event emitted when replay diverges from original execution."""
from dataclasses import dataclass
from .base import EventType, TraceEvent
__all__ = ["DriftDetectedEvent"]
@dataclass(kw_only=True)
class DriftDetectedEvent(TraceEvent):
"""Event emitted when a replayed decision diverges from the original execution.
Attributes:
event_type: Always EventType.DRIFT
description: Human-readable summary of what drifted
original_value: The value from the original execution
restored_value: The value from the restored/replayed execution
drift_event_type: The event type where drift was detected (e.g. "decision")
drift_index: Position in the original event sequence where drift occurred
severity: "warning" or "critical"
"""
event_type: EventType = EventType.DRIFT
description: str = ""
original_value: str = ""
restored_value: str = ""
drift_event_type: str = ""
drift_index: int = 0
severity: str = "warning"