feat: make rollout recorder reliable against errors (#17214)

The rollout writer now keeps an owned/monitored task handle, returns
real Result acks for flush/persist/shutdown, retries failed flushes by
reopening the rollout file, and keeps buffered items until they are
successfully written. Session flushes are now real durability barriers
for fork/rollback/read-after-write paths, while turn completion surfaces
a warning if the rollout still cannot be saved after recovery.
This commit is contained in:
jif-oai authored and GitHub committed 2026-04-10 14:12:33 +01:00
1 parent 085ffb4456
commit 8035cb03f1
10 files changed
+536 -191

No files matched your search

+1 -1
View File
@@ -564,7 +564,7 @@ async fn append_guardian_followup_reminder(review_session: &GuardianReviewSessio
async fn load_rollout_items_for_fork(
session: &Session,
) -> anyhow::Result<Option<Vec<RolloutItem>>> {
session.flush_rollout().await;
session.flush_rollout().await?;
let Some(rollout_path) = session.current_rollout_path().await else {
return Ok(None);
};