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

nordisk/nornir

.nornir/viz-functional-matrix.md

viz functional-status matrix — one matrix ROW per viz surface

LAW it serves (#1 recurring failure): green matrix ⟺ every viz surface actually works. Authored by the viz-testmatrix agent 2026-06-22.

The gap it closes

The repo already had a deep inject-assert suite over the viz — viz_matrix.rs (70 fns), viz_surface.rs, viz_md_matrix.rs (tab × mode × data), viz_workspace_matrix.rs (the workspace axis), and the per-pane viz_*_pane.rs files. They all assert real state_json data (LAW #1) — but almost none of them emit a functional_status matrix row. So the surfaces were proven in CI yet the warehouse test_results matrix carried no per-viz-surface row: a reader of nornir test / test_history / the 🧪 Test pane could not see "Knowledge pane: green, Search pane: green, …, all 20 tabs + chrome: green."

tests/viz_functional_matrix.rs closes that: it enumerates the FULL viz surface and, for each item, in BOTH modes over a seeded warehouse, asserts a real-data predicate AND emits one nornir_testmatrix::functional_status row (the assert_emit! doctrine: the assert! is the gate, the emit is the matrix observation). A broken / blank / unwired surface ⇒ a RED row, automatically.

The enumerated surface (the checklist)

The surface list is the SURFACES table — one row per (surface_id, tab, real-data predicate). It covers every Tab::ALL tab plus the app-chrome panes:

group surface ids
chrome top_bar_tab_strip · palette_active_in_set · workspace_picker_selected · about_identity · action_log_trail · screenshot_state · preflight_checks · workspace_freshness
🧬 Nornir nornir_root_buttons · nornir_dashboard_present · nornir_close_guard
data tabs timeline_releases · dep_graph_layout · callgraph_slice · architecture_board · architecture_metro · funnel_plans · timetravel_cursor · live_run_events · release_rows · release_buttons · knowledge_slice · warehouse_tables · mcp_usage · search_form · gates_report · bench_live · test_grid · test_buttons · leaderboard_board · security_repos · holger_pane · manual_viewer

Each predicate reads the FULL app state_json slice and returns (ok, detail) where detail is a measured number (a count / flag / field) so the matrix row carries real data, never "didn't panic".

The four oracles

  1. fat_surface_emits_green_row_per_item — LOCAL/fat over a seeded warehouse: every surface predicate holds + emits a green row; then two completeness checks — (A) every Tab::ALL debug-name (read from the live state_json["all_tabs"], the canonical enumerator) is touched by ≥1 surface row; (B) every surface_id appears in the drained functional buffer, ok=true.
  2. thin_data_surface_emits_green_row_per_item — REMOTE/thin against an ephemeral nornir-server: the data-tab subset (the remote=true rows) over the live RPCs, same assert+emit+drained-coverage.
  3. surface_slices_carry_no_unwired_sentinel — sentinel-ban: no rendered slice carries todo/not wired/not yet/coming soon (an unwired stub shipping green); emits the verdict row.
  4. predicates_go_red_on_empty_or_errored_slices — SENSITIVITY (the oracle must be able to go RED): the data predicates that REQUIRE warehouse data are driven against an EMPTY warehouse and must return false — the git-stash-equivalent baked into the matrix. Without this, a blind predicate that passes on a blank pane would ship green.

Companion per-pane emits

A handful of the richest pure-assert per-pane tests gained a tail #[cfg(feature="testmatrix")] functional_status(...) so their verdict ALSO lands a row under the functional aspect: viz/leaderboard, viz/knowledge, viz/bench, viz/test-coverage.

Run

cargo test --features "viz,server,testmatrix" --test viz_functional_matrix \
  -- --test-threads=1 --nocapture

The warehouse terminus (merge-time last mile)

functional_status rows emit to the in-process buffer + (cross-process) the NORNIR_TESTMATRIX_OUT JSONL. The HOME is the Iceberg warehouse: a nornir test run nornir with NORNIR_TEST_FEATURES=testmatrix,viz,server compiles + runs these #[test]s with the feature lit and reconciles every row into test_results, read back through the lock-owning server (the 🧪 Test pane / test_history). Because the running server uses the installed binary, not a worktree, landing these rows in the LIVE warehouse is a post-merge step (merge → reinstall server → nornir test all), exactly as the agent-ui-test-fixing.md "the wire is not the home" section prescribes.