Wrapper health: unused `praisonai/ui/database_config.py` leaves the FORCE_SQLITE escape hatch wired to nothing
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read src/praisonai/praisonai/ui/database_config.py, its test at src/praisonai/tests/unit/test_database_config.py, and the UI database-selection path. First determine whether FORCE_SQLITE is still intended, then either remove the unused module and smoke script or wire the override into the selection path and add asserting tests. Done means the chosen behavior is connected or the dead code is removed, with tests matching that decision.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
src/praisonai/praisonai/ui/database_config.py (56 lines) is a self-contained helper module with no production consumers anywhere in the monorepo. Its three functions implement a FORCE_SQLITE environment-variable override for UI database selection, but nothing in praisonai, praisonai-code or praisonai-bot ever calls them — so the FORCE_SQLITE escape hatch is implemented but not connected to any code path.
This is a lightweight wrapper-health cleanup, not a feature cut: either the module is dead code to be removed, or the FORCE_SQLITE override it was meant to provide has regressed and should be re-wired.
Current behaviour
src/praisonai/praisonai/ui/database_config.pydefinesshould_force_sqlite(),get_database_url_with_sqlite_override()andget_database_config_for_sqlalchemy()(database_config.py:12,:22,:40).- The token
FORCE_SQLITEand all three function names appear in exactly two files acrosssrc/: this module and its own testsrc/praisonai/tests/unit/test_database_config.py. There are zero other references (verified by repository-wide grep, including dynamic/string import paths). src/praisonai/tests/unit/test_database_config.pyis aprint()-based__main__smoke script with no assertions, so it pins no behaviour (it is not a guard/ratchet test).- Context: the
FORCE_SQLITEhelper appears to originate from the fix for #335 ("Database Conflict When PraisonAI Detects Supabase/Postgres", now closed). In the current tree the override logic is no longer invoked, so a user settingFORCE_SQLITE=trueto avoid Supabase/Postgres auto-detection would see no effect from this module.
Why it matters
- Maintenance / duplication clarity: ~56 lines of public-looking utility (
praisonai.ui.database_config) carried with no caller invites confusion and accidental re-use of a dead path. - Possible silent capability regression: if the
FORCE_SQLITEescape hatch from #335 is still intended, it currently does nothing — worth a maintainer decision rather than leaving it ambiguous.
No import or hot-path cost (the module is never imported at runtime); the concern is purely structural.
Category
Dead code (with a possible regressed-feature angle)
Capability preserved
- No CLI command, YAML path, or Python API is removed.
praisonai.ui.database_confighas no live consumers, so removing it (or wiring it in) changes nothing user-facing today. - If the maintainer intent is to keep the
FORCE_SQLITEbehaviour, the fix is to re-wire it into the UI DB-resolution path rather than remove it — preserving the intended #335 escape hatch.
Proposed approach
Pick one, based on whether the FORCE_SQLITE override is still desired:
- If the override is obsolete: remove
ui/database_config.pytogether with its non-assertingtests/unit/test_database_config.py(nothing else references either). - If the override is still wanted: call
should_force_sqlite()/get_database_url_with_sqlite_override()from the actual UI database-selection code and replace the print-script with a real asserting unit test.
Either way the change is small and non-breaking.
Resolution sketch
# Option A — remove dead module + its non-test script (no consumers):
# git rm src/praisonai/praisonai/ui/database_config.py
# git rm src/praisonai/tests/unit/test_database_config.py
# Option B — if FORCE_SQLITE should stay live, wire it where the UI DB URL is resolved:
from praisonai.ui.database_config import get_database_url_with_sqlite_override
database_url = get_database_url_with_sqlite_override() # None => fall back to SQLite
# ...and add an asserting test (assert should_force_sqlite() is True when FORCE_SQLITE=true)
Layer placement
- Primary layer: wrapper (
praisonai/ui/) - Touches core/tools/plugins: none
- 3-way surface (CLI + YAML + Python): not applicable — internal utility with no exposed surface; preserved either way
Severity
Low — isolated, zero-consumer module; cleanup or a small re-wire, no blast radius.
Validation
- Repository-wide grep:
FORCE_SQLITE,should_force_sqlite,get_database_url_with_sqlite_override,get_database_config_for_sqlalchemyresolve only to the module and its own test. - The test contains no assertions, so it encodes no decision to preserve.
- Not import-time or hot-path code; no runtime regression from either option.
Keep unchanged
praisonai/storage/adapters (PostgreSQLStorageAdapter,DynamoDBStorageAdapter, etc.) — these are load-bearing:praisonaiagents/storage/backends.pymaps them by string topraisonai.storage. Do not treat them as dead.praisonai/persistence/factory and state adapters — config-gated, lazily imported.- All back-compat shims (
bots,gateway,deploy,cli/*) and theintegration/(UI host bootstrap + bridges) vsintegrations/(managed-agent/CLI backends) split — distinct concerns, both canonical.
- Lenguaje dominante
- Python
- Estrellas
- 9.3k
- Forks
- 1.5k
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 520
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MervinPraison/PraisonAI
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MervinPraison/PraisonAI#6710 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
claude
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
MervinPraison/PraisonAI#6707 ·
Los mantenedores suelen responder en 1 día
-
bug claude
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
MervinPraison/PraisonAI#6671 ·
Los mantenedores suelen responder en 1 día
-
Compaction budget regression fixture remains below budget with accurate tokenizationQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MervinPraison/PraisonAI#5418 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug claude documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MervinPraison/PraisonAI#5341 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de MervinPraison/PraisonAI
Issues similares
-
cognition
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
[Suggestion]: Geonode MCP ServerAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
collabnix/awesome-mcp-lists#433 ·
Los mantenedores suelen responder en 4 días
-
CrossEntropyFilter raises on zero probabilities and single-class resultsPosiblemente ocupada @NopeCharon la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
datajoint/datajoint-python#1703 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Archmonger/ServeStatic#129 ·