Gunnar

nordisk/facett

.nornir/flow-pipelines-validation.md

# Falsett integration: implementation and verification

Recorded 2026-10-04 against Facett `main` at `a367f9aa`. The working tree contains
the implementation; no release has been published. The authoritative scope is
[the 29-step plan](plan-flow-pipelines.md).

## What is implemented

- Shared iterative layered layout in `facett-core`, adopted by graph, graphview
  and releaseview.
- Falsett host scenes, labels, rounded boxes, arrows, statuses, rates, layered
  placement, explicit compact state, picking and opt-in packet LOD.
- Pipeline, plandag, Brokkrview and Brokkr render through persistent flow scenes.
  Brokkr provides ports, connection and movement gestures, edge deletion,
  cycle refusal and bounded undo/redo.
- Demo fixtures, renderer installation and eviction, wasm feature wiring,
  compliance records, component cards and feature build declarations.
- Final review added idle eviction to the wasm component host, selected/focused
  node priority inside the 2,000-node accessibility budget, and executable forward
  and inverse Brokkr edit commands with a 200-entry limit.
- Feature-scene scenarios in `flow_lab`, a development-only host/layout benchmark
  in `dev/flow-bench`, and real Falsett GPU/cache/golden tests for pipeline,
  plandag and Brokkrview. The three new references are captured on Apple M2 Pro
  with Metal; their provenance is recorded alongside them. They are not Loki results.
- Downstream adapter patches and their exact validation limits are described in
  [integrations/README.md](../integrations/README.md).
- Reviewed Nornir and knut patches have also been applied to the supplied local
  checkouts. Nornir's existing layout facade now uses Facett's shared-core layout;
  its build tab shows cached flow plans and receives actual variant outcomes.

The original 64-unit node buckets remain. The proposed tree index was removed
at Andreas's request and is recorded only in
[future_improvements.md](../future_improvements.md). No performance improvement
from that proposal is claimed.

## Remaining work across the 29 steps

“Implemented” here describes the code, not completion of a step whose acceptance
also requires hardware measurements, downstream suites or publishing.
Implementation is present for **24 of 29 steps**: 2–16, 18–19 and 22–28. Steps
1, 17, 20, 21 and 29 still contain the baseline, hardware or release work. This
count does not turn pending acceptance checks into passed checks.

| Steps | Implementation state | Remaining acceptance work |
| --- | --- | --- |
| 1 | Authorization and baseline identity recorded | Fresh plain-flow Loki baseline |
| 2–3 | Shared layout and Facett migrations implemented | Dwarf and World-coderoom 100k performance comparisons |
| 4 | Feature build and shader proof scaffolding implemented | Execute the complete hardware measurement matrix |
| 5–12 | Host, labels, boxes, arrows, status, rate, layered and compact state implemented | Per-feature plain-scene performance witnesses on Loki |
| 13–15 | Plandag, pipeline and Brokkrview migrated; GPU/cache tests implemented | Cross-device verification and host performance gates; local M2 references pass |
| 16 | Demo, wrapper, GPU installation/eviction and wasm wiring implemented | Interactive watch replay, remaining wrapper groups and before/after wasm sizes |
| 17 | GPU/shader/golden/benchmark runners available | Full Loki run and recorded comparisons; local M2 references are available |
| 18 | Cards, guide, README, compliance and manual updated | Local documentation and generated manual are up to date |
| 19 | knut requirement widened in its actual checkout | Release-version cross-project matrix |
| 20–21 | Release intentionally not performed | Version changes, owner publishing, consumer registry bumps and deployment |
| 22 | knut adapter implemented and applied | Full knut workspace suite |
| 23 | Nornir adapter/layout integration implemented and applied | Full Nornir build/viz suite after missing sibling sources are supplied |
| 24 | Dwarves adapter implemented as a checked portable patch | Apply to the intended Dwarves checkout and run its full suite |
| 25–26 | Hit testing and opt-in LOD implemented | Loki acceptance/performance comparisons |
| 27–28 | Brokkr Elm/editor, gestures and inverse-command undo/redo implemented | Interactive watch replay in the intended host environment; local demo robot passes |
| 29 | Additive feature implementation present | Final Loki gates and owner-run 0.3.1 release |

The final source audit found no further missing implementation beyond these
explicit verification/release and downstream-application tasks. This is not a
claim that all 29 steps have passed their acceptance criteria.

## What has not been done, and why

| Remaining work | Reason and current limit |
| --- | --- |
| Steps 1 and 17: fresh baseline and full Loki/dwarf measurements | Not run. The documented Loki endpoint did not respond and no working Dwarf endpoint was available. The local M2 checks establish correctness, not performance parity with the specified machines. |
| Steps 20 and 29: local version bumps and release preparation | Deferred together with publishing. This was a sequencing choice, not a technical requirement: local version changes and release preparation could have been prepared independently. Neither release is prepared in full; workspace versions remain 0.2.0. |
| Steps 20 and 29: publish 0.3.0/0.3.1, update the Python release and deploy Pages | Not performed. The plan assigns publishing to the owner, and the complete release acceptance record is not established. This does not itself prevent local release preparation. |
| Step 21: consumer registry-version updates | The planned Facett releases have not been published, and not all consumer checkouts are present locally. Local consumer edits could still be prepared where source is available; the full update sweep was deferred with release preparation. |
| Full Nornir build and viz suite | Blocked before compilation by the missing holger-server-lib path; local modgunn and skade paths are also absent. The 45 narrow actual-source tests do not certify the full application. |
| Full knut suite and application of the Dwarves patch to the intended checkout | Not completed. The knut adapter has narrow-source coverage, with an earlier full-check resolver conflict documented in integrations/README.md. The Dwarves adapter exists as a checked portable patch; the intended local Dwarves checkout is absent. |
| Interactive watch replay, every wrapper group, release bundle sizes and cross-device comparisons | Not executed. Only the explicitly listed example compilation, wrapper targets and local runs were checked. There is no claimed technical blocker for all of these remaining local checks. |
| Demo with default features on ARM and optional region-connector | Separate existing dependency failures: missing ARM assembly in zstd-sys-rs and removed korp-collectors APIs respectively. Details and the passing demo configuration are recorded below. |

The reasons above distinguish observed blockers from work that was simply
deferred. Passing component tests does not close the latter tasks automatically.

## Completed local checks

These checks used Rust 1.95.0 and an Apple M2 Pro. They do not replace the plan's
Loki/dwarf measurements or its Linux release gates.

| Area | Result |
| --- | --- |
| Flow feature builds | All 24 rows: plain, wgpu, each of the ten features alone and with wgpu, all native, all wasm32 |
| Plain renderer witness | Original `flow.wgsl` is byte-identical to main; Point/Link are 16 bytes and Uniforms is 128 bytes |
| Flow correctness | Actual-workspace default suite: 13 pass; all-features suite: 30 pass, including the real GPU tests; the separate 1M acceptance test remains explicitly ignored in the ordinary run |
| Large-scene picking | Explicit ignored acceptance test passes at 1M nodes / 1.6M edges; node hit, edge hit and miss verified with scan counts reported |
| Naga | All 33 declared flow shader compositions validate |
| Native GPU | Actual M2 Pro at pixel densities 1 and 2: plain parity, boxes, rounded corners, arrows, statuses, rates, LOD, uploads, pane identity and eviction |
| Browser shader compiler | 65 valid shaders/compositions accepted, including 33 flow compositions; both intentional negative controls rejected |
| Shared layout | 9 core tests, frozen graph fixture and 10 graphview layout tests, including the 100k-node cases |
| Pipeline | Actual-workspace 65 tests pass: 44 unit, 3 accessibility determinism, 1 priority, 6 callchain, 6 flow-lane, 2 actual knut connector and 3 robot/pixel tests |
| Legacy flowsim overlay | 3 GPU pixel tests pass: live overlay changes 522 pixels, dead overlay changes 0, clock change changes 366 |
| Plandag | Actual-workspace 28 tests pass: 19 unit, 1 accessibility priority, 4 flow-lane and 4 render |
| Accessibility priority | Three 2,100-visible-node regressions pass: selected/focused late nodes remain named within the 2,000-node cap |
| Component GPU integration | All six actual-workspace tests pass on M2 Pro: three callback/cache/upload proofs and three newly captured component references, compared again without blessing within 2 levels; reference provenance is recorded beside each PNG |
| Brokkr | 31 actual-workspace tests pass, including 1,000 seeded mixed edit sequences, bounded inverse commands, exact Unicode/raw-TOML undo/redo, pointer gestures and the three actual Nornir robot tests |
| Watch example | Actual-workspace `brokkr_watch` compiles with wgpu and the real Nornir watch feature; no interactive Linux replay claimed |
| Brokkrview | Actual-workspace 18 tests pass: 7 unit, 1 priority, 2 flow-lane, 2 headless, 5 render and 1 robot; additional GPU coverage above |
| Nornir integration | 45 actual-source tests: 12 BuildTab, 4 adapter, 2 layout, 9 theme and all 18 test-boot tests, using actual Draupnir 0.2 |
| Demo FlowTab | 3 tests compiled from the actual tab source |
| Actual demo regression gates | 19 tests pass: mega matrix 5 (including all seven original palette references), navigation 5, ran-list 2, robot 2, roster 3, original demo snapshot 1, populated/expected-title library guard 1 |
| Build declaration | Actual-workspace 13 declaration tests and emission-parity test pass with no exclusions; build-variants emitted by the real declaration |
| Library lint | Strict Clippy passes for flow, pipeline, plandag, Brokkr and Brokkrview |
| Completeness / wasm wiring | Actual-workspace: 2 completeness, 3 no-shadowing, 3 feature-manifest, 5 installation and 2 feature-gate reachability tests pass |
| Documentation | README source/emission parity; manual regenerated with the actual Nornir docgen/docbook libraries, 109 sources and 436 A4 pages; cover and affected README/graph/pipeline pages visually checked |
| Actual source builds | `facett-flow --all-features` and demo library `--no-default-features --features flow-wgpu` pass; production Cargo.lock regenerated |
| Actual wasm builds | Flow all features, facet-wrapped, and facet-wrapped-group with the docs group compile for wasm32-unknown-unknown |
| Wrapper inventory | Both actual-workspace inventory checks pass |
| Benchmark scaffolding | Twelve flow_lab scenarios; required host/core fixtures compile against the actual workspace. CPU and M2 Metal diagnostics run; GPU pass timestamps unavailable and reported as null |

