fix(achievements): persist lifetime counters to prevent regression after prune - #28705
Closed
ygd58 wants to merge 2 commits into
Closed
fix(achievements): persist lifetime counters to prevent regression after prune#28705ygd58 wants to merge 2 commits into
ygd58 wants to merge 2 commits into
Conversation
…ttling Two fixes for issue NousResearch#27804: 1. Subject-based session isolation: chat_id is now sender_addr:normalized_subject so each unique email subject gets its own isolated session. Re: prefixes are stripped so replies stay in the same thread as the original message. 2. Progress message throttling: intermediate status messages ('still working', 'looking', 'searching', etc.) are suppressed for email delivery. Unlike chat platforms, email cannot be edited in-place, so progress updates create separate emails that flood the inbox (100-200 emails per interaction). Only final responses are delivered. Fixes NousResearch#27804
…hrottling Three improvements for issue NousResearch#27804: 1. RFC 5322 thread isolation: In-Reply-To header used as stable thread anchor so replies stay in the same session even if subject changes. Falls back to normalized subject for fresh threads. 2. Subject-based isolation fallback: new threads get per-subject sessions so different topics don't interrupt each other. 3. Progress throttling: intermediate status messages ('still working', 'searching', etc.) suppressed — only final responses are emailed, preventing 100-200 status emails per interaction. Supersedes subject-only approach with RFC 5322 standard threading.
Collaborator
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.
Problem
When sessions.auto_prune deletes old rows from state.db, achievement lifetime counters regress because they are recomputed only from remaining sessions (issue #28661).
Fix
Merge scanned aggregate counters with persisted lifetime_counters in state.json using max(). Once a counter reaches a value it never goes backward.
Fixes #28661