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

nordisk/nornir

.nornir/test-history.md

test_history MCP tool + release test-drive gate

Plan #5. Two additions, both built additively (no proto change) so they merge cleanly alongside concurrent proto/viz work:

  1. a test_history MCP tool — read a repo's per-run test summaries; and
  2. a release test-DRIVE gate — a release actually runs the repo's test matrix and fails on red / regression.

Companion of bench_history (the exact template) and the existing test_results / build-free test_inventory machinery (.nornir/test-matrix.md, .nornir/test-matrix-always-visible.md).

1. test_history MCP tool

mcp__nornir__test_history — src/bin/nornir-mcp.rs : NornirMcp::test_history.

Input: { repo : string, limit? : usize }. Output: a JSON array of per-run summaries, newest-first — the SAME per-run rollup nornir test history <repo> prints, one object per run:

[ { "run_id", "repo", "ts_micros",
    "passed", "failed", "ignored", "stalled", "skipped", "listed",
    "total", "green" }, … ]

green and total are folded in by the canonical serializer so an agent never recomputes them.

Two modes (embedded XOR client), mirroring bench_history

The scope+summarize+limit logic is pure and shared (test_history_summaries + summarize_runs + runs_to_json), so the two modes return byte-identical JSON (proven in tests).

Canonical serialization

nornir_testmatrix::model::runs_to_json (re-exported as nornir::warehouse::test_results::runs_to_json) renders a &[RunSummary] newest-first with the derived green/total flags. RunSummary gained Serialize/Deserialize for the RPC round-trip.

2. Release test-DRIVE gate (plan #5b)

A release must EXERCISE + check its tests, not just read old results.

Wired into release_gate_all (the MCP embedded path + the server Ops.GateAll handler) behind the per-repo [gates].tests = true toggle. HEAVY — it compiles

Tests (inject-assert)

CLI ⇄ MCP ⇄ viz parity