mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 09:03:46 +08:00
Type synthetic FLM storage fixture tokens precisely
This commit is contained in:
@@ -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
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "61f1fee01e40a0730443c9718eb3d9fdfb1bc8fb125dd78f3750552fc2939a8c", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "6bc7c0cbaf316c0ddf67f5769fc649cd8449df64e317e4a431b88ae22d390af6", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user