test(openclaw): add tests for SQLite resilience and export config/provider for testability

Add 10 tests covering disableHistory config passthrough, initPromise
retry after failure, graceful SQLite fallback, and PlatformProvider
retry. Export mem0ConfigSchema and createProvider for test access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
utkarsh240799
2026-03-15 01:06:12 +05:30
co-authored by Claude Opus 4.6
parent 5ae627b51a
commit 630d44c634
2 changed files with 290 additions and 2 deletions
+2 -2
View File
@@ -549,7 +549,7 @@ function assertAllowedKeys(
throw new Error(`${label} has unknown keys: ${unknown.join(", ")}`);
}
const mem0ConfigSchema = {
export const mem0ConfigSchema = {
parse(value: unknown): Mem0Config {
if (!value || typeof value !== "object" || Array.isArray(value)) {
throw new Error("openclaw-mem0 config required");
@@ -615,7 +615,7 @@ const mem0ConfigSchema = {
// Provider Factory
// ============================================================================
function createProvider(
export function createProvider(
cfg: Mem0Config,
api: OpenClawPluginApi,
): Mem0Provider {