feat(dashboard): expose cron job execution fields - #53478
Closed
versun wants to merge 1 commit into
Closed
Conversation
Collaborator
Comprehensive implementation of the dashboard cron execution-field requests in #24258 and #37353. Supersedes the narrower #48427 (per-job Model field only) in scope — related, not a duplicate. Flagging so a maintainer can decide between this broad form and the narrower #48427. |
Contributor
|
Merged via #53551. Your feature commit was cherry-picked onto current main with your authorship preserved (rebase-merge). I added a small follow-up that tightens the cron-job form helpers (collapsed three near-identical optional-text helpers into one + reused splitCronList/asString) — behavior-identical, all vitest + backend tests green. Thanks for the well-factored contribution! |
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?
Expands the dashboard cron create/edit flow so it can manage the cron execution fields that already exist in the scheduler core: provider/model/base URL overrides, scripts,
no_agent,context_from, enabled toolsets, and workdir.This keeps the capability in the existing dashboard/API surfaces instead of adding any new model tool surface. The backend adapter now normalizes dashboard payloads into the existing
cron.jobsstorage shape, validates profile-scoped script andcontext_fromreferences, and refreshes provider/model drift snapshots when inference routing fields actually change.Related Issue
No linked issue. I searched existing issues and open/closed PRs for duplicate dashboard cron execution-field work.
Type of Change
Changes Made
web/src/pages/CronPage.tsx: replaces the narrow cron form with a shared create/edit form that supports advanced execution fields and profile-scoped skills/toolsets/model options.web/src/lib/cron-job.ts: adds cron job form normalization and mutation payload helpers.web/src/lib/schedule.ts: adds schedule parsing so existing interval/once/simple-cron schedules round-trip back into the builder during edit.web/src/lib/api.ts: widens cron job API types and fetches model options for the selected profile.hermes_cli/web_server.py: normalizes dashboard cron create/update payloads, validates scripts under the selected profile'sscripts/directory, and validatescontext_fromjob IDs in the selected profile.cron/jobs.py: factors provider/model snapshot creation and refreshes snapshots only when inference-routing axes materially change.tests/hermes_cli/test_web_server_cron_profiles.py,web/src/lib/cron-job.test.ts,web/src/lib/schedule.test.ts: cover dashboard normalization, profile-scoped validation, snapshot refresh behavior, payload helpers, and schedule round-trips.How to Test
no_agent,context_from, enabled toolsets, and workdir.scripts/directory and acontext_fromID from another profile; both should return 400 errors.Validation run locally on macOS 15.7.7:
gh search issues --repo NousResearch/hermes-agent "dashboard cron advanced fields profile script no_agent context_from" --limit 20-> no resultsgh search prs --repo NousResearch/hermes-agent --state open "dashboard cron advanced fields profile script no_agent context_from" --limit 20-> no resultsgh search prs --repo NousResearch/hermes-agent --state closed "dashboard cron advanced fields profile script no_agent context_from" --limit 20-> no resultsscripts/run_tests.sh tests/hermes_cli/test_web_server_cron_profiles.py-> 17 passed.venv/bin/pytest tests/hermes_cli/test_web_server_cron_profiles.py -q-> 17 passednpx vitest run web/src/lib/cron-job.test.ts web/src/lib/schedule.test.ts-> 16 passednpm --workspace web run typecheck -- --pretty false-> passednpm --workspace web exec eslint -- src/pages/CronPage.tsx src/lib/api.ts src/lib/schedule.ts src/lib/cron-job.ts src/lib/cron-job.test.ts src/lib/schedule.test.ts-> passednpm --workspace web run lint-> failed on pre-existing files outside this change (LanguageSwitcher.tsx,OAuthProvidersCard.tsx,ConfigPage.tsx, etc.); no lint errors in touched files.scripts/run_tests.sh-> attempted full suite: 1678 files, 34178 tests passed, 49 failed in 626.8s. Failures were outside the new cron coverage and were dominated by local environment/dependency issues (acp/mcppackages not installed, nosystemctl/user D-Bus on this macOS shell,/tmpvs/private/tmppath assertions) plus existing unrelated tests such astests/run_agent/test_run_agent.pyhitting the per-file 140s timeout.Checklist
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/AScreenshots / Logs