Monorepo cleanup Phase 2B: traffic review and removal of legacy routes and pages
Author: Git-on-my-levelCreated Sep 28, 2026Updated Sep 28, 2026
Labelsrefactorbackendtech debt
Why
#12697 removed about 63k lines of dead code (phases 0/1/R) and added dead-code and duplicate-route ratchets. The rest are legacy compatibility routes and pages that can go only after traffic shows no external caller. Removing them shrinks the surface the next platform has to port.
Candidates (all still present on main)
| ID | Candidate | Location |
|---|---|---|
| BRT-1 | v1 chat duplicates: /v1/files, /v1/messages, /v1/messages/{id}/report, /v1/initial-message |
backend/routers/chat.py, under the "CLEANUP: Remove after new app goes to prod" marker |
| BRT-7 | POST /v1/sync-local-files |
backend/routers/sync.py. Recently patched (#15227, #15964), so it probably still has callers. |
| BRT-3 | advice and focus_sessions routers |
mounted in backend/main.py. Open PR #19336 is hardening focus sessions; coordinate before deleting. |
| BRT-4 | DELETE /v1/joan/{id}/followup-question |
backend/routers/users.py |
| BRT-6 | /appcast.xml, /updates/latest, /download |
desktop_tts_updates.py (old Sparkle clients) |
| BRT-5 | 130 desktop 410 tombstones | desktop backend. Needs an expiry date; the parity test pins 130. |
| WEB-1/4 | web /my-apps, /dreamforce, plus the trends components; routers/trends.py and utils/llm/trends.py |
web app and backend |
| 2E | plugins_results and memory_id field renames |
open PRs #18667 and #18653 do this without a client-version floor; coordinate |
Acceptance criteria
- A maintainer with production log access runs the queries and posts aggregate counts only on this issue. The handoffee writes the query spec. Per path, over ≥30 days: request count, distinct callers, client version or user-agent family, status codes, last-seen date. No user identifiers anywhere.
- A decision per path: delete, or keep with a written sunset date. The default bar is zero callers in 30 days.
/v1/sync-local-filesand the field renames also need a minimum supported client version before removal. - Deletion PRs update
route_policy_legacy_missing_routes.txt, the OpenAPI output and generated clients, and the tombstone parity test, and pass the dead-code and route ratchets. - Coordinate with #19336, #18667 and #18653.
Prerequisites
A task worktree with the repo's standard make setup and preflight. The handoffee needs no production access; a maintainer runs the log queries.
Source: BasedHardware/omi