feat: route compaction server through backend lifecycle#116
Conversation
|
Warning Review limit reached
More reviews will be available in 58 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Route the compaction server through the existing backend lifecycle (Kokoro TTS pattern) instead of custom subprocess management. This unifies compaction with the shared
ModelStatelifecycle (Starting → Ready/Failed) for spawn, health poll, reaping, and auto-restart.Changes
is_non_inference_backend()helpertimeout_ms→request_timeout_msfor clarityensure_compaction_backend()via model registry instead of customCompactionServerStateget_backend_url()tohandlers/helpers.rs(shared with TTS)CompactionServerStateenum,compaction_serverfield, and 3 custom lifecycle methods (~362 lines deleted)check_idle_timeouts()andevict_lru_if_needed()exclude compaction backendevict_lru_if_needed()now checks runtimemodelsmap (not just DB configs) to exclude non-inference backendsCommits
e332549feat: add BackendType::Compaction and is_non_inference_backend helperf3d2d89refactor: rename timeout_ms to request_timeout_ms in CompactionConfig234466ffeat: add load_compaction_backend using model registry lifecyclee7fcb4erefactor: rewrite compaction handler to use model registry3c821f9refactor: remove custom compaction lifecycle, use model registry5bf1c9ffix: verify web API round-trip for compaction config48d086ffix: exclude compaction from LRU eviction via runtime models map11aa9c9refactor: remove redundant health_ok guard in load_compaction_backendTest plan
cargo check --workspace— cleancargo clippy --workspace -- -D warnings— cleancargo test --workspace— 851 tests pass