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

nordisk/holger

docs/tasks/HOL-FLOW-SMART.md

Task for Henrik: the smart flow (HOL-FLOW-SMART)

Owner: Henrik. Holger's coordinator lanes keep their hands off this, so there is no clash. Ask Rickard about scope. The plan is docs/ROADMAP.md, section "The smart flow".

Goal

Today the console, Overview and Flow all show the same drawing: the whole RON in one picture. Make it smart, as three zoom levels of one model.

  1. Level 1, Overview: the estate from our server's view.

    • The boxes: console (ui), front, main, twin, each downstream (fetching or one-way), the diode drop area (shown when export.push_to is set), and the upstream sources (pypi, Chainguard, crates…).
    • The lines are detected connections with live state: pairing, sync lag, bytes, last contact.
    • The counters sit on the boxes and lines: artifacts, waiting for approval, quarantined, lag.
  2. Level 2, Flow: click a machine and it unfolds in place, showing its part of the RON:

    • main: repositories, the intake chain (incoming → scanned → policy → approved → sealed → served), gates, storage, the promotion ladder;
    • front: doors, hosts, routes;
    • a downstream: its own RON summary;
    • twin: the mirror, and its lag. The RON's inputs and outputs end as ports on the machine border, joining the level-1 lines. Sources enter main's intake port; bundles leave main's export port and enter a downstream's inbox port.
  3. Level 3: a "Show the full RON" button unfolds every machine.

The menus then each get one job:

Where the code is today (holger main)

Rules (the same as the rest of Holger)

What you have to draw with

Examples are in docs/tasks/flow-smart/:

1. The flow model: /-/flow.json (server/lib/src/flow.rs, schema in the file)

2. The live estate: AdminService.Topology (proto/holger.proto, TopologyReply)

3. What is missing, and is part of this task (server side, test-first)

4. The target picture (level 1, Overview)

 [pypi] [chainguard] [crates]                         sources
        \      |      /
 ┌ console ┐   ┌── front ──┐   ┌──── main ────┐ ⇄ ┌─ twin ─┐
 └─────────┘   │ doors     │──▶│ ▣ (unfold)    │   │ mirror │
               └───────────┘   └──────┬────────┘   └────────┘
                                      │ signed bundles (export port)
                  ┌───────────────────┼────────────────────┐
           downstream A          downstream B       [diode drop area]
           fetch · WG · lag 0    fetch · front           │ one way
                                                  downstream C (one-way inbox)

Each box and line carries its counters and its live state. Clicking main gives level 2: main's box grows and shows today's chain, flow and storage bands inside its border.

The visual style follows today's flow.rs SVG: the same boxes, fonts and theme tokens. Keep it one SVG renderer for all three levels.

5. What to draw, and where each fact comes from (rules)

How to work on it

Where to try it

test2.holger.rs runs a recent DEV build. Ask Rickard for an admin passkey invite there, or run it locally with the guide "Three products by hand" in the README.