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

nordisk/edda

crates/nornir-saga/.nornir/saga-idiot-guide.md

Saga — idiot guide (copy-paste)

Record user navigation so nornir robotizes it. Full guide: saga-guide.md.

# Cargo.toml — capture build only (off = compiles to nothing)
nornir-saga = { version = "0.1", features = ["saga"] }
use nornir_saga::{record, SagaEvent, SessionCtx};

// once per session — git_sha is a plain &str you pass (not an env var); use "unknown" if untracked
let ctx = SessionCtx::new(&session_id, &user, "njord", env!("CARGO_PKG_VERSION"), git_sha);

// on every route/view change (egui: nav boundary · web: Leptos router):
record(SagaEvent::nav(route, component, action, &state_json).in_session(&ctx));

// on a click / activation:
record(SagaEvent::click(route, component, action, &state_json).in_session(&ctx));

// on a failure (server Axum middleware + client):
record(SagaEvent::error(component, &msg).in_session(&ctx));

// flush on a cadence → nornir warehouse `saga_events` (SagaSink::write):
sink.write(&nornir_saga::drain_saga_events())?;

Rules: state_json small + no PII. nav on every view change. Then nornir replays the session → standing robot test (egui = kittest, web app = WebDriver). Red replay = the broken step.