Plain shader SHA256:
`4621d557c133a6cd8e73569f1797cb3d7619dc1260416b5078afe7f651e8b548`.

The Chrome check used the actual shader-gate composition loader, page and report
assertions in a small harness, with macOS Metal flags and a separate temporary
profile. The adapter reported `apple / metal-3`. Chrome did not exit reliably
after reporting; the final harness terminates its own Chrome child after receiving
the complete report. No production browser-lifecycle change was introduced.
The tested shader files were compared byte-for-byte with the final workspace.

The new host benchmark reports are
`/private/tmp/facett-flow-bench-m2-cpu.json` and
`/private/tmp/facett-flow-bench-m2-gpu.json`. The GPU diagnostic encoded 20 frames
for each of synthetic SDP100, pipeline10k, plandag1k and Brokkrview500, with zero
uploads during the sample window. It did not obtain GPU timestamps, so no GPU
pass p50 or frame-rate claim is made. CPU debug layout diagnostics measured
100k/1M nodes on a regular five-layer DAG at 19.38/197.39 ms p50 across five runs;
fixture creation is excluded. These local diagnostics have no comparative
acceptance threshold and do not replace the required Dwarf/Loki baseline.

The large-scene fixture uses `Graph::demo(1_000_000)` with two isolated sentinel
nodes and their first edge relocated to make hits unambiguous. In one local debug
run, fixture generation took 470 ms and scene construction 9.34 s. A node hit
reported one candidate and 6.4 µs. An edge hit reported one candidate and 71.3 ms;
a miss reported zero candidates and 71.2 ms. Both edge queries scanned all 1.6M
edge bounds before their narrow-phase tests. Candidate counts alone therefore do
not describe total query cost. These are diagnostic single-run values, not release
performance thresholds or an optimized-build comparison. The index remains as
specified; any replacement requires the separate future-improvement decision.

## Environment and reproducibility limits

The initial Facett workspace could not discover its local sibling crates.
Component checks therefore used copies of the actual sources in an isolated workspace at
`/private/tmp/facett-flow-plan-validation`. Only validation manifests were adapted:
unavailable downstream dev dependencies and the optional Runa adapter were removed,
and the external znippy dependency used its registry version. Production manifests
retain their real dependency contracts. This is not a full-workspace build result.

The user subsequently supplied Nornir and the sibling repositories under
`/Users/andreas/code/nordisk`; Draupnir was also fetched there. Local directory
links now satisfy the manifest paths. Actual-workspace `cargo metadata --no-deps`
passes, and both wasm wiring test suites ran against that real metadata without
skips. The user supplied the actual `funnel-core` Git checkout at `30fe97c`
(version 0.1.5). Clean dependency checkouts were fast-forwarded to reviewed upstream
main: znippy-zoomies `d4cab435` and korp-collectors `96ecfc1`. Their published-version
preparation commits require osm-katana 0.3 and korp-collectors 0.2 in the demo;
relevant consumer APIs were checked before adapting those requirements.

