Type synthetic FLM storage fixture tokens precisely

This commit is contained in:
Dom
2026-10-18 14:44:11 -05:00
parent b04bbb55cb
commit fe2cc2aa9f
2 changed files with 11 additions and 3 deletions
@@ -1,14 +1,22 @@
"""Storage-only synthetic row identity, not physical/native qualification."""
from typing import Protocol, cast
import pytest
from openpilot.starpilot.flm.event_collector import EventFullrateCollector
from openpilot.starpilot.flm.fullrate_collector import RawPoint
from openpilot.starpilot.flm.tests.test_fullrate_pipeline import SyntheticAdapter, snapshots, BASE
class _StorageTokens(Protocol):
"""Opaque identity tokens for storage tests, not production context tuples."""
context: tuple[str] | None
physical_context: tuple[str] | None
def setup():
collector = EventFullrateCollector(SyntheticAdapter())
collector.context = ('source',)
collector.physical_context = ('physical',)
cast(_StorageTokens, collector).context = ('source',)
cast(_StorageTokens, collector).physical_context = ('physical',)
collector.cohort = 'event-storage.source'
control, output, _ = snapshots(BASE)
def rows(start, count):
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "61f1fee01e40a0730443c9718eb3d9fdfb1bc8fb125dd78f3750552fc2939a8c", "schema_version": 1}
{"protected_inventory_sha256": "6bc7c0cbaf316c0ddf67f5769fc649cd8449df64e317e4a431b88ae22d390af6", "schema_version": 1}