From 994bfc1cb9347646614e77a1da3c58a536415783 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 2 May 2026 19:23:01 -0700 Subject: [PATCH] test(e2e): tolerate early runtime deps cleanup --- scripts/e2e/lib/upgrade-survivor/assertions.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/e2e/lib/upgrade-survivor/assertions.mjs b/scripts/e2e/lib/upgrade-survivor/assertions.mjs index e25e2dbb7e7..7555be70f7a 100644 --- a/scripts/e2e/lib/upgrade-survivor/assertions.mjs +++ b/scripts/e2e/lib/upgrade-survivor/assertions.mjs @@ -337,10 +337,12 @@ function assertStateSurvived() { const stage = process.env.OPENCLAW_UPGRADE_SURVIVOR_ASSERT_STAGE || "survival"; const legacyRuntimeRoot = path.join(stateDir, "plugin-runtime-deps"); if (stage === "baseline") { - assert( - fs.existsSync(path.join(legacyRuntimeRoot, "discord")), - "legacy plugin runtime deps root missing before doctor cleanup", - ); + if (fs.existsSync(legacyRuntimeRoot)) { + assert( + fs.existsSync(path.join(legacyRuntimeRoot, "discord")), + "legacy plugin runtime deps root exists but discord debris is missing before doctor cleanup", + ); + } } else { assert( !fs.existsSync(legacyRuntimeRoot),