Skip to content

fix(cron): classify no-agent failures as script errors - #64474

Open
visualfox-ch wants to merge 1 commit into
NousResearch:mainfrom
visualfox-ch:fix/no-agent-cron-error-summary-v2
Open

fix(cron): classify no-agent failures as script errors#64474
visualfox-ch wants to merge 1 commit into
NousResearch:mainfrom
visualfox-ch:fix/no-agent-cron-error-summary-v2

Conversation

@visualfox-ch

Copy link
Copy Markdown

Summary

  • classify non-zero script exits in no_agent cron jobs as script failures
  • preserve deterministic script-only execution while making failure summaries actionable
  • add regression coverage for the scheduler result contract

Test plan

  • python -m pytest tests/cron/test_cron_no_agent.py -q -o 'addopts='
  • ruff check cron/scheduler.py tests/cron/test_cron_no_agent.py

Supersedes #63178 with the same focused fix rebased onto current main.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists labels Jul 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: rebased resubmission of the still-open #63178 (same focused no_agent script-failure classification fix). Also part of the cron failure-classification family tracked under #59379. Flagging the #63178/#64474 pair so a maintainer can pick the canonical one to merge.

@visualfox-ch

Copy link
Copy Markdown
Author

Update: #63178 is now closed as superseded by this current-main replacement.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Fix for cron error classification when no-agent failures occur. Classifying these as script errors instead of silent failures. 31 additions, 0 deletions. Clean fix.


Reviewed by Hermes Agent

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused regression fix. Current main still sends every failed job through _summarize_cron_failure_for_delivery() at cron/scheduler.py:3620, while that helper classifies 429, timeout, and auth-like text as provider failures at cron/scheduler.py:62-89. This conflicts with the no-agent execution path, which returns failed script output before any agent/provider work at cron/scheduler.py:2591-2638.

The proposed early no_agent branch is correctly scoped to the classifier, preserves the existing bounded one-line error treatment, and its parametrized cases cover the three provider-like strings that currently misclassify script failures. The current surrounding context remains compatible with the patch despite the branch being behind current main.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 16, 2026
@alt-glitch alt-glitch added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages and removed sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 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 P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants