petter2025 commited on
Commit
48e9ee1
·
verified ·
1 Parent(s): 3e2712e

Update event.py

Browse files
Files changed (1) hide show
  1. event.py +12 -7
event.py CHANGED
@@ -10,15 +10,20 @@ from datetime import datetime, timezone
10
  import hashlib
11
  import re
12
 
13
- from agentic_reliability_framework.core.config.constants import (
14
- LATENCY_WARNING, LATENCY_CRITICAL, LATENCY_EXTREME,
15
- ERROR_RATE_WARNING, ERROR_RATE_HIGH, ERROR_RATE_CRITICAL,
16
- CPU_WARNING, CPU_CRITICAL,
17
- MEMORY_WARNING, MEMORY_CRITICAL
18
- )
 
 
19
 
20
  def validate_component_id(component: str) -> Tuple[bool, str]:
21
- """Validate component ID format (alphanumeric and hyphens only)."""
 
 
 
22
  if not isinstance(component, str):
23
  return False, "Component ID must be a string"
24
  if not (1 <= len(component) <= 255):
 
10
  import hashlib
11
  import re
12
 
13
+ # Note: The following constants are not used directly in this file,
14
+ # but they are kept for potential future extensions or consistency with other modules.
15
+ # from agentic_reliability_framework.core.config.constants import (
16
+ # LATENCY_WARNING, LATENCY_CRITICAL, LATENCY_EXTREME,
17
+ # ERROR_RATE_WARNING, ERROR_RATE_HIGH, ERROR_RATE_CRITICAL,
18
+ # CPU_WARNING, CPU_CRITICAL,
19
+ # MEMORY_WARNING, MEMORY_CRITICAL
20
+ # )
21
 
22
  def validate_component_id(component: str) -> Tuple[bool, str]:
23
+ """
24
+ Validate component ID format (alphanumeric and hyphens only).
25
+ Returns (is_valid, error_message).
26
+ """
27
  if not isinstance(component, str):
28
  return False, "Component ID must be a string"
29
  if not (1 <= len(component) <= 255):