fix(local-ai,clawkeep): robust ollama pull/delete, ClawKeep status mapping - #346
Conversation
β¦lete error surfacing, idle re-arm, clawkeep status/timeout/gating, poll json guard
|
Caution Review failedThe pull request is closed. βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: π Files selected for processing (8)
π WalkthroughWalkthroughThe changes improve error handling across ClawKeep, Ollama setup routes, model deletion, pair polling, and local AI lifecycle management. They add validation, timeout handling, error propagation, and reliable status or timer updates. ChangesRuntime and setup error handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: β¨ Finishing Touchesπ Generate docstrings
π§ͺ 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 |
π¦ ClawReviewFresh PR washed in with the tide β here's the gist. A robustness pass across Ollama model management and the ClawKeep backup service. Fixes a stream double-close during model pulls, surfaces delete errors to the UI rather than swallowing them silently, and maps ClawKeep daemon failures to meaningful HTTP statuses (409 unpaired / 401 auth / 504 network / 502 portal) instead of collapsing everything to 502. Also adds a timeout guard so a hung clawkeepd can't hold a Next.js worker open indefinitely, and re-arms the idle-stop timer after pull/delete so large models don't stay resident on the 8 GB Jetson. At a glance
Good to know
β ClawReview π¦. I set the scene; CodeRabbit reviews the code; you decide. Conventions: docs. |
Local-AI and ClawKeep robustness.
ollama/pull: idempotent stream close (no double-close), model-ref validation mirrors the delete route (namespaced refs allowed) while still rejecting..segments.ollama/delete+useOllamaModels: surface delete errors to the UI and always reconcile the list against the daemon.clawkeep: classify daemon failures into sensible HTTP statuses (unpaired β 409, auth β 401, network β 504, portal β 502) instead of collapsing to 502; fail-fast friendly on the unpaired case; ENOENT β 503; backup timeout guard so a hung daemon can't hold a worker open.clawkeep/pair/poll: JSON parse guard.Build green, 1710 tests pass on-device.
Summary by CodeRabbit