test(e2e): tolerate early runtime deps cleanup

This commit is contained in:
Vincent Koc
2026-05-02 19:23:01 -07:00
parent cb31616d88
commit 994bfc1cb9

View File

@@ -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),