Skip to content

fix(cron): cap job toolsets by config - #25937

Closed
Osraka wants to merge 1 commit into
NousResearch:mainfrom
Osraka:fix/cron-toolset-denylist-25752
Closed

fix(cron): cap job toolsets by config#25937
Osraka wants to merge 1 commit into
NousResearch:mainfrom
Osraka:fix/cron-toolset-denylist-25752

Conversation

@Osraka

@Osraka Osraka commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cap per-job cron enabled_toolsets to the cron platform toolsets, so a job can narrow its tools but cannot widen past config
  • keep agent.disabled_toolsets enforced even for persisted job-level overrides
  • normalize persisted toolset entries before resolving them, avoiding duplicates/blank entries from hand-edited jobs

Fixes #25752

Tests

  • python3 -m ruff check cron/scheduler.py tests/cron/test_scheduler.py
  • python3 -m pytest tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_resolve_cron_enabled_toolsets_intersects_per_job_with_platform_tools tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_resolve_cron_enabled_toolsets_honors_agent_disabled_toolsets tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_resolve_cron_enabled_toolsets_returns_empty_when_override_fully_denied tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_resolve_cron_enabled_toolsets_fallback_still_honors_disabled_config tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_run_job_passes_enabled_toolsets_to_agent tests/cron/test_scheduler.py::TestRunJobSessionPersistence::test_run_job_per_job_toolsets_are_capped_by_platform_config -q
  • HOME=/tmp/hermes-cron-test-home python3 -m pytest tests/cron/test_scheduler.py -q

Note: scripts/run_tests.sh could not run locally because this checkout has no .venv or venv; the equivalent pytest commands above passed.

@alt-glitch alt-glitch added type/security Security vulnerability or hardening comp/cron Cron scheduler and job management P1 High — major feature broken, no workaround labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This is the fifth competing fix for #25752. Prior PRs addressing the same issue: #25780, #25786, #25815, #25842.

@Osraka

Osraka commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Closing this as a duplicate of the earlier fixes for #25752 (#25780, #25786, #25815, #25842). I missed the existing work before opening this; apologies for the extra noise.\n\nThe main behavior I wanted to preserve here is that a fully denied per-job override should remain an explicit empty toolset rather than falling back to the default toolset set. That concern is already being discussed on the earlier PRs, so I will follow the existing thread instead of keeping another competing fix open.

@Osraka Osraka closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P1 High — major feature broken, no workaround type/security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cron/scheduler.py:74-86 bypasses agent.disabled_toolsets via LLM-supplied enabled_toolsets

2 participants