Recl∆Im — Pflicht-basierte Wirkungsanalyse von Rechtsnormen auf Ch∆In (F∆I)
Replaces the Phase-0 placeholder (returns const []) with a real
event-log reader. When the app starts in hub mode and the hub
is healthy, list() now:
1. Calls HubClient.eventLog(types: ['flow.completed']) over
gRPC (up to 200 most recent events).
2. Decodes each event's detail JSON as the Recl∆Im output bag
produced by flows/durchstich-gewo-14.yaml — keys: norm,
skm, benefit, frust, cohort, duties.
3. Skips events from other flows (detected by absence of
norm + skm keys). One hub can serve many flows; only
Recl∆Im-shaped runs surface here.
4. Sorts by skmEurPerYear DESC, matching MockRepository's
'most-harmful first' ordering — UI behaves identically
across the mock-vs-live switch.
Field mapping (tolerant on absence, defaults documented):
norm.eli / title / jurabk / paragraph / paragraphs[]
-> Norm
skm.total_eur_per_year, skm.tier_lowest -> skmEurPerYear, tier
benefit.total -> benefitScore
frust.composite_frust -> frustScore
cohort.count -> affectedCount
cohort.source + .tier -> first Source entry
duties.duties[] -> List<Duty>
event.eventId -> auditEventId
event.timestamp -> norm.standDate
byEli() walks the same list once; for small per-norm caches we
defer batching to Phase 2.
Empty list = honest state: 'hub connected, no Recl∆Im flow
runs yet'. Caller decides how to render that (HeatmapPage
currently shows an empty grid; a clearer 'chain run flows/'-
hint lands in the same pass as the demo-banner reorganisation).
Signed-off-by: flemming-it <sf@flemming.it>
|
||
|---|---|---|
| app | ||
| flows | ||
| .gitignore | ||
| LICENSE | ||
| MACHBARKEITSSTUDIE.md | ||
| METHODIK.md | ||
| NOTICE | ||
| RUN.md | ||