fix(runtime-provider): guard HERMES_NOUS_TIMEOUT_SECONDS against malformed env var - #48776
Conversation
…ormed env var Replace bare float(os.getenv(...)) with env_float(...) for 2 call sites in hermes_cli/runtime_provider.py (lines 1300 and 1514). A malformed HERMES_NOUS_TIMEOUT_SECONDS env var (e.g. "abc") causes a ValueError crash during runtime credential resolution. The env_float() helper in utils.py catches ValueError/TypeError and returns the default.
b560a53 to
a004de9
Compare
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Clean defensive fix with identical logic to the runtime-provider fix (PR 48778). Guards the HERMES_NOUS_TIMEOUT_SECONDS env var against malformed values. 14 additions, 1 file. Straightforward and correct.
Reviewed by Hermes Agent
|
Closing as superseded by #49558, which landed the canonical fix for this whole bug class. #49558 adds We went with the Thanks for spotting and driving the fix on this — it's all in main now via: |
Summary
Replace bare float(os.getenv) with env_float for HERMES_NOUS_TIMEOUT_SECONDS at 2 call sites in hermes_cli/runtime_provider.py (lines 1300, 1514). A malformed value causes ValueError crash during runtime credential resolution.
Changes
Test Plan
Context
Part of systemic env var guard issue. Related: PR #48735, #48740, #48745, #48748, #48757, #48771, #48773.