fix: validate cron no-agent update invariants - #21031
Conversation
2cdfa3e to
d204b2c
Compare
|
CI workflows are currently in GitHub |
d204b2c to
81b72a2
Compare
Validation refreshRebased this stale/conflicting PR onto latest Head: Local validation: scripts/run_tests.sh tests/cron/test_cron_no_agent.py tests/cron/test_cron_script.py -vResult: Additional checks:
Conflict resolution notes:
GitHub Actions for this fork PR may still require maintainer approval before remote CI runs. |
81b72a2 to
51f1383
Compare
Validation refreshRebased onto latest Head: Local validation:
Result for shared validation slice: This PR-specific cron coverage remains covered by that run: |
51f1383 to
29e7891
Compare
Validation refreshCurrent head: Local validation rerun: scripts/run_tests.sh tests/cron/test_cron_no_agent.py tests/cron/test_cron_script.pyResult: PR body refreshed to match the current scope. GitHub Actions/check rollup is currently empty for this fork PR; if Actions require maintainer approval, no remote CI logs will be available until that approval happens. |
Local integration validationValidated the current open PR stack locally while GitHub Actions remain maintainer-gated for fork PRs. Temporary stack from fresh
Combined targeted validation: scripts/run_tests.sh \
tests/hermes_cli/test_tools_config.py \
tests/hermes_cli/test_update_check.py \
tests/hermes_cli/test_web_server.py \
tests/cron/test_cron_no_agent.py \
tests/cron/test_cron_script.py -qResult: Dashboard build also passed: cd web && npm run buildResult: passed; only the existing Vite chunk-size warning was emitted. The temp worktree was removed after validation. No production/deploy action was performed. |
a6fe297 to
067bd42
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for moving the no-agent script requirement into cron/jobs.py; current main still allows a direct update to clear that script and leave a job that the scheduler rejects at cron/scheduler.py:2523-2528.
Problems
cron/jobs.py:702in this PR rejects a valid agent-mode job when it has a script but no prompt or skills. Current dashboard validation deliberately permitsprompt or skills or script(hermes_cli/web_server.py:9998-10002), and the agent path injects non-empty script output into the prompt (cron/scheduler.py:2184-2203). The changed round-trip test attests/cron/test_cron_no_agent.py:86masks that supported transition by adding a prompt.
Suggested changes
- Retain the
no_agent=True/script invariant, but remove theno_agent=Falseprompt-or-skills check and test the script-only agent transition instead.
Automated hermes-sweeper review.
| # Switching an existing script-only job back to agent mode must not | ||
| # create an empty LLM job. Existing invalid legacy rows are left alone | ||
| # unless the update explicitly toggles no_agent off. | ||
| if "no_agent" in updates and not updated.get("no_agent"): |
There was a problem hiding this comment.
This rejects a supported agent-mode shape: a non-no_agent job may retain its pre-run script as the sole prompt source. Current dashboard validation accepts prompt or skills or script (hermes_cli/web_server.py:9998), and _build_job_prompt() injects non-empty script output before the agent runs (cron/scheduler.py:2184-2203). Remove this branch; keep only the no_agent=True requires-script invariant.
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs touch this complex: #21031 addresses the reported runtime invariant by normalizing script updates and rejecting script removal from no-agent jobs, while #21594 overlaps only in the cron and Kanban documentation diagrams and does not address the runtime cause. Both diffs currently require the corrections identified by contributor review.
Related pull requests
- #21031
related— (+137/-31) — keep open, changes required: The data-layer normalization and rejection of empty or whitespace-only scripts correctly prevent updates from leaving no-agent jobs unschedulable. The contributor keep_open review must be addressed before merge: remove the new no_agent=False prompt-or-skills restriction because script-only agent jobs are supported, and restore a regression test for that transition. - #21594
related— (+19/-40) — keep open separately, changes required: This is primarily a fallback-provider and documentation-lint cleanup; its cron and Kanban Mermaid conversions overlap with #21031 but do not fix the cron update invariant. Per the contributor keep_open review, route Kanban live updates through the FastAPI WebSocket rather than directly from the DB to the UI, and preserve the legacy fallback_model compatibility note.
Duplicates
#21031 and #21594 contain substantially duplicate cron-script-only and Kanban ASCII-to-Mermaid documentation changes, but their overall scopes are not duplicates.
Suggested consolidation
Merge #21031 after removing the unsupported agent-mode prompt-or-skills validation and testing the valid script-only agent transition. Keep #21594 as the separate documentation PR after its contributor-review corrections, while retaining the overlapping diagram conversions in only one PR to avoid duplicate/conflicting edits; neither full PR should be closed as a duplicate of the other.
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 19 kB of PR diffs, 1 kB of issue/PR text, 5 kB of discussion (7 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
067bd42 to
e719db7
Compare
Summary
no_agentupdate invariants.Test Plan
scripts/run_tests.sh tests/cron/test_cron_no_agent.py tests/cron/test_cron_script.pyBranch State
origin/main.1 ahead / 0 behindagainstorigin/mainbefore opening this PR.