fix(core): Per-file guard count, skip guard in 'all' mode, handle stream errors#28776
Merged
guillaumejacquart merged 1 commit intoiam-528-bug-event-log-parsing-on-startup-causes-oom-on-starter-plan-v1from Apr 21, 2026
Conversation
…m errors - Track per-file message count via baselineCount so cross-file accumulation doesn't abort newer (more valuable) log files - Skip the guard in 'all' mode where confirms don't prune loggedMessages, preventing false aborts on healthy files - Add stream error handler to absorb post-destroy() errors - Add tests for both new cases
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline Memory consumption baseline with starter plan resources
docker-stats
Idle baseline with Instance AI module loaded
How to read this table
|
c74ff17
into
iam-528-bug-event-log-parsing-on-startup-causes-oom-on-starter-plan-v1
32 of 34 checks passed
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
Follow-up fixes for #28594 addressing three issues found during review:
results.loggedMessages.lengthacross all rotated log files. Since files are processed oldest-first, an old file tripping the limit would abort the newest file (the one with the most valuable crash recovery data). Now uses abaselineCountto track per-file growth only.'all'mode: Inmode === 'all', confirms never pruneloggedMessages(mode !== 'all'check on line 277), so the working set grows monotonically. Any log with >10k total lines would always trip the guard, breakinggetMessagesAll(). Guard is now skipped in'all'mode.stream.destroy()can emit an unhandled'error'event. Added a no-op error handler to absorb it.Review / Merge checklist