fix(cron): ensure cron session title is never blank on failure - #50827
Closed
allin2 wants to merge 1 commit into
Closed
fix(cron): ensure cron session title is never blank on failure#50827allin2 wants to merge 1 commit into
allin2 wants to merge 1 commit into
Conversation
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
Collaborator
Author
|
Closing to resubmit after verification against latest main. |
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.
Summary
When
set_session_titleraises (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. This degrades session recall quality and makes it hard to identify sessions.
Changes
Validation
The fix is defensive — it catches the exception and retries with a unique fallback title:
{job_name} · {timestamp}(e.g. "Morning digest · Jun 22 08:00"){job_name} · {session_suffix}(e.g. "Morning digest · 20260622_080045")Checklist