refactor: remove orphaned v1 web layer (routers + services)#597
Conversation
These were never mounted by ui/server.py (which mounts only v2 routers) and had zero live importers — pure dead code. Deleted: - codeframe/ui/services/ (agent_service, review_service) - 18 non-_v2 routers: agents, blockers, chat, checkpoints, context, discovery, git, lint, metrics, projects, prs, quality_gates, review, schedule, session, tasks, templates, websocket - codeframe/ui/routers/projects_v2.py (defined but never mounted) - 12 test files that exercised those deleted routers/services - stale collect_ignore entries for the deleted tests Live equivalents (pr_v2, discovery_v2, tasks_v2, etc.) and their tests are untouched. Verified: app boots (TestClient lifespan, 136 routes), and the full v2 suite passes (2948 passed, 0 failed). Part of the v1 removal.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (35)
💤 Files with no reviewable changes (35)
WalkthroughThis PR removes the entire FastAPI router layer ( ChangesAPI Router and Service Cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Review — PR #597: Remove orphaned v1 web layerSummary: Pure deletion PR removing ~14.5k lines of dead v1 routers, services, and tests. No new logic introduced. Verification of ClaimsI spot-checked the key claims in the PR description:
One Observation (non-blocking)
VerdictThis is a well-scoped, safe deletion. The staged approach (PR 2 of 4) is the right call — deleting the web layer separately from the domain layer makes each step reviewable and independently verifiable. ✅ LGTM — no issues to resolve before merge. |
## Summary Final PR (3 of 3) for #599. Renames the slim control-plane store to its real role, refreshes CLAUDE.md, and removes the last v1 stragglers. - git mv codeframe/persistence -> codeframe/platform_store; updated all 31 imports across codeframe/, tests/, scripts/, plus CI yaml + active docs (CONTRIBUTING.md, PRD.md, TESTING.md) and the embedded Python in tests/e2e/global-setup.ts (caught by codex). - CLAUDE.md: dropped stale codeframe/server/ references (Legacy rule + repo- structure tree line); refreshed tests/agents/ note now that only dependency_resolver remains. - Stragglers: removed orphan sample_project_config fixture, deleted the 5 remaining #597-era v1 tests, un-ignored and fixed tests/api/test_health_endpoint.py (live /health coverage restored), emptied root collect_ignore. - Pre-existing PR2 leftovers caught by CodeRabbit: deleted tests/blockers/test_blocker_expiration_simple.py and tests/lib/test_metrics_tracker.py (both referenced removed Database methods / dropped tables; both deselected by -m v2, so prior CI green was misleading). ## Validation - Tests: pytest -m v2 green (2824 passed); Backend + Frontend CI green - Lint/Type: ruff + mypy clean (181 files); CI Code Quality green - Collect: pytest --collect-only clean (3424); zero active references to codeframe.persistence remain - Boot: TestClient /health -> 200 - Cross-family review: codex (1 P2 fixed) + CodeRabbit (2 inline Major fixed) - claude-bot advisory: 4 minor (3 fixed, 1 partly rebutted -- the flagged "dead" Database guard in tests/ui/conftest.py is actually used by the running_server fixture; simplified to a direct import) - Demo: all 12 PR3 + 9 cumulative #599 acceptance criteria verified ## Cumulative -- #599 fully complete across PRs #602 + #603 + #604 - [x] No legacy multi-agent classes remain (PR1) - [x] core/project.py + dead dirs removed (PR1) - [x] Database exposes only control-plane methods (PR2) - [x] persistence -> platform_store rename + CLAUDE.md (PR3) - [x] codeframe serve boots (every PR) - [x] pytest --collect-only clean; pytest -m v2 green (every PR) - [x] cf --help + golden path; ruff + mypy clean (every PR) - [x] Plan engine kept (verified live via engine_registry -> BuiltinPlanAdapter) Closes #599.
Summary
Removes the legacy v1 web layer — code that
ui/server.pynever mounts (it mounts only*_v2routers) and that has zero live importers. Pure dead code.This is PR 2 of the v1 removal (follows #596, which slimmed the control-plane schema and unblocked
codeframe serve).Deleted
codeframe/ui/services/—agent_service.py,review_service.py_v2routers:agents, blockers, chat, checkpoints, context, discovery, git, lint, metrics, projects, prs, quality_gates, review, schedule, session, tasks, templates, websocketcodeframe/ui/routers/projects_v2.py— defined but never mountedcollect_ignoreentries intests/ui/conftest.pyfor the deleted tests(~14.5k lines removed.)
Not touched
Live v2 equivalents and their tests stay:
pr_v2,discovery_v2,tasks_v2,blockers_v2,review_v2,schedule_v2,templates_v2,checkpoints_v2,git_v2, plussession_chat_ws,terminal_ws,streaming_v2. Nocodeframe/server/exists (already gone; CLAUDE.md's reference is stale and will be corrected in the final docs pass).Validation
codeframe/(non-test).TestClient(app)lifespan →/health200, 136 routes mounted.pytest tests/ -m v2 --collect-only) clean — 0 errors.uv run pytest -m v2→ 2948 passed, 0 failed.Remaining v1 removal (follow-ups)
agents/classes (keepdependency_resolver), deadcore//lib/modules, the deadDatabasemethods + their (non-v2) tests, dead top-level dirs.codeframe/persistence/→platform_store/; refresh CLAUDE.md repo structure.Kept (live, not v1): E2B cloud exec, worktree sandbox,
cf dashboardTUI, slim global control-plane DB.Summary by CodeRabbit