hyf

Context-aware query service for Radroots
git clone https://radroots.dev/git/hyf.git
Log | Files | Refs | README | LICENSE

commit c1cc973a5bb74c4d8808a0e6d4b054c16a563de7
parent fb9e383088df4bd16d81647e5af155d1a04dbcc8
Author: triesap <tyson@radroots.org>
Date:   Wed, 23 Sep 2026 16:09:52 +0000

test: capture startup timing after first response validation

Address the implementation review LOW finding: spawn-to-first-validated-response
startup timing is now recorded only after validate_status_frame accepts the first
response, so the label matches the measurement. No other behavior change.

Diffstat:
Mtests/measurement_process_helper.mojo | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/measurement_process_helper.mojo b/tests/measurement_process_helper.mojo @@ -1760,19 +1760,20 @@ def measure_persistent_process( var response = process.read_response(index) process.assert_no_surplus(index) var latency = now_ms() - frame_start - if index == 0: - # Startup is the true spawn-to-first-validated-response - # latency; any sampling that overlapped the child's own - # startup is recorded separately as instrumentation rather than - # subtracted, so the value can never understate real startup. - startup_wall_ms = now_ms() - process.spawn_ms - startup_sampling_ms = pre_sample_ms - startup_ms = startup_wall_ms var verdict = validate_status_frame(response, request_id, trace_id) if verdict.declared_max_requests >= 0: declared = verdict.declared_max_requests if verdict.ok: ok_frames += 1 + if index == 0: + # Startup is the true spawn-to-first-validated-response + # latency, captured only after the first response has been + # validated. Any sampling that overlapped the child's own + # startup is recorded separately as instrumentation rather + # than subtracted, so the value cannot understate startup. + startup_wall_ms = now_ms() - process.spawn_ms + startup_sampling_ms = pre_sample_ms + startup_ms = startup_wall_ms else: failed_frames += 1 if first_failure == "":