From 70aa740b370058e8dfa0f301b71ae44aa3fb7e7f Mon Sep 17 00:00:00 2001 From: acamilo Date: Tue, 29 Sep 2026 18:45:05 +0000 Subject: [PATCH] reset: a sugar journal that cannot be cleared is a warning once the reset is complete review-state-02 N3: the error made fly-reset-to-milestone exit non-zero after a finished reset, so fly-loop-reset reported it failed and the stream's splash said so. --- services/flysim/crates/flysim/src/reset.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/services/flysim/crates/flysim/src/reset.rs b/services/flysim/crates/flysim/src/reset.rs index c142541..b535256 100644 --- a/services/flysim/crates/flysim/src/reset.rs +++ b/services/flysim/crates/flysim/src/reset.rs @@ -165,10 +165,16 @@ pub fn reset_to_milestone( memory-only and are reset by stopping flysim)" )); - // 6. The sugar journal, copied aside in step 1. - let journals = crate::journal::clear(hot_dir) - .with_context(|| format!("clearing the sugar journal in {}", hot_dir.display()))?; - report.push(format!("cleared the sugar journal: {journals} files removed")); + // 6. The sugar journal, copied aside in step 1. The reset itself is complete by now, so a + // journal that cannot be cleared is reported, not an error: an error here made + // fly-loop-reset call a finished reset a failure (review-state-02 N3). + match crate::journal::clear(hot_dir) { + Ok(journals) => report.push(format!("cleared the sugar journal: {journals} files removed")), + Err(error) => report.push(format!( + "WARNING: the reset is complete but the sugar journal in {} was not cleared: {error:#}", + hot_dir.display() + )), + } Ok(report) }