feat(cron): add per-job wrap_response override#4380
Open
JulienTant wants to merge 1 commit intoNousResearch:mainfrom
Open
feat(cron): add per-job wrap_response override#4380JulienTant wants to merge 1 commit intoNousResearch:mainfrom
JulienTant wants to merge 1 commit intoNousResearch:mainfrom
Conversation
Allow individual cron jobs to override the global cron.wrap_response config. Per-job setting takes precedence; None defers to global config.
ca6a75e to
d4ea109
Compare
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.
What does this PR do?
Adds per-job
wrap_responsesupport to cron jobs. Individual jobs can now override the globalcron.wrap_responseconfig setting. When a job haswrap_responseset, that value is used; when unset (None), it falls back to the global config as before.Related Issue
N/A
Type of Change
Changes Made
cron/jobs.py—create_job()accepts and stores optionalwrap_responsefieldcron/scheduler.py—_deliver_result()checksjob.get("wrap_response")before falling back to global configtools/cronjob_tools.py— Addedwrap_responseto tool schema, handler function, registry lambda, and create/update action pathscli.py— Added--wrap-response true|falseand--no-wrapflags to/cronCLI command for bothaddandeditsubcommandswebsite/docs/user-guide/features/cron.md— Documented per-job override behaviortests/cron/test_scheduler.py— Two new tests covering per-job override in both directions (true overrides global false, false overrides global true)How to Test
/cron add "every 1h" "test prompt" --no-wrap→ verify delivered output has no header/footer wrapper/cron edit <job_id> --wrap-response true→ verify delivery is wrapped even if global config is falsewrap_response: false→ verify raw output on deliveryChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A