feat(v1): compose temporal fall event pipeline

This commit is contained in:
ila
2026-07-21 11:57:22 +08:00
parent 906e06565e
commit f03662bf5a
16 changed files with 554 additions and 34 deletions
+20
View File
@@ -1,5 +1,6 @@
"""Validated, credential-safe configuration loading for Silver Pose V1."""
import hashlib
import json
import os
import re
@@ -31,6 +32,25 @@ class AppConfig:
event: EventConfig
event_dir: Path
@property
def runtime_config_version(self) -> str:
"""Return a stable, non-secret identifier for the active event settings."""
payload = {
"source_id": self.source_id,
"model_sha256": self.model_sha256,
"confidence_threshold": self.confidence_threshold,
"event": {
"keypoint_confidence_threshold": self.event.keypoint_confidence_threshold,
"suspect_window_seconds": self.event.suspect_window_seconds,
"confirm_window_seconds": self.event.confirm_window_seconds,
"recovery_window_seconds": self.event.recovery_window_seconds,
"cooldown_seconds": self.event.cooldown_seconds,
},
}
canonical = json.dumps(payload, sort_keys=True, separators=(",", ":"))
return "cfg-" + hashlib.sha256(canonical.encode("utf-8")).hexdigest()
_ENVIRONMENT_NAME = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
_SHA256 = re.compile(r"^[0-9a-fA-F]{64}$")