fix(cron): coerce repeat parameter to int to prevent TypeError - #7589
Closed
konsisumer wants to merge 1 commit into
Closed
fix(cron): coerce repeat parameter to int to prevent TypeError#7589konsisumer wants to merge 1 commit into
konsisumer wants to merge 1 commit into
Conversation
Contributor
Author
|
Cherry-picked 7 commits from #7534 to fix the 26 pre-existing CI test failures on
|
Contributor
Author
|
Also cherry-picked the |
konsisumer
force-pushed
the
fix/cron-repeat-type-coercion
branch
2 times, most recently
from
April 11, 2026 23:04
da39389 to
78c4994
Compare
Contributor
Author
|
The two CI failures on this PR are pre-existing infrastructure issues on
This PR only modifies |
konsisumer
force-pushed
the
fix/cron-repeat-type-coercion
branch
2 times, most recently
from
April 17, 2026 04:04
135b8a6 to
b6b5bd8
Compare
LLMs may pass the repeat parameter as a string (e.g. "3") despite the tool schema declaring "type": "integer". This causes a TypeError at the `repeat <= 0` comparisons in both the create and update code paths. Fixes NousResearch#6709
konsisumer
force-pushed
the
fix/cron-repeat-type-coercion
branch
from
April 17, 2026 09:53
b6b5bd8 to
3a65dd3
Compare
3 tasks
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
repeatparameter tointat the top ofcronjob()before it reaches the<= 0comparisons in the create and update code pathsrepeatas a string (e.g."3") despite the tool schema declaring"type": "integer", causingTypeError: '<=' not supported between instances of 'str' and 'int'Fixes #6709
Test plan
test_create_with_string_repeat_is_coerced_to_int— passes string"3"as repeat to create, verifies successtest_update_with_string_repeat_is_coerced_to_int— passes string"5"as repeat to update, verifies successtest_cronjob_tools.pytests pass