Repository navigation
Conversation
BUILD-1210. Retain the first samples and include the final observed exception in text and JSON when it falls outside the sample. AI-assisted.
Kam471
left a comment
There was a problem hiding this comment.
Ran this at e39a62a0 on Windows 11: python -I tests/test_boot_trace.py -> 14 tests, OK; git diff --check clean.
The parser keeps the first --limit samples and stores the final exception separately, and the text summary appends it as last observed exception (so the detail list can exceed the limit by one, as the help says). The JSON keeps exceptions plus last_exception; the existing tests and the capped-trace case pass.
One edge to decide: with --limit 0 this still prints one last observed exception, while #4223's variant (replacing the last slot) prints none. Since #4223 is the competing PR, the coordinator should pick the intended --limit 0 behavior along with the duplicate.
Duplicate note: #4223 (4866ae5c, Vonsek) implements the same finding by replacing the last slot. Claims: this PR's BUILD-1210 claim at 00:05:07Z, #4223's EGEN claim at 00:06:46Z, so this is the earlier claimant even though it opened later. No functional blocker in either.
|
Thanks for the Windows check, @Kam471. I ran the CLI at main |
Claimed under BUILD-1210 in #4084 (comment). Independently reproduced in #4084 (comment).
A startup trace with 11 early C++ throws and a later exception counts all 12 on main, but the default report drops the latest exception's location and stack. Keep the first samples and show one extra entry for the last observed exception when it falls outside them. The startup JSON includes an optional
last_exceptionfield in that case. The last observed exception can be handled, so the report labels it without inferring a crash.Windows 11, Python 3.12.14:
git diff --checkpassed.Synthetic logs only. AI-assisted.