commit 0b18b5409e507b1769a0e5b15073769fb194c8b6
parent 1c6de529ee3e5af711ccdfaf9eda8aba6fdd1504
Author: triesap <tyson@radroots.org>
Date: Wed, 23 Sep 2026 14:07:47 +0000
test(hyf): derive the measured argv profile from the real argv (H005A review)
- Remove the descriptive argv/environment parameters and derive the argv profile from the exact child command line that is forked.
- Keep the environment profile read back from the live process so both recorded profiles are machine-derived rather than asserted.
- Re-run the measurement and contract lanes on the corrected tooling; no product src, schema, dependency or pixi.lock change.
Diffstat:
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/tests/measurement_process_helper.mojo b/tests/measurement_process_helper.mojo
@@ -897,11 +897,17 @@ struct MeasurementSession(Movable):
)
+def argv_profile_of(binary_path: String, var argv: List[String]) -> String:
+ """Machine-derived argv profile of the measured child (not asserted)."""
+ var profile = String("<" + binary_path + ">")
+ for index in range(len(argv)):
+ profile += " " + argv[index]
+ return profile^
+
+
def measure_persistent_process(
source_root: String,
binary_path: String,
- argv_profile: String,
- env_profile: String,
var argv: List[String],
warmup_frames: Int,
measured_frames: Int,
@@ -919,9 +925,11 @@ def measure_persistent_process(
"""
if warmup_frames < 0 or measured_frames < 1:
raise Error("measurement: invalid warmup/measured frame counts")
- _ = env_profile
var identity = measurement_identity(
- source_root, binary_path, argv_profile, guard
+ source_root,
+ binary_path,
+ argv_profile_of(binary_path, argv.copy()),
+ guard,
)
var process = spawn_measurement_process(
identity.binary_path, argv^, deadline_ms, guard
diff --git a/tests/measurement_runner.mojo b/tests/measurement_runner.mojo
@@ -38,8 +38,6 @@ def main() raises:
var measured = measure_persistent_process(
".",
binary,
- "argv=[<hyfd>]",
- "env=verified at run time",
argv^,
WARMUP_FRAMES,
MEASURED_FRAMES,
diff --git a/tests/test_measurement_contract.mojo b/tests/test_measurement_contract.mojo
@@ -70,8 +70,6 @@ def _run_sh_measurement(
return measure_persistent_process(
".",
"/bin/sh",
- "argv=[/bin/sh -c <controlled child>]",
- "env=minimal; HYF_PATHS_PROFILE=repo_local",
argv^,
warmup,
measured,
@@ -100,8 +98,6 @@ def test_persistent_measurement_validates_every_frame() raises:
var session = measure_persistent_process(
".",
binary,
- "argv=[<hyfd>]",
- "env=verified at run time",
argv^,
WARMUP_FRAMES,
MEASURED_FRAMES,