+Call the existing apply_backend_resolution(os.environ) at module startup before settings-dependent imports. Preserve precedence: explicit CORTEX_MEMORY_STORE_BACKEND, then CORTEX_BACKEND alias, then non-empty DATABASE_URL or CORTEX_MEMORY_DATABASE_URL, then saved methodology/backend.json, otherwise existing automatic selection. Retain the existing blank DATABASE_URL normalization. Importing this entry point intentionally mutates the process environment when resolution requires it. Keep the file-wide Ruff suppression scoped to E402 only: the intervening resolver call makes fourteen pre-existing downstream imports trigger E402, as independently measured in the PR review; one file-level explanation records this shared ordering constraint instead of fourteen repeated annotations.
0 commit comments