claude-memory/graph/workflows/pr-review-paper-dynasty-database46-centralize-logging-config-e5d04c.md

1.7 KiB

id type title tags importance confidence created updated
e5d04c92-8f16-44b4-a6f3-94317ea88758 workflow PR review: paper-dynasty-database#46 — centralize logging config in main.py
pr-reviewer
paper-dynasty-database
python
logging
fastapi
0.4 0.8 2026-03-04T00:19:08.984576+00:00 2026-03-04T00:19:08.984576+00:00

Review Summary

PR #46 — fix: centralize logging config in main.py (#26) Branch: ai/paper-dynasty-database#26 → next-release Verdict: APPROVED (posted as COMMENT — Gitea blocks self-approval)

Key Findings

What the PR does

  • Moves the single authoritative logging.basicConfig() to app/main.py, before any sub-module imports
  • Removes duplicate no-op basicConfig calls from db_engine.py, dependencies.py, and 30 router files in routers_v2/
  • Removes LOG_DATA dict and date/log_level locals from dependencies.py and db_engine.py
  • Fixes "WARN" string level → logging.WARNING constant (correctness improvement)

Verified correct

  • All 30 router files that keep import logging still use logging.* calls directly in handlers — no orphaned imports
  • Remaining imports in dependencies.py and db_engine.py all still have active uses after cleanup
  • basicConfig in main.py executes before db_engine and router modules are imported — correct ordering

Minor note (non-blocking)

  • Date format f"{datetime.now().year}-{datetime.now().month}-{datetime.now().day}" produces un-padded dates (e.g. 2026-3-3). Pre-existing behavior, not a regression.

Gitea Note

Gitea blocks APPROVED state on PRs where the reviewer is the PR author. Posted as COMMENT with explicit APPROVED verdict in body.