From e2efac45b007750da76419146fa081381a6627f9 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Mon, 12 Oct 2026 19:22:32 -0500 Subject: [PATCH] aienos-explain: refresh rsi_kv_cycle fixture and pin after spark-rsi M1 Copies the re-blessed fixture from spark-rsi main (27525239, PR #44) and updates the sha256 pin to 7e9f1c1e09210fb3158cd001ecb6207d4d5c3fbd30996448c35c61dc900fc07d. Crumbs recompiled with the tool pinned in crumb.lock. Closes #337 Co-Authored-By: Claude Opus 5.5 --- .crumb | 18 +-- crates/.crumb | 8 +- .../tests/fixtures/rsi_kv_cycle.evidence.json | 153 ++++++++++-------- crates/aienos-explain/tests/rsi_and_cli.rs | 2 +- 4 files changed, 98 insertions(+), 83 deletions(-) diff --git a/.crumb b/.crumb index f8510256..760969e9 100644 --- a/.crumb +++ b/.crumb @@ -21,39 +21,39 @@ "generated": { "children": [ { - "digest": "41b89f0a1167d3e92c235d3cdd0f7d5fe2a38b75d737a67c54edf6c10d1cabfb", + "digest": "57ede5c58a883dfec8c7848c2aaaa559fa3c8b38c2a7ecc4db26828e0cbc3e12", "last_commit": "bf70027", "name": "crates", "purpose": "Directory crates. Purpose not yet described by a human." }, { "digest": "ff4b451c83c055a494d6598f83241ead8cc7bd43626e37cbadf4bf65ace5b74c", - "last_commit": "fe21660", + "last_commit": "2cdd37f", "name": "docs", "purpose": "Directory docs. Purpose not yet described by a human." }, { "digest": "51c89e915314b1fea02b9fcb80f143c3146a4b52d71e090d0575ba89c996b0c1", - "last_commit": "04e39e7", + "last_commit": "2cdd37f", "name": "native", "purpose": "Directory native. Purpose not yet described by a human." }, { "digest": "8911239203abaca6f5315fecaa93bea68b0b425436b711cce44efeccdf221bdb", - "last_commit": "04e39e7", + "last_commit": "2cdd37f", "name": "scripts", "purpose": "Directory scripts. Purpose not yet described by a human." } ], - "children_root": "sha256:a6bcb849b01c4c333bfdd51007f1162ee7111bbe6748ee32b20f4c94e56a8d5d", - "compiled_at": "2026-10-12T20:56:51Z", + "children_root": "sha256:8ebf3d0c9cced3ed3855fceac4129f30b8431ad8251319ece42d02f460978f89", + "compiled_at": "2026-10-13T00:22:25Z", "compiler": "crumb-compile/1", - "digest": "sha256:23d2ddcc47b08a59140989b78ab32c86597436b8c497d233ac08c1ecf10ae23d", + "digest": "sha256:5b9db016bc8b481e88d2d26cd5de24fc773ae562e43778ec988a886786bc5ac1", "evidence_files": 156, "evidence_root": "sha256:cd53ab119be9de6ce28c4f5949b106c9622f1fe105611de3de21c3bce7932694", "files": 3117, - "generated_at_commit": "04e39e7223149deef6c14e4175d40e80c63eee0a", - "source_tree": "sha256:55fabf3b3fb0b386f168198e9fa7d26c1b5d9d17ad41856e76dec00ccc49778f" + "generated_at_commit": "2cdd37fb844fa0f1cb91fa4e6ad7272f1fac547a", + "source_tree": "sha256:9e08afb48d800441a508ccd930952fef557b882f6e24d94f9d870cbe20546a5e" }, "owner_lane": "", "provenance": { diff --git a/crates/.crumb b/crates/.crumb index b5afab3c..1bec4222 100644 --- a/crates/.crumb +++ b/crates/.crumb @@ -150,14 +150,14 @@ } ], "children_root": "sha256:006b47340025796d925d29b5143f8c38760bb782916323e4d9070a8e408f7033", - "compiled_at": "2026-10-12T07:35:53Z", + "compiled_at": "2026-10-13T00:22:25Z", "compiler": "crumb-compile/1", - "digest": "sha256:41b89f0a1167d3e92c235d3cdd0f7d5fe2a38b75d737a67c54edf6c10d1cabfb", + "digest": "sha256:57ede5c58a883dfec8c7848c2aaaa559fa3c8b38c2a7ecc4db26828e0cbc3e12", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 232, - "generated_at_commit": "7c4b4aed25851e2c0a607c31df1ad03671bcd20f", - "source_tree": "sha256:019c27651afd04413bbf69dfd1693ea991451228d81359f46d11c0155c36be99" + "generated_at_commit": "2cdd37fb844fa0f1cb91fa4e6ad7272f1fac547a", + "source_tree": "sha256:06051e954b27527045cd404898e49e0ad95647e61e7eee2ee3d2ed99758532fb" }, "owner_lane": "", "provenance": { diff --git a/crates/aienos-explain/tests/fixtures/rsi_kv_cycle.evidence.json b/crates/aienos-explain/tests/fixtures/rsi_kv_cycle.evidence.json index 842cd550..e2321535 100644 --- a/crates/aienos-explain/tests/fixtures/rsi_kv_cycle.evidence.json +++ b/crates/aienos-explain/tests/fixtures/rsi_kv_cycle.evidence.json @@ -6,8 +6,8 @@ { "id": "rsi:capability:kv_allocator", "kind": 2, - "status": 0, - "statement": "'Unified LPDDR5x KV Allocator' (memory) has p95 latency 4200.0 us, error rate 8.00%, resident memory 32768 KiB", + "status": 1, + "statement": "'Unified LPDDR5x KV Allocator' (memory) has measured median latency 4200.0 us over 20 samples", "source": { "system": "spark-rsi", "artifact": "CapabilityNode", @@ -16,31 +16,34 @@ "parents": [], "measurements": [ { - "name": "latency_p95_us", + "name": "latency_median_us", "value": "4200.000", "unit": "us" }, { - "name": "error_rate", + "name": "sample_count", + "value": "20", + "unit": "" + }, + { + "name": "error_rate_measured", "value": "0.080000", "unit": "fraction" }, { - "name": "memory_rss_kb", - "value": "32768", - "unit": "KiB" + "name": "latency_p95_us_measured", + "value": "5100.000", + "unit": "us" } ], "missing": [], - "notes": [ - "metric values for 'Unified LPDDR5x KV Allocator' were declared in the capability graph, not measured" - ] + "notes": [] }, { "id": "rsi:capability:mojo_kernel", "kind": 2, - "status": 0, - "statement": "'Mojo Blackwell GEMM Kernel' (compute) has p95 latency 1800.0 us, error rate 1.00%, resident memory 16384 KiB", + "status": 1, + "statement": "'Mojo Blackwell GEMM Kernel' (compute) has measured median latency 1800.0 us over 5 samples", "source": { "system": "spark-rsi", "artifact": "CapabilityNode", @@ -49,31 +52,34 @@ "parents": [], "measurements": [ { - "name": "latency_p95_us", + "name": "latency_median_us", "value": "1800.000", "unit": "us" }, { - "name": "error_rate", + "name": "sample_count", + "value": "5", + "unit": "" + }, + { + "name": "error_rate_measured", "value": "0.010000", "unit": "fraction" - }, + } + ], + "missing": [ { - "name": "memory_rss_kb", - "value": "16384", - "unit": "KiB" + "expected": "measured p95 latency of stage 'Mojo Blackwell GEMM Kernel'", + "reason": "p95 is unavailable: too few valid compatible samples" } ], - "missing": [], - "notes": [ - "metric values for 'Mojo Blackwell GEMM Kernel' were declared in the capability graph, not measured" - ] + "notes": [] }, { "id": "rsi:capability:req_gateway", "kind": 2, - "status": 0, - "statement": "'Request Gateway' (network) has p95 latency 120.0 us, error rate 0.00%, resident memory 1024 KiB", + "status": 1, + "statement": "'Request Gateway' (network) has measured median latency 120.0 us over 5 samples", "source": { "system": "spark-rsi", "artifact": "CapabilityNode", @@ -82,31 +88,34 @@ "parents": [], "measurements": [ { - "name": "latency_p95_us", + "name": "latency_median_us", "value": "120.000", "unit": "us" }, { - "name": "error_rate", + "name": "sample_count", + "value": "5", + "unit": "" + }, + { + "name": "error_rate_measured", "value": "0.000000", "unit": "fraction" - }, + } + ], + "missing": [ { - "name": "memory_rss_kb", - "value": "1024", - "unit": "KiB" + "expected": "measured p95 latency of stage 'Request Gateway'", + "reason": "p95 is unavailable: too few valid compatible samples" } ], - "missing": [], - "notes": [ - "metric values for 'Request Gateway' were declared in the capability graph, not measured" - ] + "notes": [] }, { "id": "rsi:capability:sampler", "kind": 2, - "status": 0, - "statement": "'Greedy Token Sampler' (inference) has p95 latency 150.0 us, error rate 0.00%, resident memory 1024 KiB", + "status": 1, + "statement": "'Greedy Token Sampler' (inference) has measured median latency 150.0 us over 5 samples", "source": { "system": "spark-rsi", "artifact": "CapabilityNode", @@ -115,31 +124,34 @@ "parents": [], "measurements": [ { - "name": "latency_p95_us", + "name": "latency_median_us", "value": "150.000", "unit": "us" }, { - "name": "error_rate", + "name": "sample_count", + "value": "5", + "unit": "" + }, + { + "name": "error_rate_measured", "value": "0.000000", "unit": "fraction" - }, + } + ], + "missing": [ { - "name": "memory_rss_kb", - "value": "1024", - "unit": "KiB" + "expected": "measured p95 latency of stage 'Greedy Token Sampler'", + "reason": "p95 is unavailable: too few valid compatible samples" } ], - "missing": [], - "notes": [ - "metric values for 'Greedy Token Sampler' were declared in the capability graph, not measured" - ] + "notes": [] }, { "id": "rsi:capability:scheduler", "kind": 2, - "status": 0, - "statement": "'Batch Scheduler' (scheduling) has p95 latency 340.0 us, error rate 0.00%, resident memory 2048 KiB", + "status": 1, + "statement": "'Batch Scheduler' (scheduling) has measured median latency 340.0 us over 5 samples", "source": { "system": "spark-rsi", "artifact": "CapabilityNode", @@ -148,31 +160,34 @@ "parents": [], "measurements": [ { - "name": "latency_p95_us", + "name": "latency_median_us", "value": "340.000", "unit": "us" }, { - "name": "error_rate", + "name": "sample_count", + "value": "5", + "unit": "" + }, + { + "name": "error_rate_measured", "value": "0.000000", "unit": "fraction" - }, + } + ], + "missing": [ { - "name": "memory_rss_kb", - "value": "2048", - "unit": "KiB" + "expected": "measured p95 latency of stage 'Batch Scheduler'", + "reason": "p95 is unavailable: too few valid compatible samples" } ], - "missing": [], - "notes": [ - "metric values for 'Batch Scheduler' were declared in the capability graph, not measured" - ] + "notes": [] }, { "id": "rsi:bottleneck:cycle-kv-0001", "kind": 3, "status": 3, - "statement": "The capability graph ranks 'Unified LPDDR5x KV Allocator' (memory) as bottleneck #1 of 5 (Centrality=0.333, LatencyRatio=3.18x, ErrorRate=8.0%)", + "statement": "The capability graph ranks 'Unified LPDDR5x KV Allocator' (memory) as bottleneck #1 of 5 (Centrality=0.333, LatencyRatio=3.18x (median), ErrorRate=8.0%)", "source": { "system": "spark-rsi", "artifact": "BottleneckRank", @@ -212,14 +227,14 @@ "unit": "" }, { - "name": "latency_p95_us", - "value": "4200.000", - "unit": "us" + "name": "ranking_basis", + "value": "measured", + "unit": "" }, { - "name": "error_rate", - "value": "0.080000", - "unit": "fraction" + "name": "latency_median_us", + "value": "4200.000", + "unit": "us" } ], "missing": [], @@ -309,7 +324,7 @@ "id": "rsi:hypothesis:hypo-kv-0001", "kind": 5, "status": 4, - "statement": "Suspected root cause: High latency on 'Unified LPDDR5x KV Allocator': Centrality=0.333, LatencyRatio=3.18x, ErrorRate=8.0%. Observed problem: System throughput limited by bottleneck node 'Unified LPDDR5x KV Allocator' (centrality=0.3333)", + "statement": "Suspected root cause: High latency on 'Unified LPDDR5x KV Allocator': Centrality=0.333, LatencyRatio=3.18x (median), ErrorRate=8.0%. Observed problem: System throughput limited by bottleneck node 'Unified LPDDR5x KV Allocator' (centrality=0.3333)", "source": { "system": "spark-rsi", "artifact": "HypothesisContract", @@ -336,7 +351,7 @@ "id": "rsi:hypothesis:hypo-kv-0001:prediction", "kind": 6, "status": 4, - "statement": "Predicts latency_us improves by 15.0% from baseline 4200.000", + "statement": "Predicts latency_median_us improves by 5.0% from baseline 4200.000", "source": { "system": "spark-rsi", "artifact": "HypothesisContract", @@ -351,7 +366,7 @@ "measurements": [ { "name": "target_metric", - "value": "latency_us", + "value": "latency_median_us", "unit": "" }, { @@ -361,7 +376,7 @@ }, { "name": "predicted_delta_pct", - "value": "15.000", + "value": "5.000", "unit": "%" } ], diff --git a/crates/aienos-explain/tests/rsi_and_cli.rs b/crates/aienos-explain/tests/rsi_and_cli.rs index 28fbbba2..598028e4 100644 --- a/crates/aienos-explain/tests/rsi_and_cli.rs +++ b/crates/aienos-explain/tests/rsi_and_cli.rs @@ -11,7 +11,7 @@ use aienos_explain::{build_bundle, render, ExplanationRequest, Limits, Mode}; use std::process::Command; const FIXTURE: &[u8] = include_bytes!("fixtures/rsi_kv_cycle.evidence.json"); -const FIXTURE_SHA256: &str = "0c04376ca36d95d677942d7e97c0a3eef3728ef72dc3cdf070494174e6a6cc31"; +const FIXTURE_SHA256: &str = "7e9f1c1e09210fb3158cd001ecb6207d4d5c3fbd30996448c35c61dc900fc07d"; const TARGET: &str = "rsi:conclusion:cycle-kv-0001"; fn hexs(b: &[u8]) -> String {