Skip to content

[Enhancement]: Auto-fallback to SQLite for zero-config startup when embedded seekdb is unavailable (non-Linux / missing pylibseekdb) #992

@knqiufan

Description

@knqiufan

Description

PR #393 made embedded seekdb the zero-config default (DATABASE_PROVIDER=oceanbase, empty OCEANBASE_HOST./seekdb_data). This works on Linux where pylibseekdb is available, but on Windows/macOS the same path fails with pylibseekdb is not available (Linux only). powermem-server still starts and /api/v1/system/health returns healthy, while all memory APIs return 503 because MemoryService init fails — a confusing experience for Claude Code / VS Code / Dashboard users on non-Linux platforms.

Proposal: When storage is not explicitly configured, auto-select the default provider:

  • DATABASE_PROVIDER or OCEANBASE_HOST set → respect user config (unchanged).
  • Non-Linux → default to sqlite (SQLITE_PATH=./data/powermem_dev.db), log INFO.
  • Linux → probe pylibseekdb; if available keep embedded seekdb; otherwise fall back to sqlite with WARNING.

This completes PR #393's zero-config goal on cross-platform dev machines without changing the Linux default. Centralize logic in a shared helper (e.g. default_database_provider()). Workaround today: manual .env with DATABASE_PROVIDER=sqlite (see apps/claude-code-plugin/SETUP.md [E005]).

Willing to submit a PR after acceptance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions