From 38111dcf00b34481107dd540eecbfcee1e6a104e Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 17:34:51 -0500 Subject: [PATCH 1/4] op_report_line: chip call count after backend= so the frozen v5 -OPR row parses again (sc#384, sc#405 regression) The OPEN-MODEL-QWEN3 v5 row -OPR (frozen, reused by v6 and v7) parses the daemon's OP_REPORT line as ... reference_runs=[..] backend=. sc#405 inserted gpu_executions= before backend=, so every v7 dry launch (2026-10-11 attempt 2) failed that product row with all ops native and zero fallbacks. The count now follows backend=; the JSON record (ops.gpu_executions) that the E2E verifier reads is unchanged. Regression test added. Co-Authored-By: Claude Fable 5.1 --- crates/aien-runtime/src/generation.rs | 15 +++++++--- .../aien-runtime/tests/ops_evidence_test.rs | 28 ++++++++++++++++++- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/crates/aien-runtime/src/generation.rs b/crates/aien-runtime/src/generation.rs index db09e2fa..d841456c 100644 --- a/crates/aien-runtime/src/generation.rs +++ b/crates/aien-runtime/src/generation.rs @@ -118,12 +118,19 @@ fn with_ops(record: &mut Value, o: Option<&aien_abi_core::OpEvidence>) { } /// The line the daemon logs at the end of every model call (sc#337): the -/// backend's `OP_REPORT ...` line with ` backend=` appended (and, before -/// it, ` gpu_executions=` when the backend counts chip calls, sc#402). None -/// when the backend does not account its ops. +/// backend's `OP_REPORT ...` line with ` backend=` appended and, after it, +/// ` gpu_executions=` when the backend counts chip calls (sc#402). None when +/// the backend does not account its ops. +/// +/// Layout contract (sc#384, 2026-10-11): the frozen OPEN-MODEL-QWEN3 v5 row +/// `-OPR` parses `OP_REPORT native=[..] reference=[..] native_fallbacks=[..] +/// reference_runs=[..] backend=` to the end of the line; any new field +/// goes AFTER `backend=`, never between the bracketed fields and `backend=`. +/// Putting `gpu_executions` before `backend=` (sc#405) made every v7 dry +/// launch fail that row. pub fn op_report_line(o: Option<&aien_abi_core::OpEvidence>) -> Option { o.map(|o| match o.gpu_executions { - Some(n) => format!("{} gpu_executions={n} backend={}", o.report, o.backend), + Some(n) => format!("{} backend={} gpu_executions={n}", o.report, o.backend), None => format!("{} backend={}", o.report, o.backend), }) } diff --git a/crates/aien-runtime/tests/ops_evidence_test.rs b/crates/aien-runtime/tests/ops_evidence_test.rs index f0aa24ae..42a9b182 100644 --- a/crates/aien-runtime/tests/ops_evidence_test.rs +++ b/crates/aien-runtime/tests/ops_evidence_test.rs @@ -1,3 +1,8 @@ + // The v5 regex reads the four bracketed fields and then ` backend=` directly; + // the same check without a regex dependency: the bracketed prefix is intact + // and ` backend=` follows `reference_runs=[]` immediately. + assert!(line.starts_with("OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[] backend=OmegaGb10"), "{line}"); + assert!(!line[..line.find(" backend=").unwrap()].contains("gpu_executions"), "{line}"); //! sc#337: "no silent fallback" must be shown by what a run keeps, not by the //! absence of a crash. The real submission path the daemon uses //! (`submit_work` -> scheduler -> `NativeTransformerBackend::execute_step`) @@ -303,7 +308,7 @@ async fn chip_calls_are_reported_and_absent_without_a_chip() { let line = aien_runtime::generation::op_report_line(Some(&ops)).unwrap(); assert!( line.ends_with(&format!( - " gpu_executions={counted} backend=forced-fallback" + " backend=forced-fallback gpu_executions={counted}" )), "{line}" ); @@ -355,3 +360,24 @@ fn record_carries_gpu_executions_only_when_counted() { assert_eq!(rec["ops"]["gpu_executions"], serde_json::json!(156)); assert_eq!(rec["ops"]["scope"], serde_json::json!("process")); } + +/// sc#384 (2026-10-11): the frozen OPEN-MODEL-QWEN3 v5 row `-OPR` parses the +/// daemon's OP_REPORT line as `... reference_runs=[..] backend=`. The chip +/// call count (sc#402) must come after `backend=`, or every qualification launch +/// fails that product row (v7 dry attempt 2 did). +#[test] +fn op_report_line_keeps_backend_right_after_reference_runs() { + let mut ops = aien_abi_core::OpEvidence::default(); + ops.report = "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[]".into(); + ops.backend = "OmegaGb10Backend (native Omega engine)".into(); + ops.gpu_executions = Some(7); + let line = aien_runtime::generation::op_report_line(Some(&ops)).unwrap(); + let v5 = regex_lite::Regex::new( + r"^OP_REPORT native=\[([^\]]*)\] reference=\[([^\]]*)\] native_fallbacks=\[([^\]]*)\] reference_runs=\[([^\]]*)\] backend=(.*)$", + ) + .unwrap(); + let caps = v5.captures(&line).unwrap_or_else(|| panic!("v5 -OPR regex must match: {line}")); + assert_eq!(&caps[3], "", "{line}"); + assert!(caps[5].contains("OmegaGb10"), "{line}"); + assert!(line.ends_with(" gpu_executions=7"), "{line}"); +} From c667a1d26186f1671097e28dd3f5e9aa34cfc5b0 Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 17:47:55 -0500 Subject: [PATCH 2/4] ops_evidence_test: restore header, add the backend-order test cleanly; crumb compile The previous commit's line-number insertion put the new test's tail above the file's inner doc comments (E0753 in CI). File restored from main, the ends_with assertion updated, the new test appended whole; cargo fmt; crumb compiled. Co-Authored-By: Claude Fable 5.1 --- .../aien-runtime/tests/ops_evidence_test.rs | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/crates/aien-runtime/tests/ops_evidence_test.rs b/crates/aien-runtime/tests/ops_evidence_test.rs index 42a9b182..13fb6b0d 100644 --- a/crates/aien-runtime/tests/ops_evidence_test.rs +++ b/crates/aien-runtime/tests/ops_evidence_test.rs @@ -1,8 +1,3 @@ - // The v5 regex reads the four bracketed fields and then ` backend=` directly; - // the same check without a regex dependency: the bracketed prefix is intact - // and ` backend=` follows `reference_runs=[]` immediately. - assert!(line.starts_with("OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[] backend=OmegaGb10"), "{line}"); - assert!(!line[..line.find(" backend=").unwrap()].contains("gpu_executions"), "{line}"); //! sc#337: "no silent fallback" must be shown by what a run keeps, not by the //! absence of a crash. The real submission path the daemon uses //! (`submit_work` -> scheduler -> `NativeTransformerBackend::execute_step`) @@ -368,16 +363,23 @@ fn record_carries_gpu_executions_only_when_counted() { #[test] fn op_report_line_keeps_backend_right_after_reference_runs() { let mut ops = aien_abi_core::OpEvidence::default(); - ops.report = "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[]".into(); + ops.report = + "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[]".into(); ops.backend = "OmegaGb10Backend (native Omega engine)".into(); ops.gpu_executions = Some(7); let line = aien_runtime::generation::op_report_line(Some(&ops)).unwrap(); - let v5 = regex_lite::Regex::new( - r"^OP_REPORT native=\[([^\]]*)\] reference=\[([^\]]*)\] native_fallbacks=\[([^\]]*)\] reference_runs=\[([^\]]*)\] backend=(.*)$", - ) - .unwrap(); - let caps = v5.captures(&line).unwrap_or_else(|| panic!("v5 -OPR regex must match: {line}")); - assert_eq!(&caps[3], "", "{line}"); - assert!(caps[5].contains("OmegaGb10"), "{line}"); + // The v5 regex reads the four bracketed fields and then ` backend=` directly; + // the same check without a regex dependency: the bracketed prefix is intact + // and ` backend=` follows `reference_runs=[]` immediately. + assert!( + line.starts_with( + "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[] backend=OmegaGb10" + ), + "{line}" + ); + assert!( + !line[..line.find(" backend=").unwrap()].contains("gpu_executions"), + "{line}" + ); assert!(line.ends_with(" gpu_executions=7"), "{line}"); } From 1f50b106c8b6fb6e2805cf7c8235eac9143cc8d4 Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 18:07:32 -0500 Subject: [PATCH 3/4] ops_evidence_test: build the sample OpEvidence with struct init (clippy field-reassign-with-default) Co-Authored-By: Claude Fable 5.1 --- crates/aien-runtime/tests/ops_evidence_test.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/aien-runtime/tests/ops_evidence_test.rs b/crates/aien-runtime/tests/ops_evidence_test.rs index 13fb6b0d..479229b0 100644 --- a/crates/aien-runtime/tests/ops_evidence_test.rs +++ b/crates/aien-runtime/tests/ops_evidence_test.rs @@ -362,11 +362,13 @@ fn record_carries_gpu_executions_only_when_counted() { /// fails that product row (v7 dry attempt 2 did). #[test] fn op_report_line_keeps_backend_right_after_reference_runs() { - let mut ops = aien_abi_core::OpEvidence::default(); - ops.report = - "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[]".into(); - ops.backend = "OmegaGb10Backend (native Omega engine)".into(); - ops.gpu_executions = Some(7); + let ops = aien_abi_core::OpEvidence { + report: "OP_REPORT native=[matmul_vec] reference=[] native_fallbacks=[] reference_runs=[]" + .into(), + backend: "OmegaGb10Backend (native Omega engine)".into(), + gpu_executions: Some(7), + ..Default::default() + }; let line = aien_runtime::generation::op_report_line(Some(&ops)).unwrap(); // The v5 regex reads the four bracketed fields and then ` backend=` directly; // the same check without a regex dependency: the bracketed prefix is intact From 390b5effcff2d8ae9f0543320e6638f4a9a5a39b Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 18:18:23 -0500 Subject: [PATCH 4/4] crumb compile (after rebase onto main) Co-authored-by: Drake Stapleton Co-Authored-By: Claude Fable 5.1 --- .crumb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.crumb b/.crumb index ee0d962b..76c9e019 100644 --- a/.crumb +++ b/.crumb @@ -119,14 +119,14 @@ } ], "children_root": "sha256:a99206c1ace0afb823facb1b5490dc9130965e4d4b57a95e83977aa4a4862be0", - "compiled_at": "2026-10-11T23:06:33Z", + "compiled_at": "2026-10-11T23:18:22Z", "compiler": "crumb-compile/1", - "digest": "sha256:0ef361d4600c99eb3b637ba4859cca77a89536108464a7e3ae2e95b4870a29d7", + "digest": "sha256:f68eef0417b21099372feee7824eb2f6e63f20f64d8886fd9587458c6053423e", "evidence_files": 187, "evidence_root": "sha256:27ee0353cb4d4aae2b7dbce2bfe0d9f4ef2a94cd7a4555b84684d59372503280", "files": 3872, - "generated_at_commit": "44b4049765bf3b8309ffdf7a05b7ea7d130c0aeb", - "source_tree": "sha256:ca1ba04351ef0474dad572ea2abcca88cc06c717a5bba5f6e6730983cb7fc7c3" + "generated_at_commit": "1f50b106c8b6fb6e2805cf7c8235eac9143cc8d4", + "source_tree": "sha256:26eda304711c9c5efbed2f664fa81dd8305c0b5e85f3a8d744cfd543c0ae3a83" } }, "history": [],