Commit 60a7679
committed
fix: fix sentinel bug in aprepare_kickoff, use _UNSET instead of None
The previous implementation used `None` as a sentinel to detect whether
the before-callback loop had started. But a callback can legitimately
return `None`, which would cause the next callback to receive the
pre-callback inputs instead of the callback's return value.
Introduces `_UNSET = object()` as a proper sentinel that no callback
can accidentally produce, eliminating the double-run bug identified in
the three-way comparison on crewAIInc#6482.1 parent 3cfba59 commit 60a7679
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
| |||
429 | 438 | | |
430 | 439 | | |
431 | 440 | | |
432 | | - | |
433 | | - | |
| 441 | + | |
434 | 442 | | |
435 | | - | |
| 443 | + | |
436 | 444 | | |
437 | 445 | | |
438 | 446 | | |
439 | 447 | | |
440 | | - | |
441 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
442 | 451 | | |
443 | 452 | | |
444 | 453 | | |
| |||
0 commit comments