Commit 72aa3f1
fix(cron): allow silent scheduled runs (#95725)
* fix(cron): pass allowEmptyAssistantReplyAsSilent from cron executor
Intentionally-silent cron jobs (alert watchers that say nothing unless there
is something to report) fail with FailoverError "empty_response" because the
allowEmptyAssistantReplyAsSilent flag is only computed for DM/group chat
contexts — the cron executor never sets it.
Instead of patching the shared CLI runner with a lane substring heuristic,
set allowEmptyAssistantReplyAsSilent: true at the cron executor level for
both the CLI and embedded runner paths. This:
- Owns the silent-empty policy at the correct boundary (the cron executor)
- Covers both runner paths uniformly
- Does not broaden the shared CLI empty-response guard for non-cron callers
Fixes #94224
Co-Authored-By: Claude <[email protected]>
* test(cron): add regression test for allowEmptyAssistantReplyAsSilent flag propagation
Verify that the cron executor passes allowEmptyAssistantReplyAsSilent: true
to both runCliAgent and runEmbeddedAgent calls. The embedded test uses
mockTexts: [""] to truly exercise empty output, and the CLI test mocks
runCliAgent with empty payload text — both scenarios require the flag to
avoid empty_response errors on intentionally-silent cron watchers.
Co-Authored-By: Claude <[email protected]>
* refactor(cron): centralize silent reply policy
Reuse existing executor suites and keep CLI and embedded cron runners aligned.
Co-authored-by: 刘镇业 0668001127 <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>1 parent ae12413 commit 72aa3f1
3 files changed
Lines changed: 7 additions & 0 deletions
File tree
- src/cron/isolated-agent
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| 432 | + | |
430 | 433 | | |
431 | 434 | | |
432 | 435 | | |
| |||
541 | 544 | | |
542 | 545 | | |
543 | 546 | | |
| 547 | + | |
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
758 | 759 | | |
759 | 760 | | |
760 | 761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
0 commit comments