docs: update decoupling report with deletion commit details

This commit is contained in:
2026-05-13 16:05:57 -04:00
parent b2fdca0c3d
commit ae063c77ed
+33 -8
View File
@@ -58,13 +58,38 @@ Timeline of discovery:
- `sloppy.py` - Added AI_SERVER_ENABLED routing - `sloppy.py` - Added AI_SERVER_ENABLED routing
- `src/app_controller.py` - Lazy rag_engine import, async RAG init - `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 | File | Size | Purpose | Deleted |
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 | `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 ## Current State
@@ -78,11 +103,11 @@ After reverting the decoupling attempt:
The application now starts quickly with RAG loading in the background. 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 3. **Keep async RAG init:** The background thread for RAG is a good pattern and should remain