tangle


git clone https://radroots.dev/git/tangle.git
Log | Files | Refs | README | LICENSE

commit b52b9560ed4849fe3ef2f91f2080b32a0b69f4df
parent a548515e28abc1b5816204ddaea79e37a491958b
Author: triesap <tyson@radroots.org>
Date:   Sun, 14 Jun 2026 19:37:53 -0700

bench: prove benchmark profile gates

Diffstat:
Mcrates/tangle_bench/src/bin/tangle_benchmark_report.rs | 25++++++++++++++++---------
Mcrates/tangle_bench/src/lib.rs | 27++++++++++++++++++++++++---
2 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/crates/tangle_bench/src/bin/tangle_benchmark_report.rs b/crates/tangle_bench/src/bin/tangle_benchmark_report.rs @@ -338,15 +338,22 @@ mod tests { #[test] fn benchmark_report_args_require_hardware_evidence_for_proof_profiles() { - let error = BenchmarkReportArgs::parse([ - "--profile".to_owned(), - "proof-10m".to_owned(), - "--run-id".to_owned(), - "unit".to_owned(), - ]) - .expect_err("proof profile requires evidence"); - - assert!(error.contains("target hardware evidence is required")); + for profile in [ + "proof-10m", + "proof-large-group", + "proof-join-storm", + "proof-slow-client", + ] { + let error = BenchmarkReportArgs::parse([ + "--profile".to_owned(), + profile.to_owned(), + "--run-id".to_owned(), + "unit".to_owned(), + ]) + .expect_err("proof profile requires evidence"); + + assert!(error.contains("target hardware evidence is required")); + } } #[test] diff --git a/crates/tangle_bench/src/lib.rs b/crates/tangle_bench/src/lib.rs @@ -2052,6 +2052,20 @@ mod tests { } #[test] + fn local_smoke_profiles_run_without_hardware_evidence() { + for profile in [BenchmarkProfile::smoke(), BenchmarkProfile::large_smoke()] { + assert!(!profile.requires_target_hardware_evidence()); + let report = BenchmarkRunReport::run(profile).expect("local profile report"); + assert!( + report + .validation_summary() + .values() + .all(|status| status == "pass") + ); + } + } + + #[test] fn protocol_conversion_for_supported_profile_sizes_is_bounded() { let dataset = BenchDataset::generate(BenchDatasetConfig::new(4, 3, 3, 4, 3)).expect("dataset"); @@ -2246,10 +2260,17 @@ mod tests { #[test] fn proof_profile_runs_fail_closed_without_hardware_evidence() { - let error = BenchmarkRunReport::run(BenchmarkProfile::proof_10m()) - .expect_err("proof profile requires evidence"); + for profile in [ + BenchmarkProfile::proof_10m(), + BenchmarkProfile::proof_large_group(), + BenchmarkProfile::proof_join_storm(), + BenchmarkProfile::proof_slow_client(), + ] { + let error = + BenchmarkRunReport::run(profile).expect_err("proof profile requires evidence"); - assert!(error.contains("target hardware evidence is required")); + assert!(error.contains("target hardware evidence is required")); + } } #[test]