Fix invalid HERMES_CRON_TIMEOUT fallback in cron jobs - #11375
Closed
cola-runner wants to merge 3 commits into
Closed
cola-runner wants to merge 3 commits into
cola-runner wants to merge 3 commits into
Conversation
4 tasks
Contributor
Drop the redundant negative-value warning branch in _get_cron_inactivity_limit(). The original (pre-fix) code mapped any non-positive value to None (unlimited); restoring that behaviour collapses the helper to one warning path and one return. Tighten the except to ValueError (the only thing float() can raise on string input) and add regression tests for negative-as-unlimited and whitespace-as-default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cola-runner
force-pushed
the
codex/fix-11319-cron-timeout-parse
branch
from
April 25, 2026 16:13
7ff6724 to
1c21a07
Compare
Contributor
Author
|
Rebased on main and tightened the helper:
Net: 22 insertions / 19 deletions — smaller than the prior version and one fewer warning path. |
Collaborator
|
Thanks for the fix! Closing as a duplicate — #11365 (from @yeyitech, submitted ~45 minutes earlier) fixes the same issue with the same defensive parse pattern. Salvaged it onto current main in PR #17515, now merged: Both of you independently identified and fixed the same bug the same way; credit to both. Really appreciate you taking the time to write the regression coverage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HERMES_CRON_TIMEOUTdefensively instead of callingfloat(...)inline inrun_job()0as the unlimited sentinel, but fall back to the default inactivity timeout when the env var is malformedCloses #11319.
Testing
source venv/bin/activate && python -m pytest tests/cron/test_cron_inactivity_timeout.py tests/cron/test_scheduler.py -qsource venv/bin/activate && python -m pytest tests/ -q(environment still has existing unrelated failures/errors in ACP, web server optional deps, transcription optional deps, and several pre-existing gateway/run_agent tests; the new cron regression is not among them)