eventhub/README_PATCH.md

46 lines
1.8 KiB
Markdown

# EventHub runtime event-mixing refactor
This patch refactors the previous targeted card/VU duplicate handling into a first-class runtime event-mixing subsystem.
## New architecture components
- `RuntimeEventMixingModule`
- `RuntimeEventMixingService`
- `RuntimeEventDescriptor`
- `RuntimeEventDescriptorFactory`
- `RuntimeEventSourceProfile`
- `RuntimeEventMixingRule`
- `RuntimeEventMixingRuleRegistry`
- `RuntimeEventMixingDecisionDto`
- `RuntimeMixedEventBundle`
- `RuntimeResolvedEvent`
- `RuntimeResolvedEventRole`
- `RuntimeEventMixingChannel`
## Current configured rules
The rule registry currently applies these tachograph same-source rules:
1. `tachograph.activity.card-vu.same-event-key`
2. `tachograph.activity.card-vu.compatible-activity-key`
3. `tachograph.support.card-vu.same-event-key`
4. `tachograph.support.card-vu.compatible-support-key`
The activity rules collapse duplicate `CARD_ACTIVITY`/`VU_ACTIVITY` points before activity intervalization.
The support rules collapse duplicate card/VU support evidence for:
- `CARD_POSITION` / `VU_POSITION`
- `CARD_PLACE` / `VU_PLACE`
- `CARD_BORDER_CROSSING` / `VU_BORDER_CROSSING`
The card-side event remains the primary event. The VU-side event is suppressed from the processing channel but remains visible through `suppressedEvents`, `resolvedEvents`, and `eventMixingDecisions`.
## Still intentionally unchanged
`CARD_VEHICLES_USED` and `IW_CYCLE` are still not mixed. They remain fully accepted in `vehicleUsageEvents` because they need a separate vehicle-usage rule later.
## TACHOGRAPH_FILE_SESSION support
The descriptor factory recognizes `TACHOGRAPH_FILE_SESSION` and `COMPOSITE_TACHOGRAPH_FILE_SESSION` events and derives card/VU extraction codes from `sourceKind` and event domain when no explicit `extractionCode` is present.