Skip to content

fix(cron): ensure cron session title is never blank on failure - #50845

Closed
allin2 wants to merge 1 commit into
NousResearch:mainfrom
allin2:fix/cron-title-v2
Closed

fix(cron): ensure cron session title is never blank on failure#50845
allin2 wants to merge 1 commit into
NousResearch:mainfrom
allin2:fix/cron-title-v2

Conversation

@allin2

@allin2 allin2 commented Jun 22, 2026

Copy link
Copy Markdown

Summary

When set_session_title raises (e.g. title conflict with another session), the cron session was left with no title. The error was only logged at DEBUG level, making it invisible by default.

Motivation

Fixes #50535

When a cron job runs and the title-setting fails (DB error, title conflict), the cron session ends up with a blank title in the session sidebar/history.

Changes

  • fix: Retry with a fallback title that includes the session's timestamp suffix (seconds) to guarantee uniqueness
  • logging: Log the initial failure at WARNING level instead of DEBUG so operators can see it

Validation

The fallback title format: {job_name} · {session_suffix} where session_suffix is the timestamp portion of the session ID (e.g. 080045), guaranteed unique.

Checklist

  • Code follows the project's style guidelines
  • No unrelated changes included
  • Commit message follows Conventional Commits format

When set_session_title raises (e.g. title conflict with another session),
the cron session was left with no title. The error was only logged at
DEBUG level, making it invisible by default.

Now we retry with a fallback title that includes the session's
timestamp suffix (seconds) to guarantee uniqueness, and log the
initial failure at WARNING level so operators can see it.

Fixes NousResearch#50535
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Jun 22, 2026
@allin2

allin2 commented Jun 22, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #50538 and #50575 which were submitted earlier.

@allin2 allin2 closed this Jun 22, 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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cron): cron sessions have blank titles when title generation fails

2 participants