Commit 36bbe99
fix: address PR feedback - periodic size checks and error handling
Changes based on code review feedback:
1. Made size check periodic in loop.ts (every 10 iterations)
- Avoids expensive JSON.stringify on every iteration
- Matches pattern used in block-executor.ts (every 50 logs)
2. Fixed error handling in estimateObjectSize/estimateBlockLogsSize
- Now returns MAX + 1 instead of MAX on serialization failure
- Ensures `size > MAX` evaluates to true, triggering cleanup
- Prevents circular references from silently bypassing limits
Note: Array slicing logic is correct as-is:
- `.slice(discardCount)` keeps indices discardCount to end (newest)
- This is intended behavior: keep recent data, discard old
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent aae7c40 commit 36bbe99
File tree
2 files changed
+23
-19
lines changed- apps/sim/executor
- execution
- orchestrators
2 files changed
+23
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
708 | | - | |
| 709 | + | |
| 710 | + | |
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
511 | 513 | | |
512 | 514 | | |
513 | 515 | | |
| |||
522 | 524 | | |
523 | 525 | | |
524 | 526 | | |
525 | | - | |
526 | | - | |
527 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
0 commit comments