From a9681cc98a1c03a16970565f1c6bec87571b903c Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 2 Mar 2026 19:11:07 -0600 Subject: [PATCH] =?UTF-8?q?store:=20PR=20review:=20major-domo-database#40?= =?UTF-8?q?=20=E2=80=94=20raise=20HTTPException=20in=20recalculate=5Fstand?= =?UTF-8?q?ings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e40-raise-httpexception-in-recal-9dc591.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 graph/workflows/pr-review-major-domo-database40-raise-httpexception-in-recal-9dc591.md diff --git a/graph/workflows/pr-review-major-domo-database40-raise-httpexception-in-recal-9dc591.md b/graph/workflows/pr-review-major-domo-database40-raise-httpexception-in-recal-9dc591.md new file mode 100644 index 00000000000..6ec2d75141a --- /dev/null +++ b/graph/workflows/pr-review-major-domo-database40-raise-httpexception-in-recal-9dc591.md @@ -0,0 +1,32 @@ +--- +id: 9dc591ce-c353-4998-889a-40770f77946c +type: workflow +title: "PR review: major-domo-database#40 — raise HTTPException in recalculate_standings" +tags: [pr-reviewer, major-domo-database, fastapi, python, peewee, standings, bug-fix] +importance: 0.4 +confidence: 0.8 +created: "2026-03-03T01:11:07.751846+00:00" +updated: "2026-03-03T01:11:07.751846+00:00" +--- + +## PR Review: major-domo-database#40 + +**Verdict**: APPROVED (posted as COMMENT — Gitea blocks self-approval) + +**Branch**: `ai/major-domo-database-23` → `main` + +### Key Findings + +1. **Primary fix correct** (`standings.py`): Missing `raise` before `HTTPException` in `recalculate_standings`. Without it, error code 69 from `Standings.recalculate()` was silently swallowed and HTTP 200 returned. One-word fix, unambiguous. + +2. **Undocumented secondary fix** (`stratgame.py`): In `get_games()`, both `order_by()` calls were not assigned back to `all_games`. Peewee's `order_by()` returns a new query (immutable pattern) — so sorting was silently ignored. The PR correctly fixes this with `all_games = all_games.order_by(...)` but the PR description only mentions `standings.py`. + +3. **Extensive reformatting** in both files: single → double quotes, line wrapping. Cosmetic but consistent. + +### Patterns Noted +- Peewee ORM: `order_by()` does NOT mutate — must assign result back +- FastAPI: `HTTPException` must be `raise`d — constructing without raising is a silent no-op (Python doesn't warn on this) + +### Files Reviewed +- `app/routers_v3/standings.py` +- `app/routers_v3/stratgame.py`