2.6 KiB
Cross-representation tachograph event mixing fix
Problem
A runtime request that loads both TACHOGRAPH_FILE_SESSION and TACHOGRAPH_DB can contain the same tachograph observation twice. The earlier mixing implementation primarily handled CARD versus VU evidence. It did not reliably classify the semantic source role and physical representation of every event, and it did not suppress duplicate observations when both copies had the same source role (for example VU file-session plus VU database serialization).
This produced nearly doubled activity and support-event results in mixed executions.
Implementation
- Added semantic tachograph evidence source roles:
DRIVER_CARDVEHICLE_UNITUNKNOWN
- Added physical representation classification:
FILE_SESSIONDATABASEUNKNOWN
- Source-role inference now uses extraction code, raw source metadata, package event-source metadata, package kind and external event identifiers.
- Database runtime packages identified by
RUNTIME:TACHOGRAPH:*take precedence over retained original file-session package metadata. - Existing CARD/VU rules now use semantic source roles, with extraction codes retained only as fallback for unclassified events.
- Added same-source-role cross-representation rules for activity and support evidence:
- database representation is retained as primary;
- matching file-session representation is suppressed as a duplicate;
- exact timestamps remain required;
- semantic compatibility checks still protect meaningful conflicts.
CARD_VEHICLES_USEDandIW_CYCLEremain untouched by event mixing and continue to be handled by interval-level reconciliation.- Added mixing diagnostics for source roles, representations, candidate groups, rejected compatibility pairs and suppressed events.
- Fixed tachograph place SQL so entry type
6is classified asSTART, consistently with file-session parsing.
Tests added/updated
- Same VU place observation from file session and database is reduced to one event.
- Same CARD activity observation from file session and database is reduced to one event.
- Database/file-session representation classification remains correct even when DB rows retain original file-session package metadata.
- Existing CARD/VU parity and CVU/IW preservation tests remain covered.
Validation
The modified Java files were passed through a javac parser check. Only expected missing dependency/classpath errors were reported; no Java syntax errors were detected. Maven and a Maven wrapper are unavailable in the execution environment, so the full project test suite was not executed.