From ae063c77ed264f8f03616abe886f5fdc69680a26 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 13 May 2026 16:05:57 -0400 Subject: [PATCH] docs: update decoupling report with deletion commit details --- docs/reports/ai_decoupling_revert_report.md | 41 +++++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/docs/reports/ai_decoupling_revert_report.md b/docs/reports/ai_decoupling_revert_report.md index 078da870..8e800999 100644 --- a/docs/reports/ai_decoupling_revert_report.md +++ b/docs/reports/ai_decoupling_revert_report.md @@ -58,13 +58,38 @@ Timeline of discovery: - `sloppy.py` - Added AI_SERVER_ENABLED routing - `src/app_controller.py` - Lazy rag_engine import, async RAG init -## Files That Should Be Removed/Restored +## Files That Were Deleted -The following changes represent incomplete decoupling that should be cleaned up: +The following files were created during the attempt and subsequently deleted: -1. `src/ai_client_stub.py` - Should be evaluated for deletion if AI server is not implemented -2. `src/ai_client_proxy.py` - Same as above -3. Environment variable `AI_SERVER_ENABLED` in `sloppy.py` - No longer needed if decoupling is removed +| File | Size | Purpose | Deleted | +|------|------|---------|---------| +| `src/ai_client_stub.py` | 14KB | Lightweight stub module for routing AI calls | ✅ (commit b2fdca0c) | +| `src/ai_client_proxy.py` | 3.6KB | Proxy client for spawning AI server subprocess | ✅ (commit b2fdca0c) | + +## Cleanup Commits + +### Commit b2fdca0c (2026-05-13) +``` +remove(ai_client): delete unused stub and proxy files + +Deleted: +- src/ai_client_stub.py +- src/ai_client_proxy.py + +Fixed test imports to use ai_client instead of ai_client_stub. +``` + +### Commit 4025a713 (2026-05-13) +``` +revert(ai_client): remove incomplete decoupling, restore clean startup + +The AI client decoupling was never properly implemented and added +unnecessary complexity. The actual startup bottleneck was RAG initialization +which is now handled via async initialization. + +Report written to docs/reports/ai_decoupling_revert_report.md +``` ## Current State @@ -78,11 +103,11 @@ After reverting the decoupling attempt: The application now starts quickly with RAG loading in the background. -## Recommendations +## Recommendations (Completed) -1. **If AI server is not implemented:** Remove `ai_client_stub.py`, `ai_client_proxy.py`, and clean up `sloppy.py` +1. ✅ **Cleanup done:** `ai_client_stub.py`, `ai_client_proxy.py` deleted, `sloppy.py` restored -2. **If AI server is needed:** Implement it properly as a separate concern, not as a module replacement hack +2. **If AI server is needed in future:** Implement properly as a separate concern, not as a module replacement hack 3. **Keep async RAG init:** The background thread for RAG is a good pattern and should remain