emrg: durable evolution count — include valid disk logs after daemon restart - #563
Merged
argszero merged 1 commit intoAug 8, 2026
Merged
Conversation
argszero
reviewed
Aug 8, 2026
argszero
left a comment
Owner
There was a problem hiding this comment.
✅ LGTM — cycle
The fix correctly addresses the #558 gap: the scheduler's in-memory count resets to 0 on daemon restart while evolution-*.json logs persist. Counting valid disk logs (parseable JSON with a timestamp) and taking max(in_memory, disk) keeps the GUI growth card/toast consistent with the 'recent' list across restarts.
Verified:
- Production logs are always top-level dicts with a 'timestamp' key (scheduler._write_evolution_log writes json.dumps of a dict), so the .get('timestamp') guard is sound.
- Positive/negative states covered by tests: valid disk logs counted (count==2 / count==25), corrupt/partial writes skipped (JSONDecodeError caught), and the legacy fallback path (no scheduler) still returns len(self.evolutions).
- Test CI green (31230683979).
argszero
reviewed
Aug 8, 2026
argszero
left a comment
Owner
There was a problem hiding this comment.
✅ LGTM — cycle
Second review pass on the same head (4db7440). Re-verified:
- The count now survives daemon restarts (max of in-memory scheduler count and valid disk evolution-*.json files), keeping GUI growth card/toast consistent with the 'recent' list.
- Corrupt/partial JSON writes are skipped; the legacy fallback (no scheduler) still works.
- Test CI green (31230683979) and the PR is mergeable.
argszero
reviewed
Aug 8, 2026
argszero
left a comment
Owner
There was a problem hiding this comment.
✅ LGTM — cycle
Third review pass (head unchanged, 4db7440). The durable evolution count fix is sound:
- Count = max(in-memory scheduler count, valid disk evolution-*.json files) survives daemon restarts.
- Corrupt/partial writes skipped; legacy fallback intact.
- Test CI green, mergeable. Ready to merge.
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.
Follow-up to #558 (evolution count aggregation): the count was still inconsistent across daemon restarts.