Skip to content

fix(cron): skip whitespace-only job responses - #29970

Closed
joe102084 wants to merge 1 commit into
NousResearch:mainfrom
joe102084:fix/cron-whitespace-empty-response
Closed

joe102084 wants to merge 1 commit into
NousResearch:mainfrom
joe102084:fix/cron-whitespace-empty-response

Conversation

@joe102084

Copy link
Copy Markdown
Contributor

Summary

  • Treat whitespace-only cron final responses like empty responses so scheduled jobs do not attempt to deliver blank messages.
  • Keep the existing soft-failure guard semantics: successful runs with blank/whitespace final responses are marked as non-ok instead of silently passing.
  • Add regression coverage for whitespace-only cron output.

Spec / Behavior

  • Given a successful cron job result with final_response containing only spaces/newlines, delivery should be skipped.
  • The run should still be marked with the existing empty-response soft failure path so operators can diagnose provider/model issues.
  • Non-empty responses and explicit [SILENT] behavior remain unchanged.

Test Plan

  • scripts/run_tests.sh tests/cron/test_scheduler.py -q
  • git diff --check main...HEAD

Notes

  • This PR intentionally avoids unrelated local working-tree changes.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Duplicate of merged #28352 — identical fix adding .strip() to bool(deliver_content) and final_response empty check in _process_job(). #28352 was merged on 2026-05-19.

@teknium1

Copy link
Copy Markdown
Collaborator

Automated hermes-sweeper review: this looks implemented on current main via the already-merged duplicate PR #28352.

Evidence:

  • PR fix(cron): handle whitespace-only responses (#28151) #28352 (fix(cron): handle whitespace-only responses (#28151)) was merged on 2026-05-19 as 6143013f5bb7a1e2a761a59997a0bca07c05bfe1.
  • cron/scheduler.py:2062 now uses bool(deliver_content.strip()), so whitespace-only cron responses do not deliver blank messages.
  • cron/scheduler.py:2078 now uses not final_response.strip() for the empty-response soft-failure path, preserving the diagnostic behavior requested here.
  • tests/cron/test_scheduler.py:1955 includes regression coverage for whitespace-only responses being marked failed and not delivered.

Thanks for the fix; the same change has already landed on main.

@teknium1 teknium1 closed this Jun 20, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 20, 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 P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants