mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-19 17:11:42 -06:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user