fix(cron): treat zero sessionRetention as disabled instead of pruning all run sessions (#120213)

This commit is contained in:
zengLingbiao
2026-08-08 08:18:20 +08:00
committed by GitHub
parent 96a75be170
commit ae21eb7b93
9 changed files with 43 additions and 8 deletions
@@ -108,7 +108,7 @@ artifacts before importing.
Isolated cron runs create their own session entries/transcripts with dedicated retention:
- `cron.sessionRetention` (default `"24h"`) prunes old isolated cron run sessions from the store; `false` disables.
- `cron.sessionRetention` (default `"24h"`) prunes old isolated cron run sessions from the store; `false` or a zero duration such as `"0h"` disables.
- Run history keeps the newest 2000 terminal rows per cron job. Lost rows retain their 24-hour cleanup window.
When cron force-creates a new isolated run session, it sanitizes the previous `cron:<jobId>` session entry before writing the new row: it carries safe preferences (thinking/fast/verbose/reasoning settings, labels, display name) and explicit user-selected model/auth overrides, but drops ambient conversation context (channel/group routing, send/queue policy, elevation, origin, ACP runtime binding) so a fresh isolated run cannot inherit stale delivery or runtime authority from an older run.