Actual-workspace `cargo check -p facett-flow --all-features` now passes, and Cargo
has regenerated the production lockfile. The actual-workspace component, build
declaration and wiring suites above also pass. This remains a selected-suites
result, not a claim that every workspace target has been certified.
The local `tunnr` directory contains the unchanged published `tunnr-vm` 0.2.0 source,
not a Git checkout. The optional demo `region-connector` already refers to
`RegionSource`/`HttpOsmSource`, removed in both the old and new korp-collectors
revisions; that pre-existing optional feature is not certified.

The additional demo check **with default features** reaches a separate ARM build
failure in znippy-zoomies' `zstd-sys-rs`: its build script requests the nonexistent
`zstd/lib/decompress/huf_decompress_arm64.S`. The script is identical before and
after the upstream fast-forward, and the file is absent in both trees. No unrelated
compression code was changed. The passing demo check above explicitly disables
defaults and enables `flow-wgpu`; it does not certify the default region-clip
dependency on this Mac. The failure log is
`/private/tmp/facett-actual-demo-default-check.log`.

The initial broader test attempt stopped at the core's offline metadata gate
because an unrelated registry package was uncached. `cargo fetch --locked` then
completed to populate that cache; both previously blocked metadata tests now pass.
The original Inter and DejaVu Git-LFS font
objects were also restored from the repository and checked against both pointer
sizes and SHA256 digests. The eight existing demo/palette golden PNGs were restored
with the same checks against a367f9aa; none of those existing reference images was re-blessed. These are
unchanged assets; Git-LFS is not installed in
this environment, so Git may show their materialized bytes as working-tree changes.

A full Nornir check still stops at the missing sibling
`holger/server/lib/Cargo.toml` before compilation. Nornir also declares local
modgunn and skade paths absent from this machine. Its 45-source-test result above
must not be read as a complete Nornir binary build.

The documented Loki LAN endpoint `rickard@192.168.1.102` timed out during a
read-only SSH probe; bare `loki` and `dwarf` names did not resolve. The historical
Dwarf environment is described as a container, without a usable endpoint in this
session. Canonical hardware measurements remain unrun.

Build-declaration checks used the actual `facett-build-thing` source with the
actual edda `nornir-build-thing` implementation in
`/private/tmp/facett-build-proof` initially. After restoring the sibling sources,
all 13 declaration tests and emission parity passed in the actual workspace,
including the formerly excluded external-toolchain check. The emission was copied
to `.nornir/build-variants.toml`; it was not edited by hand.

The temporary paths describe this session's evidence, not durable prerequisites.
The regenerated `docs/manual.pdf` is 9,545,101 bytes with SHA256
`61bba8c7a139aadba27ae6818602b3122901af1b34e6fd5506b5da27e573fe2c`.
The exporter uses deterministic embedded fonts; some existing decorative emoji
remain missing glyphs. The changed technical content is readable and fits its pages.

The first demo ran-list attempt passed its functional work but failed to write
to its Linux-default report directory. The supported
`FACETT_RAN_LIST=/private/tmp/facett-demo-ran-list.md` setting fixed that local
environment issue; the rerun passed without source changes.

With the intended sibling workspaces present, repeat the normal repository checks:

```sh
cargo test -p facett-core --test layered
cargo test -p facett-flow --no-default-features
cargo test -p facett-flow --all-features
cargo test -p facett-flow --features hit-test --test large_scene -- --ignored --nocapture
cargo check -p facett-flow --all-features --target wasm32-unknown-unknown
cargo test -p facett-build-thing --test declared --test toml_parity
cargo test -p xtask --test wasm_bundle_has_gpu_features --test wasm_bundle_installs_the_lanes_it_selects
FACETT_REQUIRE_GPU=1 cargo test -p xtask --test wgsl_compiles_in_the_browser
```

## Still required before claiming all 29 steps complete

- Loki/dwarf baseline comparisons and the specified feature/host performance
  matrix, including 1M-node acceptance and wasm bundle sizes.
- Cross-device GPU/golden checks, interactive watch replay, remaining wrapper
  groups and release-sized bundles. All local demo gates listed above pass, as do
  the selected native, umbrella guard and wasm builds. The full default demo on
  ARM remains blocked by the pre-existing compression dependency error described
  above.
- Full downstream workspace suites with their remaining transitive source
  checkouts available. Facett lockfile resolution itself now passes.
- Release/version steps, downstream registry bumps, owner-run publishing and
  deployment. Versions remain 0.2.0 while this work is reviewed.

No new frame-time, GPU-time or memory improvement is asserted from correctness
tests. The release gates remain open until their actual measurements are recorded.