Repository navigation
fix: [SDK-5581] catch Throwable around the startup timeline log - #2812
Merged
Merged
Conversation
A Kotlin log listener can throw a checked exception, which internalInit's catch (Exception) would turn into FAILED after a successful init. Co-authored-by: Cursor <cursoragent@cursor.com>
7 of 18 tasks
fadi-george
approved these changes
Oct 22, 2026
Contributor
📊 Diff Coverage ReportDiff Coverage Report (Changed Lines Only)Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff). Changed Files Coverage
Overall (aggregate gate)1/1 touched executable lines covered (100.0% — requires ≥ 80%) |
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.
Description
One Line Summary
Catch
Throwablearound the startup timeline log so a log listener throwing a checked exception can't fail a finished init.Details
Follow-up to Fadi's comment on #2811: #2811 (comment)
reportStartupTimelinecaught onlyRuntimeException, butinternalInitcatchesException. Kotlin listeners can throw checked exceptions (for exampleIOException), which slipped past the guard and turned a successful init into FAILED. It now catchesThrowable, matchinglogStartupDiagnostics.No public API change.
Testing
Unit testing
The existing "log listener that throws" test now throws
IOException. It fails with the old catch and passes with the fix. Core unit tests, spotless and detekt pass.Manual testing
Not needed for a catch widening.
Affected code checklist
Checklist
Overview
Testing
Final pass