# Tech Debt Status — clewso

**Status:** ✅ Alpha-ready
**Last Major Audit:** 2026-02-09
**Archived Report:** [docs/archive/TECH_DEBT_2026-02.md](./docs/archive/TECH_DEBT_2026-02.md)

---

## Summary

All critical and high-priority tech debt has been resolved. The engine is now **Lint Clean** (Ruff) and ready for alpha deployment.

### What Was Fixed (Feb 7-9, 2026)

**Critical (100% complete):**
- ✅ SEC-1: Input validation on API parameters
- ✅ SEC-2: Cypher injection protection
- ✅ SEC-3: Error handling improvements
- ✅ DEP-1: Missing runtime dependencies

**High Priority (100% complete):**
- ✅ QUAL-1: Hash-embedding logic unified
- ✅ QUAL-2: Neo4j variable-depth traversal
- ✅ QUAL-3: MCP server refactored
- ✅ DEP-2: Pydantic V2 migration

**Medium/Low (95% complete):**
- ✅ ERR-1: Exception handling standardized
- ✅ CONF-1: Credentials removed from defaults
- ✅ CONF-2: Embedding dimensions centralized
- ✅ CONF-3: Timeouts configurable
- ✅ CONF-4: Docker image pinned
- ✅ STYLE-1: Inline imports moved
- ✅ STYLE-2: Type checks in TYPE_CHECKING blocks
- ✅ QUAL-5: VectorStore nomenclature standardized
- ✅ TEST-1: MCP tool tests added
- ✅ TEST-2: Adapter tests added
- ✅ TEST-3: HTTP mocks improved (respx migration verified and regressions fixed)

---

## Active Items

### Minor Improvements
- Consider migrating remaining AsyncMock patterns to respx for consistency
- Add integration tests for full search→traverse→verify pipeline

### Deferred Features
- **RERANK-1**: Reranker Disabled (Token Truncation & OOM)
  - `src/routes/search.py` & `src/adapters/qdrant.py`
  - **Issue**: 
    - `bge-reranker-v2-m3` causes OOM/Buffer errors (12GB+ required).
    - `ms-marco-MiniLM-L-6-v2` with Smart Truncation yields -11% MRR (code structure lost).
  - **Fix**: Implement "Parent-Child Chunking" to score smaller semantic units instead of full files.

### Process & Infrastructure
See [INFRASTRUCTURE.md](./INFRASTRUCTURE.md) for:
- CI/CD pipeline setup
- Test coverage automation (target: 70% alpha, 85% beta)
- Documentation generation
- Dependency scanning
- Complexity analysis automation

---

## How to Track New Tech Debt

When identifying new tech debt:

1. **Add to this file** under appropriate section
2. **Categorize by severity:** Critical / High / Medium / Low
3. **Include:** File location, description, proposed fix
4. **Link to issues** if applicable
5. **Update when resolved** with ✅ and date

### Template
```markdown
### CATEGORY-N: Brief description
- `file.py:line` — Detailed description of the issue.
- **Impact:** What breaks or degrades if not fixed.
- **Fix:** Specific action items to resolve.
```

---

For historical context and detailed fix descriptions, see the [archived report](./docs/archive/TECH_DEBT_2026-02.md).
