You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposals/131-codebase-cleanliness-remediation-roadmap.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ Large modules make the code harder to reason about, harder to test in isolation,
69
69
### Fix steps
70
70
71
71
1.~~Split `frontend_multi_user/src/app.py` by concern into `auth`, `billing`, `admin`, `downloads`, `account`, and `plan_routes`.~~**Done** (PR #476): Split 3,857-line monolith into 6 Flask Blueprint modules + utils (app.py reduced to 1,441 lines). Follow-up fix: updated all `url_for()` calls in templates to use blueprint-prefixed endpoint names (`plan_routes.*`, `auth.*`, `downloads.*`).
72
-
2. Split `mcp_cloud/http_server.py` into `middleware`, `route_registration`, `tool_http_bridge`, and `server_boot`.
72
+
2.~~Split `mcp_cloud/http_server.py` into `middleware`, `route_registration`, `tool_http_bridge`, and `server_boot`.~~**Done**: Split 1,439-line monolith into 4 focused modules + re-export shim.
73
73
3. Convert `worker_plan/worker_plan_internal/plan/run_plan_pipeline.py` from a giant task registry file into a thin pipeline assembly module plus task-specific modules grouped by stage.
74
74
4. Extract reusable orchestration helpers from `worker_plan_database/app.py` into focused worker, billing, and queue modules.
75
75
5. Set an internal size target for service modules. As a starting rule, new files should stay below roughly 500 lines unless there is a strong reason not to.
@@ -182,7 +182,7 @@ The multi-user frontend handles auth, admin flows, billing, downloads, and user
182
182
### Phase 2: Split the Worst Offenders
183
183
184
184
1.~~Refactor `frontend_multi_user/src/app.py` first because it mixes the most distinct business concerns.~~**Done** (PR #476). Template `url_for()` references fixed to match new blueprint endpoints.
185
-
2. Refactor `mcp_cloud/http_server.py` second because it sits on a public protocol boundary.
185
+
2.~~Refactor `mcp_cloud/http_server.py` second because it sits on a public protocol boundary.~~**Done**.
186
186
3. Refactor `worker_plan_database/app.py` and `run_plan_pipeline.py` in smaller slices to avoid destabilizing the execution engine.
187
187
188
188
### Phase 3: Remove Operational Noise
@@ -210,7 +210,7 @@ This proposal integrates with existing PlanExe boundaries rather than fighting t
210
210
211
211
1. No production-facing Python module above 1,500 lines after the first cleanup wave.
212
212
2.~~`frontend_multi_user/src/app.py` reduced by at least 50% through route and helper extraction.~~**Done** (PR #476): Reduced by 63% (3,857 → 1,441 lines).
213
-
3.`mcp_cloud/http_server.py` reduced to a focused HTTP assembly module rather than a mixed implementation file.
213
+
3.~~`mcp_cloud/http_server.py` reduced to a focused HTTP assembly module rather than a mixed implementation file.~~**Done**: Split into `server_boot.py`, `middleware.py`, `tool_http_bridge.py`, `route_registration.py` + re-export shim.
214
214
4. Zero uncategorized top-level `print()` statements in production service modules.
215
215
5. Documented justification for all remaining `except Exception:` boundaries in service code.
216
216
6. New automated tests covering multi-user billing, retry, and download flows.
0 commit comments