From b9f107af81d6324c2cac6007a10f95921c1a920b Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 3 Mar 2026 18:19:09 -0600 Subject: [PATCH] =?UTF-8?q?store:=20PR=20review:=20paper-dynasty-database#?= =?UTF-8?q?46=20=E2=80=94=20centralize=20logging=20config=20in=20main.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...base46-centralize-logging-config-e5d04c.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 graph/workflows/pr-review-paper-dynasty-database46-centralize-logging-config-e5d04c.md diff --git a/graph/workflows/pr-review-paper-dynasty-database46-centralize-logging-config-e5d04c.md b/graph/workflows/pr-review-paper-dynasty-database46-centralize-logging-config-e5d04c.md new file mode 100644 index 00000000000..1391343c595 --- /dev/null +++ b/graph/workflows/pr-review-paper-dynasty-database46-centralize-logging-config-e5d04c.md @@ -0,0 +1,35 @@ +--- +id: e5d04c92-8f16-44b4-a6f3-94317ea88758 +type: workflow +title: "PR review: paper-dynasty-database#46 — centralize logging config in main.py" +tags: [pr-reviewer, paper-dynasty-database, python, logging, fastapi] +importance: 0.4 +confidence: 0.8 +created: "2026-03-04T00:19:08.984576+00:00" +updated: "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.