fix(plugins): preserve install index state across failures (#119228)

* fix(plugins): preserve install index policy config

* fix(plugins): restore complete install index state

* fix(plugins): fence install index rollback

* fix(plugins): fence generic install index rollback

* fix(plugins): keep lifecycle lease context private

* test(cli): align plugin index rollback mocks

* test(plugins): enforce index rollback receipts

* fix(plugins): serialize install rollback with config commit

* test(plugins): keep legacy index writer mock private
This commit is contained in:
Vincent Koc
2026-08-05 01:04:17 +08:00
committed by GitHub
parent bfba83956f
commit ef11eae39b
17 changed files with 1314 additions and 242 deletions
+5 -5
View File
@@ -40,7 +40,7 @@ import {
runtimeErrors,
runtimeLogs,
writeConfigFile,
writePersistedInstalledPluginIndexInstallRecords,
writePersistedInstalledPluginIndexInstallRecordsWithLease,
} from "./plugins-cli-test-helpers.js";
const CLI_STATE_ROOT = "/tmp/openclaw-state";
@@ -430,10 +430,10 @@ function hookNpmInstallCall(callIndex = 0): PluginInstallCall {
}
function persistedInstallRecords(callIndex = 0): Record<string, PersistedInstallRecord> {
return mockCallArg(writePersistedInstalledPluginIndexInstallRecords, callIndex) as Record<
string,
PersistedInstallRecord
>;
return mockCallArg(
writePersistedInstalledPluginIndexInstallRecordsWithLease,
callIndex,
) as Record<string, PersistedInstallRecord>;
}
function persistedInstallRecord(pluginId: string, callIndex = 0): PersistedInstallRecord {