--- id: 947fe7fd-b23c-4e46-8065-51c0519f2756 type: fix title: "Fix: Remove debug print(req.scope) from paper-dynasty-database get_docs route" tags: [paper-dynasty, fastapi, python, debug-cleanup, tech-debt] importance: 0.4 confidence: 0.8 created: "2026-03-03T04:36:40.503397+00:00" updated: "2026-03-04T00:19:09.334832+00:00" relations: - target: c4e8403a-a4bb-4606-bca5-8d26fa8988cf type: RELATED_TO direction: outgoing strength: 0.64 edge_id: 1f9c6777-1074-4d97-a31d-c4e16c74304b - target: 3e5fe8fc-59df-4874-b680-7c26d602a758 type: RELATED_TO direction: outgoing strength: 0.58 edge_id: 1a73e109-3e2f-4093-a64e-117a2d8ef019 - target: 28217f02-2f47-4231-b785-b2c582ce52ab type: RELATED_TO direction: outgoing strength: 0.58 edge_id: 2935b4d9-d5a4-4a37-9870-7cc5e7d2a52b - target: c29e169a-896c-4b80-9b69-22c2880d61d7 type: RELATED_TO direction: incoming strength: 0.84 edge_id: d23b14a5-0995-4353-903e-3631bc9d0888 - target: 8a4ae0ed-5bac-459b-bdd8-d3075bfc108d type: RELATED_TO direction: incoming strength: 0.68 edge_id: a4562549-7763-4d02-bb47-cb58024672d0 - target: c9d70b95-e7af-44e9-bfe9-e57d59f21b48 type: RELATED_TO direction: incoming strength: 0.9 edge_id: a24a459a-f5b8-4af7-9d1d-08e9948f2799 - target: e5d04c92-8f16-44b4-a6f3-94317ea88758 type: RELATED_TO direction: incoming strength: 0.73 edge_id: 7e73b462-12c0-4ffb-9729-0b93a8bd24cc --- ## Problem `app/main.py:56` in paper-dynasty-database had `print(req.scope)` inside the `get_docs` FastAPI route. This logged the full ASGI request scope dict to stdout on every `/api/docs` page load — debug code left in production. ## Fix Removed the single `print(req.scope)` line. The route still uses `req.scope.get('root_path')` for the openapi URL — only the debug print was removed. ## Files Changed - `app/main.py` — removed line 56 `print(req.scope)` ## Notes - Linter (ruff/black) auto-reformatted the file on save: import reflow, single→double quotes, trailing commas. Functional diff is just the removed print. - PR #32: https://git.manticorum.com/cal/paper-dynasty-database/pulls/32