Skip to content

fix(db): require explicit database configuration - #119

Merged
null-jj merged 2 commits into
mainfrom
fix/explicit-database-configuration
Sep 9, 2026
Merged

null-jj merged 2 commits into
mainfrom
fix/explicit-database-configuration

Conversation

@null-jj

@null-jj null-jj commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

CRM previously selected memory storage when DATABASE_URL was absent, PostgreSQL clients could infer a database target, and Compose/CI supplied fixed connection credentials. Require an explicit PostgreSQL URL with a host and database name, including multi-host URLs, and fail before database commands start when configuration is missing.

Local database commands load the ignored root .env without overriding supplied environment values; standalone CLI commands load the invoking directory's .env. Database CI jobs use the configured GitHub ci environment with DATABASE_URL/POSTGRES_PASSWORD secrets and POSTGRES_USER/POSTGRES_DB variables. Compose requires its URL and password. CRM memory storage is available only through an explicit test-only switch.

Compatibility: local users must populate DATABASE_URL; Compose users must also supply FRAMEKIT_POSTGRES_PASSWORD. Fork CI runs need a maintainer-controlled environment with the required secrets. No credentials are committed.

Validation: lint, workspace typechecks, workspace tests, unit coverage, and workspace build; 40 PostgreSQL integration tests; 10 Chromium/Firefox full-stack browser tests; built-server smoke and failure-cleanup checks; missing-URL rejection in the command runner and Compose. All 21 hosted checks passed on commit 87ce481, including workflow/environment wiring, both PostgreSQL matrix entries, browser suites, CodeQL, and dependency audit.

Realtime delivery now sorts by the bigint source column instead of its projected text alias. A forced batch across a decimal boundary reproduces duplicate/out-of-order delivery before the fix and passes afterward. PostgreSQL service coverage passes all 42 tests and its thresholds. Frontend browser fixtures use the built server with explicit test-only memory storage instead of an implicit development fallback; hosted CI passed with this fixture change.

The older GitRoll report's database credential findings are addressed here. Its sorting, regex, and logout-guard warnings did not reproduce as current bugs; unrelated maintainability refactors are outside this change.

@null-jj
null-jj merged commit 94da25f into main Sep 9, 2026
21 checks passed

This branch was successfully deployed

1 active deployment
ci — 87ce4818 Deployed Sep 9, 2026 by null-jj via service-integration (16, 7) #394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant