Skip to content

fix(inference): report gateway restart failure category - #12705

Merged
deepujain merged 3 commits into
mainfrom
fix/12276-openclaw-restart-diagnostics
Oct 7, 2026
Merged

deepujain merged 3 commits into
mainfrom
fix/12276-openclaw-restart-diagnostics

Conversation

@deepujain

@deepujain deepujain commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

When an inference switch updates an OpenClaw route but managed gateway restart fails, the command now includes the bounded failure category while preserving its recovery instruction. This addresses the missing diagnostic; it does not claim the gateway restart succeeded.

Reason

The gateway restart helper already returns a failure layer, but inference set discarded that detail in the user-facing error. The report therefore ended immediately after the restart line without explaining which restart stage failed.

Related issues

Refs #12276

Changes

  • Include the existing restart failure layer in the post-commit error.
  • Extend the health-timeout regression test to assert the category and recovery command.
  • The helper already classifies the failure, so another probe is not needed for this diagnostic change.

Verification

  • npm exec vitest -- run src/lib/actions/inference-set-openclaw-gateway-restart.test.ts src/lib/actions/inference-set-failure-handling.test.ts — 22 tests passed.
  • npm run format:check — passed.
  • npm run build:cli — passed.
  • git diff --check — passed.
  • Diff reviewed; no secrets, API keys, or credentials are included.

Review notes

The original Ubuntu 24 GPU scenario was not rerun. This change validates error reporting and the recovery instruction, not successful live model switching; exact-host validation remains outstanding. PR #12562 also updates separate provider-fixture sections in the same test file for native NVIDIA inference; this patch changes the distinct restart-failure assertion.


Signed-off-by: Deepak Jain [email protected]

Summary by CodeRabbit

  • Bug Fixes
    • Gateway restart errors now identify the failure stage while preserving guidance to retry and noting that the committed route remains in place.

@copy-pr-bot

copy-pr-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 73a215e6-4d64-4ae4-a55f-d5116cb1f979
📥 Commits

Reviewing files that changed from the base of the PR and between 4525779 and b90906b.

📒 Files selected for processing (2)
  • src/lib/actions/inference-set-gateway-restart.ts
  • src/lib/actions/inference-set-openclaw-gateway-restart.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The gateway restart failure error now includes the specific failure layer. Tests verify the failure-layer text and confirm that restart exception details are not exposed.

Changes

Gateway restart errors

Layer / File(s) Summary
Include failure layer in restart error
src/lib/actions/inference-set-gateway-restart.ts, src/lib/actions/inference-set-openclaw-gateway-restart.test.ts
The restart failure message includes the failure layer. Tests check the health-timeout message and verify that a restart exception reports restart exception without exposing its raw detail.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: prekshivyas

Merge Risk: ⚪ Minimal · up to b9090

The restart error identifies the failure layer without exposing raw exception details or suggesting recovery succeeded. No actionable merge risk remains in the reviewed changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: reporting the gateway restart failure category.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit b90906b in the fix/12276-openclaw-r... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/12276-openclaw-r... b90906b +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit b90906b in the fix/12276-openclaw-r... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/12276-openclaw-r... b90906b +/-
src/lib/state/s...tory-restore.ts 86% 0% -86%
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/state/sandbox.ts 92% 83% -9%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/policy/index.ts 71% 79% +8%
src/lib/state/p...l-retirement.ts 79% 92% +13%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 94% +94%
src/lib/securit...ig-structure.ts 0% 98% +98%

Updated October 06, 2026 21:37 UTC

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit b90906b. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@deepujain
deepujain marked this pull request as ready for review October 6, 2026 23:02
@deepujain
deepujain requested review from ericksoa and rsliter October 7, 2026 02:06
@deepujain

Copy link
Copy Markdown
Collaborator Author

Ready for review at b90906b.

When an inference switch updates an OpenClaw route but managed gateway restart fails, the command now includes the bounded failure category while preserving its recovery instruction.

CI, the Advisor and CodeRabbit are green on this head, all commits are verified and no review threads are open.

@rsliter rsliter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed latest PR commit b90906b. The error exposes only the bounded restart failure category, preserves the committed-route warning and recovery command, and keeps raw restart details private. The focused 22-test suite passes. The trusted gate passes all 51 current checks, DCO, verified commits, CodeRabbit, mergeability, and risky-code test coverage.

@deepujain
deepujain merged commit 904f933 into main Oct 7, 2026
74 checks passed
@deepujain
deepujain deleted the fix/12276-openclaw-restart-diagnostics branch October 7, 2026 18:09
@wscurran wscurran added area: inference Inference routing, serving, model selection, or outputs area: observability Logging, metrics, tracing, diagnostics, or debug output integration: openclaw OpenClaw integration behavior labels Oct 13, 2026
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: observability Logging, metrics, tracing, diagnostics, or debug output bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants