store: Cross-cutting code quality anti-patterns in Major Domo and Paper Dynasty repos
This commit is contained in:
parent
deaeeffbde
commit
c0075412d8
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
id: 803b3f29-f38f-4739-aa09-1d1db5e42eb3
|
||||||
|
type: insight
|
||||||
|
title: "Cross-cutting code quality anti-patterns in Major Domo and Paper Dynasty repos"
|
||||||
|
tags: [major-domo, paper-dynasty, code-quality, security, patterns, homelab]
|
||||||
|
importance: 0.6
|
||||||
|
confidence: 0.8
|
||||||
|
created: "2026-02-20T06:57:40.762074+00:00"
|
||||||
|
updated: "2026-02-20T06:57:40.762074+00:00"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Recurring Code Quality Issues Across MD + PD Projects
|
||||||
|
|
||||||
|
## Context
|
||||||
|
Discovered during a full audit of all 5 active repos (major-domo-v2, major-domo-database, paper-dynasty-discord, paper-dynasty-database, paper-dynasty-card-creation).
|
||||||
|
|
||||||
|
## Anti-Patterns Found in Multiple Repos
|
||||||
|
|
||||||
|
### Security (Critical)
|
||||||
|
- **Hardcoded secrets** — API tokens, webhook URLs, Supabase JWTs committed to git in: MD database, PD card-creation, PD bot
|
||||||
|
- **Bearer tokens logged in plaintext** on auth failures in both database projects
|
||||||
|
|
||||||
|
### Error Handling
|
||||||
|
- **Bare `except:` or broad `except Exception:`** blocks swallowing errors — present in all 5 repos
|
||||||
|
|
||||||
|
### Debug Artifacts
|
||||||
|
- **`print()` statements** left in production code — MD database, PD database, PD bot
|
||||||
|
|
||||||
|
### Database / Performance
|
||||||
|
- **Manual `db.close()`** connection management instead of middleware/context managers — both database projects
|
||||||
|
- **N+1 query patterns** — both database APIs
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
- **PD database has zero tests**
|
||||||
|
- **PD card-creation tests always pass** without actually running (broken test setup)
|
||||||
|
|
||||||
|
## Priority Guidance
|
||||||
|
When working on any of these repos, treat hardcoded secrets and bare excepts as first-priority items. These are cross-cutting concerns that apply to all projects in this ecosystem.
|
||||||
Loading…
Reference in New Issue
Block a user