Commit b7e9ba9
committed
fix: address Copilot review feedback on #937
Two comments from Copilot on PR #937, both addressed:
1. safeTick now includes the recovered panic value's type and a
runtime/debug.Stack() dump. Since safeTick intentionally swallows all
panics — including latent invariant bugs — the log must carry enough
context to diagnose the bug from the log alone; repeated occurrences
surface the problem via the stack, not just the message.
2. cr.tick() now ends its trace cycle via defer with a completion
sentinel (matching the startup block). Previously, a panic inside
tick() would be recovered by safeTick but the trace cycle would
never call end(), orphaning the record. Now the trace closes as
Aborted on panic or Completed on normal exit.
Unit test updated to assert the type and stack trace appear in the log.1 parent cd16719 commit b7e9ba9
2 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | | - | |
450 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
451 | 456 | | |
452 | 457 | | |
453 | 458 | | |
| |||
466 | 471 | | |
467 | 472 | | |
468 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
469 | 483 | | |
470 | 484 | | |
471 | 485 | | |
| |||
551 | 565 | | |
552 | 566 | | |
553 | 567 | | |
554 | | - | |
555 | | - | |
556 | | - | |
| 568 | + | |
557 | 569 | | |
558 | 570 | | |
559 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1407 | 1413 | | |
1408 | 1414 | | |
1409 | 1415 | | |
| |||
0 commit comments