The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(core): name the crossed bound in CLI range errors
obchain360614486e09
diff --git a/crates/openhuman-core/src/core/cli.rs b/crates/openhuman-core/src/core/cli.rsindex 3e30de3888..f35f43041f 100644--- a/crates/openhuman-core/src/core/cli.rs+++ b/crates/openhuman-core/src/core/cli.rs@@ -681,12 +681,13 @@ fn parse_input_value(ty: &TypeSchema, raw: &str) -> Result<Value, String> {let n = raw.parse::<u64>().map_err(|e| format!("expected unsigned integer, got '{raw}': {e}"))?;- if (*min..=*max).contains(&n) {- Ok(Value::Number(n.into()))+ // Name the crossed limit, matching `validate_params`.+ if n > *max {+ Err(format!("expected unsigned integer <= {max}, got '{raw}'"))+ } else if n < *min {+ Err(format!("expected unsigned integer >= {min}, got '{raw}'"))} else {- Err(format!(- "expected unsigned integer in {min}..={max}, got '{raw}'"- ))+ Ok(Value::Number(n.into()))}}TypeSchema::F64 => {diff --git a/crates/openhuman-core/src/core/cli_tests.rs b/crates/openhuman-core/src/core/cli_tests.rsindex e4ecef74a5..721b1e8f5a 100644--- a/crates/openhuman-core/src/core/cli_tests.rs+++ b/crates/openhuman-core/src/core/cli_tests.rs@@ -142,10 +142,10 @@ fn parse_input_value_enforces_bounded_u64_range() {assert_eq!(parse_input_value(&ty, "10").unwrap(), serde_json::json!(10));let err = parse_input_value(&ty, "11").expect_err("above max should fail");- assert_eq!(err, "expected unsigned integer in 1..=10, got '11'");+ assert_eq!(err, "expected unsigned integer <= 10, got '11'");let err = parse_input_value(&ty, "0").expect_err("below min should fail");- assert_eq!(err, "expected unsigned integer in 1..=10, got '0'");+ assert_eq!(err, "expected unsigned integer >= 1, got '0'");let err = parse_input_value(&ty, "-3").expect_err("negative should fail");assert!(