Repository navigation
fix(inference): close llama bridge after listener failure - #12515
Conversation
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthrough
ChangesPrivate bridge cleanup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change fixes the cleanup of listeners and signal handlers when the private llama.cpp bridge fails to start. It has a regression test and no identified merge-blocking risk. The original N1x onboarding issue still needs live validation, which is separate from this cleanup fix. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 4af6d21 in the Show a line coverage summary of the most impacted files.
TypeScript / code-coverage/cliThe overall line coverage in commit 4af6d21 in the Show a line coverage summary of the most impacted files.
Updated |
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
Establish Docker isolation for non-live WSL tests and restore a healthy daemon before live testing. Recover a known unavailable systemd bus with one bounded restart of the job-owned distro, mask both Docker service and socket persistently, and recheck Docker immediately before Vitest. Remove the obsolete exact-timeout expectation from the rebuild recovery test while preserving target selection and recovery-state assertions. Validation: 42 WSL helper/workflow tests and 43 rebuild recovery tests passed locally; publication validation and CLI type checking passed. CI, Docker and Podman managed-runtime activation, and all nine Advisor specialist reports passed on 2b615c9. Actual WSL validation follows this main-only workflow update. Refs #12285 and #12515. Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Outcome
Close every managed llama.cpp bridge listener when startup or a listener fails. Previously, one successful bind kept the bridge process alive after the other bind failed.
Reason
The bridge starts two HTTP listeners with
Promise.all. If one bind rejects, the open listener prevents process exit even after the top-level handler sets a failing exit code. The lifecycle's process-existence check can then mistake failed startup for a running bridge.Related issues
Refs #12285. This repairs a reproduced cleanup defect found during that investigation. It does not establish that the original N1x onboarding failure is resolved; keep the issue open.
Changes
mainat1ccec4e141b0a830229ef68c96639851d24810fd, including the audit repair in fix(ci): upgrade OpenClaw and repair audit and runtime qualification #12507. The merge had no conflicts, and the PR diff remains limited to the two bridge files.Verification
EADDRINUSE.npx vitest run --project cli src/lib/onboard/runtime-provider/docker-llama-cpp-private-bridge.test.ts src/lib/onboard/runtime-provider/docker-llama-cpp-managed-lifecycle.test.ts src/lib/inference/llama-cpp/host-local-runtime.test.ts— 119 tests passed after mergingmain.git diff --check origin/main...HEAD— passed.4af6d2142970c88cc757c1264252ddf9d9f22100.4af6d2142970c88cc757c1264252ddf9d9f22100, clearing the prior dependency-audit failures.Review notes
Both changed files are sensitive paths under
src/lib/onboard/**. Implementation self-review covered4af6d2142970c88cc757c1264252ddf9d9f22100against1ccec4e141b0a830229ef68c96639851d24810fd. CodeRabbit skipped review while the PR was a draft; no independent review is claimed.N1x Windows-on-Arm/WSL2/Docker Desktop validation remains outstanding. The request guard intentionally listens on 8081 and forwards to llama-server on loopback 8082. Before claiming an issue fix, verify container-local
8081/health, both bridge binds, WSL-to-container reachability, onboarding, and a real sandbox inference request. No live E2E was run for this change.Signed-off-by: Aaron Erickson aerickson@nvidia.com
Summary by CodeRabbit