Repository navigation
fix: log recovered stdio frames at WARN without a stack trace - #984
Conversation
8f2311a to
0a04ce7
Compare
devcrocod
left a comment
There was a problem hiding this comment.
Thanks for the PR!
A BOM prefix line is already delivered now via tryRecover. What #956 actually shows is the error with a stack trace that readMessage logs before recovery even runs.
Rather than adding another parsing rule, could you rework the logging:
WARN without a stack trace when recovery succeeds,
ERROR only when the line is dropped?
And please log a truncated prefix instead of the whole line.
There was a problem hiding this comment.
🟡 Changes recommended
BOM-prefixed valid frames still take the malformed-input recovery path and emit a warning, so the initial deserialization must strip the BOM and regression coverage should verify that behavior.
1 open issue
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The BOM-prefixed line is still deserialized before normalization, causing affected frames to fail initially and rely on recovery while emitting warnings; leading BOM characters should be stripped before the first parse attempt.
2 open issues
Review effort: Lite
| } catch (e: Exception) { | ||
| logger.error(e) { "Failed to deserialize message from line: $line\nAttempting to recover..." } | ||
| tryRecover(line) | ||
| val recovered = tryRecover(line) |

What
Fixes #956. A BOM-prefixed line was already delivered through
ReadBuffer's recovery path, butreadMessagefirst logged an ERROR with a stack trace and the whole line.Fix
Test
Added a
ReadBufferregression for BOM-prefixed messages.