fix: pr-bug-scan validated finding from #4598#4737
Open
buf0-bot[bot] wants to merge 1 commit into
Open
Conversation
Wrap writeToDiskSync() in flush() with try/catch+console.error so stats write errors during will-quit no longer propagate.
Contributor
There was a problem hiding this comment.
Reviewed changes — wraps writeToDiskSync() in StatsCollector.flush() with try/catch to prevent IO errors during will-quit from crashing the app.
- Wrap
writeToDiskSync()inflush()— catches IO errors (EACCES, ENOSPC, etc.) and logs them viaconsole.errorinstead of letting exceptions propagate out of thewill-quithandler atsrc/main/index.ts:1422.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
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.

Automated fix-PR from pr-bug-scan for parent #4598.
Fixer status:
FIXED_WITH_CODE_PROOFSummary: Wrap writeToDiskSync() in flush() with try/catch+console.error so stats write errors during will-quit no longer propagate.
Blocked proof link:
src/main/stats/collector.ts:152 — writeToDiskSync() now wrapped in try/catch matching the deleted writeToDiskBestEffort behavior; will-quit handler at src/main/index.ts:1423 no longer sees an exception from flush().Typecheck:
skippedProof (from validator)
code_analysisGenerated by
pr-bug-scan(proof-machine architecture). Human approval required before merge.