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:
ila
2026-07-21 20:54:34 +08:00
co-authored by Claude Opus 4.8
parent 7443a8f031
commit 04422d9ca0
13 changed files with 188 additions and 7 deletions
+15
View File
@@ -119,3 +119,18 @@ def test_pipeline_from_config_uses_runtime_version_for_confirmed_event():
result = pipeline.process(_packet(1.1))
assert result.events[0].config_version == config.runtime_config_version
def test_from_config_gives_each_run_a_unique_event_id():
config = _config()
def confirm(pipeline):
pipeline.process(_packet(0.0))
pipeline.process(_packet(0.1))
return pipeline.process(_packet(1.1)).events[0].event_id
frames = [(_pose(),), (_pose(horizontal=True),), (_pose(horizontal=True),)]
first = confirm(FallPipeline.from_config(config, _SequencePoseAdapter(list(frames))))
second = confirm(FallPipeline.from_config(config, _SequencePoseAdapter(list(frames))))
assert first != second