fix(cron): normalize string repeat values - #7216
Open
ARegalado1 wants to merge 1 commit into
Open
Conversation
- treat non-numeric repeat values like 'once' as unset - auto-coerce one-shot jobs back to repeat=1 after normalization - reuse repeat normalization in cronjob update - add regression coverage for create and update flows
ARegalado1
force-pushed
the
fix/cron-repeat-once-7142
branch
from
May 3, 2026 15:01
31aeb85 to
968cec5
Compare
Contributor
Author
|
Refresh update:
No GitHub CI checks are currently attached to this fork PR. |
3 tasks
Contributor
|
Thanks for the focused fix. The reported failure is present on current The PR’s shared normalizer addresses both verified sites and preserves existing semantics for non-positive values and one-shot defaults. The added create/update regressions match the two paths. This is an automated hermes-sweeper review. |
This was referenced Aug 3, 2026
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
repeatvalues before numeric comparisons."3"and coerce them to integers."once"and"forever"as unset instead of crashing.1.Context
LLMs can still pass
repeatas a string even though the tool schema declares it as an integer. Before this patch, create/update paths could compare a string to0and raise:Refresh note: this branch was rebased onto current
mainand rewritten as a clean cron-only PR. An unrelated GitHub/local terminal environment commit that was previously on the branch was dropped.Closes #7142
Test Plan
python -m py_compile cron/jobs.py tools/cronjob_tools.pypython -m pytest tests/cron/test_jobs.py tests/cron/test_cron_script.py tests/tools/test_cronjob_tools.py -q -o 'addopts='— 135 passedgit diff --check upstream/main...HEAD