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

2.2 KiB

id type title tags importance confidence created updated relations
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:09.401178+00:00
target type direction strength edge_id
947fe7fd-b23c-4e46-8065-51c0519f2756 RELATED_TO outgoing 0.73 7e73b462-12c0-4ffb-9729-0b93a8bd24cc
target type direction strength edge_id
04e57a23-0a20-49d6-8c5a-2fa5fc4e55b5 RELATED_TO outgoing 0.73 987e2566-a9ab-4dcb-b162-3c2285ef2686
target type direction strength edge_id
d36a86f0-8183-4c94-8d63-0be65d3fd63a RELATED_TO outgoing 0.73 727f8ef1-ecc0-4804-a663-510f4ac16d15

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.