# Tachograph DB / file-session runtime parity The runtime pipeline treats direct tachograph file-session events and events loaded from the tachograph database as two representations of the same tachograph facts. ## Canonical semantic boundary `RuntimeTachographEventSemantics` normalizes representation-only differences without modifying the original event: - file-session and DB source systems are exposed as `TACHOGRAPH`; - extraction codes are read from DB raw metadata or inferred from source kind and event domain; - `PLACE START` and `PLACE BEGIN` share the semantic lifecycle `BEGIN` for mixing. The raw lifecycle, source package, payload, and external source event ID remain unchanged for audit and provenance. ## Runtime aggregation `RuntimeEventAggregationService` is shared by: - `TachographFileSessionRuntimeEventLoader`; - `TachographDbRuntimeEventLoader`; - `UnifiedRuntimeEventAssemblyService`. Aggregation removes: - repeated reads of the same source record; - duplicate serialized representations of the same extraction observation. It deliberately preserves evidence pairs that are resolved downstream: - `CARD_ACTIVITY` / `VU_ACTIVITY`; - card/VU support evidence; - `CARD_VEHICLES_USED` / `IW_CYCLE`. The first two are handled by `RuntimeEventMixingService`. Vehicle usage remains source-distinct until interval-level reconciliation. ## Regression coverage `RuntimeTachographRepresentationParityTest` verifies equal source profiles and mixing outcomes for DB and file-session representations. `RuntimeEventAggregationServiceTest` verifies that technical duplicates are reduced while card/VU and CVU/IW evidence remains available to later modules.