From 9ceeabb4d632ac299b326850b8259aa523ef73ea Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 21 Jun 2026 06:02:28 +0200 Subject: [PATCH] fix(deploy): read INFINITO_MAX_RUNTIME without an empty-string default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The empty-string fallback in os.environ.get(KEY, '') is forbidden for INFINITO_* vars (test_no_infinito_get_defaults) — defaults live in default.env/handler. Read it with no default and let _parse_duration_seconds accept None. Co-Authored-By: Claude Opus 4.8 --- cli/administration/deploy/development/runtime_budget.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/administration/deploy/development/runtime_budget.py b/cli/administration/deploy/development/runtime_budget.py index 2202b227e3..cec4ef8435 100644 --- a/cli/administration/deploy/development/runtime_budget.py +++ b/cli/administration/deploy/development/runtime_budget.py @@ -10,7 +10,9 @@ from utils.annotations.message import warning _BUFFER_SECONDS = 30 * 60 -def _parse_duration_seconds(raw: str) -> int | None: +def _parse_duration_seconds(raw: str | None) -> int | None: + if not raw: + return None raw = raw.strip().lower() if not raw: return None @@ -33,7 +35,7 @@ class RuntimeBudget: def __init__(self) -> None: self.max_seconds = _parse_duration_seconds( - os.environ.get("INFINITO_MAX_RUNTIME", "") + os.environ.get("INFINITO_MAX_RUNTIME") ) self._start = time.monotonic() self._longest_round = 0.0