fix(v1): wire model confidence, explicit source mode, unique event ids
A: PoseAdapter.set_confidence_threshold is applied on start, so the
settings model-confidence field actually affects inference.
B: config source.mode ('stream'|'replay') is explicit; app no longer
guesses the source type from the URL prefix.
C: FallStateMachine takes a session_id and from_config generates a
unique one per run, so event ids never collide across restarts
(no screenshot overwrite or duplicate JSONL identity in a day).
51 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@ class AppConfig:
|
||||
confidence_threshold: float
|
||||
event: EventConfig
|
||||
event_dir: Path
|
||||
source_mode: str = "stream"
|
||||
|
||||
@property
|
||||
def runtime_config_version(self) -> str:
|
||||
@@ -113,6 +114,10 @@ def load_config(path: Path) -> AppConfig:
|
||||
if not source_url:
|
||||
raise ConfigError("missing RTSP environment variable: {0}".format(environment_name))
|
||||
|
||||
source_mode = source.get("mode", "stream")
|
||||
if source_mode not in ("replay", "stream"):
|
||||
raise ConfigError("source.mode must be 'replay' or 'stream'")
|
||||
|
||||
model = _mapping(root.get("model"), "model")
|
||||
model_sha256 = _text(model.get("sha256"), "model.sha256").lower()
|
||||
if not _SHA256.match(model_sha256):
|
||||
@@ -163,4 +168,5 @@ def load_config(path: Path) -> AppConfig:
|
||||
),
|
||||
event=event,
|
||||
event_dir=_resolve_path(config_path, artifacts.get("event_dir"), "artifacts.event_dir"),
|
||||
source_mode=source_mode,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user