hyf

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

commit 0ce0a87f49fd2777c5ae6cbca7bbdb6c5d32f342
parent c390ebd82f8d71553bf825a15df2443e4cdc63c1
Author: triesap <tyson@radroots.org>
Date:   Thu, 24 Sep 2026 02:56:43 +0000

C003: correct the default-timeout comment and assert it in the frozen-constant test

- config.mojo: state accurately that D21 fixes the request-budget derivation, not
  the preserved 15000 ms provider default
- test_runtime_paths.mojo: assert DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS == 15000 in
  the frozen-constant control (review finding F2/F3)

Diffstat:
Msrc/hyf_runtime/config.mojo | 8+++++---
Mtests/test_runtime_paths.mojo | 2++
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/hyf_runtime/config.mojo b/src/hyf_runtime/config.mojo @@ -3,9 +3,11 @@ from std.pathlib import Path from morph.toml import from_toml -# ADR-0010 D21 freeze: the request budget is min(positive request deadline, the -# configured provider request_timeout_ms). This named default is consumed by -# H092's derivation and must not be enlarged or weakened here. +# ADR-0010 D21 fixes the request-budget derivation, not this value: the absolute +# budget is min(positive request deadline, the configured provider +# request_timeout_ms). This named constant preserves the pre-existing 15000 ms +# default for H092's derivation; it is not a D21-selected bound, and it is not +# enlarged or weakened here. comptime DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS: Int = 15000 diff --git a/tests/test_runtime_paths.mojo b/tests/test_runtime_paths.mojo @@ -622,6 +622,7 @@ from hyf_runtime.budget import ( RETRY_BACKOFF_MS, ) from hyf_stdio.server import MAX_FRAME_BYTES, frame_too_large +from hyf_runtime.config import DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS def _frame_of(count: Int) -> String: @@ -643,6 +644,7 @@ def test_policy_constants_match_frozen_d21_values() raises: assert_equal(CIRCUIT_OPEN_THRESHOLD, 3) assert_equal(CIRCUIT_COOLDOWN_MS, 30000) assert_equal(CIRCUIT_HALF_OPEN_PROBES, 1) + assert_equal(DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS, 15000) assert_true(MAX_RETRIES_PER_CALL < MAX_WIRE_ATTEMPTS)