From 7e84434ff6cf7d8aa41c4a17ead8a835bf474a99 Mon Sep 17 00:00:00 2001 From: archipelago Date: Tue, 16 Jun 2026 12:41:18 -0400 Subject: [PATCH] test(update): stage .download-complete marker in roundtrip test The #26 fix makes has_staged_update require the .download-complete marker, so the state self-heal treats a marker-less staging dir as a partial download and clears update_in_progress. The roundtrip test staged a binary file but not the marker, so it began failing. Write the marker to simulate a *complete* staged update. Co-Authored-By: Claude Opus 4.8 (1M context) --- core/archipelago/src/update.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/archipelago/src/update.rs b/core/archipelago/src/update.rs index fc476196..a55b67a0 100644 --- a/core/archipelago/src/update.rs +++ b/core/archipelago/src/update.rs @@ -1882,6 +1882,12 @@ mod tests { tokio::fs::write(staging.join("archipelago"), b"staged") .await .unwrap(); + // A *complete* staged update carries the marker; without it the state + // self-heal correctly treats this as a partial download and clears + // update_in_progress (see has_staged_update / #26). + tokio::fs::write(staging.join(STAGED_COMPLETE_MARKER), b"1") + .await + .unwrap(); let state = UpdateState { current_version: "1.0.0".to_string(), last_check: Some("2025-06-15T12:00:00Z".to_string()),