Commit 6042b2c
committed
fix: handle TOCTOU race in list_runs state file read
Remove exists() check and wrap open/load in try/except to handle the
case where state.json is deleted between the check and open. A missing
or corrupt state file now skips that run instead of crashing the
entire list_runs operation.1 parent be33d2a commit 6042b2c
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1582 | 1582 | | |
1583 | 1583 | | |
1584 | 1584 | | |
1585 | | - | |
| 1585 | + | |
1586 | 1586 | | |
1587 | 1587 | | |
1588 | 1588 | | |
| 1589 | + | |
| 1590 | + | |
1589 | 1591 | | |
1590 | 1592 | | |
1591 | 1593 | | |
| |||
0 commit comments