//! The L3 stage grades a fabric-priced figure by its weakest input: with no //! calibration row, the member that ran is priced by its seeded figure, an //! assumed power over a throughput, which no host calibrated, so the receipt //! says Estimator, never ModelBased. //! Its own test process, because the fabric is discovered once per process. mod common; use joule_code_receipt::Provenance; use jouleclaw_fabric::EnergyProvenance; #[test] fn a_call_priced_by_seeded_figures_is_an_estimate() { let (energy, window) = common::resolve_seeded(); eprintln!("window: {window:?}\nenergy: {energy:?}"); let neon = window.iter().find(|e| e.member_id == "local/cpu-neon").expect("the m=1 matmul ran on cpu-neon"); assert_eq!(neon.projected_grade, Some(EnergyProvenance::Estimated), "a seeded figure is an estimate"); assert!(neon.projected_uj.is_some_and(|uj| uj > 0.0), "the seeded figure priced the matmul: {neon:?}"); assert_eq!((energy.provenance, energy.measured_uj), (Provenance::Estimator, None), "{energy:?}"); assert!(energy.check_provenance().is_ok()); }