Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

.nornir/korp-ingest-design.md

korp Ingest pane — the collector consumption seam — design

Class: design · Function axis: f0 (one drivable pane consumes every korp collector) · f1 IngestRow mirror + from_descriptor mapping · f2 demo_full production roster · f3 robot-drive + test-matrix. Strict: this file states only the shape that is built. It documents the facett-korp half of "provide the collectors korp needs, korp can consume" — the collectors themselves live in the sibling leaf korp-collectors (boats/planes/energy/roads).

f0 — one pane, every collector (the whole)

korp's open-data ingest surface is a drivable facett-korp::IngestPane (Elm/Facet/ Panel, headless update_json + state_json). The collectors it lists — OSM/Trafikverket roads, AIS boats, OpenSky planes, ENTSO-E energy — are not re-implemented here; they are the built-ins of korp-collectors::registry(). This crate is a pure leaf (depends on facett-core only, never korp-collectors), so the host maps the registry across the seam. No cycle, no twin.

f1 — IngestRow mirror + the from_descriptor mapping

IngestRow { name, source, target, direction } is the facett-side mirror of a (CollectorMeta, SourceTarget) descriptor. The host maps the live registry through one call, preserving the declared flow direction (IngestRow::new hardcodes "source"; from_descriptor carries meta.direction.as_str() so a sink stays a sink):

let rows = korp_collectors::registry_descriptors()
    .into_iter()
    .map(|(meta, st)| facett_korp::IngestRow::from_descriptor(
        meta.name, st.source.as_str(), st.label(), meta.direction.as_str()))
    .collect();
let pane = facett_korp::IngestPane::from_descriptors("Ingest", rows);

f2 — demo_full — the production roster without a live registry

IngestPane::demo_full() hand-mirrors korp_collectors::registry() so a host without a live registry (or a headless test) still shows the real breadth — the boats (ais, marinetraffic_ais), planes (opensky), energy (entsoe), and roads (osm, trafikverket_road_network) feeds the task names — not just the 4-row demo(). Same from_descriptor shape as the live host, so the two paths never diverge in structure.

f3 — robot-drive + test contract

Deferred (plan)