Deliver BAT-003: daemon .env loading (REQ-010, minor-change)

DaemonConfig.from_env() now best-effort loads a .env file (find_dotenv
usecwd, load_dotenv override=False) so operators can manage daemon env
vars via .env, with real OS env taking precedence. Add python-dotenv
dependency, gitignore .env, ship .env.example, and add config tests
(load / OS-env precedence / absence regression / missing-DSN guard).

Verification: 78 passed, ruff clean, .env ignored + .env.example tracked,
and a .env-only DaemonConfig smoke. Processed via the minor-change fast
path: REQ-010 (Configuration) -> Implemented, BAT-003 (batch-lite,
no design) -> release-candidate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-04 14:56:42 +09:00
co-authored by Claude Opus 4.8
parent a4e263c8e7
commit 575ba9f513
13 changed files with 346 additions and 5 deletions
+1
View File
@@ -7,6 +7,7 @@ dependencies = [
"fastapi>=0.110",
"uvicorn>=0.29",
"psycopg[binary]>=3.1",
"python-dotenv>=1.0",
]
[project.optional-dependencies]