2.0 KiB
2.0 KiB
Cross-representation tachograph event mixing fix
Problem
When a runtime request combined TACHOGRAPH_FILE_SESSION and TACHOGRAPH_DB, CARD and VU observations of the same tachograph fact were often not fused. The old compatible keys embedded representation-specific values such as tenant metadata, coordinate string scale, country representation, region defaults, vehicle completeness and interval metadata.
Examples of equivalent values that produced different keys:
- country
13versusD; - region
0versusnull; - longitude
9.3883333333333336versus9.388333333333334; - file-session package tenant
defaultversus the DB tenant; - CARD events without VIN versus VU events with VIN.
Changes
- Compatible activity and support keys now contain only stable candidate identity:
- driver;
- domain;
- event type;
- semantic lifecycle;
- exact event timestamp.
- Exact timestamp behavior is unchanged.
- Added
RuntimeEventEvidenceCompatibilityMatcherto validate grouped candidates semantically. - Support compatibility normalizes:
- tachograph nation numeric/alpha forms;
- region
0/blank/null; - coordinate decimal scale with a
1e-9serialization tolerance; - registration formatting;
- optional VIN, odometer and operation data.
- Missing optional data is enrichable, while conflicting meaningful values prevent fusion.
- Activity compatibility allows source-specific optional metadata differences while still checking tenant, vehicle/registration and card slot compatibility.
- Mixing now evaluates compatibility per primary/secondary pair instead of suppressing every secondary in a broad group.
- Internal mixing state now tracks events by object identity and uses the UUID before
externalSourceEventId, avoiding collisions from repeated source-side IDs such asCARDPLACE-1.
Tests
Added regression coverage for:
- file-session
CARD_PLACEversus DBVU_PLACEwith13/D,0/null and decimal-scale differences; - file-session CARD activity versus DB VU activity;
- meaningful coordinate conflicts remaining separate.