fix: preserve cron session transcript rotation#82200
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. at source level: the docs define Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this PR after maintainer review and CI, then close #82164 as fixed by the merged cron/session identity change. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the docs define Is this the best way to solve the issue? Yes: adopting the embedded runner's final session id/file at cron finalization is the narrowest maintainable fix, and carrying Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 29b5563ccda2. |
|
Landed via squash merge onto main.
Thanks @weissfl! |
* fix: preserve cron session transcript rotation * chore: refresh pr checks
* fix: preserve cron session transcript rotation * chore: refresh pr checks
* fix: preserve cron session transcript rotation * chore: refresh pr checks
* fix: preserve cron session transcript rotation * chore: refresh pr checks
Summary
Fixes #82164.
Verification
Real behavior proof
Behavior addressed: session-bound cron runs with transcript rotation now persist the rotated session id and session file before the next user turn.
Real environment tested: maintainer source checkout. Maintainer override applies because the exact regression path is covered with the cron runner and embedded runner test harness; no external chat credentials were exercised.
Exact steps or command run after this patch: node scripts/run-vitest.mjs src/cron/isolated-agent.session-identity.test.ts src/cron/isolated-agent/run-session-state.test.ts src/agents/pi-embedded-runner/run/helpers.test.ts
Evidence after fix: terminal output showed
Test Files 3 passed (3)andTests 19 passed (19)for the focused cron session identity, cron session-state, and embedded runner helper tests. Codex review then reportedcodex-review clean: no accepted/actionable findings reported.Observed result after fix: the persisted session store entry keeps
sessionIdas the rotated id andsessionFileas the rotated transcript for session-bound cron runs; embedded error metadata now also carries the active session file after transcript rotation.What was not tested: live scheduled run against a real external chat channel.