What I observed
For a long explicit benchmark name, generate_name_and_uri returns a truncated name, but the returned uri still contains the full untruncated name.
The result I observed for a 2000-character name was:
name.len() = 924
uri.len() = 2014
uri == format!("exec_harness::{}", name) = false
Reproduction
The behavior is in crates/exec-harness/src/uri.rs.
Minimal direct check:
let name = Some("x".repeat(2000));
let command = vec!["true".to_string()];
let result = generate_name_and_uri(&name, &command);
assert_eq!(result.name.len(), 924);
assert_eq!(result.uri, format!("exec_harness::{}", result.name));
The final assertion fails because result.uri is built from the longer input name.
Expected behavior
If the benchmark name is truncated, I expected the returned URI to match the returned name:
uri == format!("exec_harness::{}", name)
Actual behavior
The returned name and uri disagree for long explicit names.
I have not verified whether this causes a user-visible failure after upload; the hard fact I observed is the mismatch above.
What I observed
For a long explicit benchmark name,
generate_name_and_urireturns a truncatedname, but the returneduristill contains the full untruncated name.The result I observed for a 2000-character name was:
Reproduction
The behavior is in
crates/exec-harness/src/uri.rs.Minimal direct check:
The final assertion fails because
result.uriis built from the longer input name.Expected behavior
If the benchmark name is truncated, I expected the returned URI to match the returned name:
Actual behavior
The returned
nameanduridisagree for long explicit names.I have not verified whether this causes a user-visible failure after upload; the hard fact I observed is the mismatch above.