refactor: centralize bootstrap dependency assembly

This commit is contained in:
leefer
2026-07-29 17:18:03 +08:00
parent 12c0f4777d
commit 3994387935
9 changed files with 216 additions and 51 deletions
+24
View File
@@ -0,0 +1,24 @@
# Stage 05: Bootstrap and Dependency Assembly
Date: 2026-07-29
## Result
- Environment and legacy LLM credential resolution moved to `backend/bootstrap/settings.py`.
- Encryption-key initialization remains behavior-compatible and server-side.
- Stable service construction moved to `backend/bootstrap/container.py`.
- `DashboardService` keeps its compatibility attributes but receives them from one application
container.
- The iFinD client is instantiated once and shared by chart services.
- HTTP routes, API payloads, background thread timing, database paths, and frontend assets are
unchanged.
## Transitional Boundary
Some methods still construct Tushare clients directly. Stage 06 introduces `DataGateway` and
migrates those provider creation paths without combining that work with bootstrap changes.
## Rollback
Reverting this stage restores inline service construction. No database or configuration
migration is required.