Skip to content

fix(inference): show registered providers and onboard tip on provider-not-found - #6023

Merged
apurvvkumaria merged 17 commits into
mainfrom
codex/salvage-5983
Jul 1, 2026
Merged

fix(inference): show registered providers and onboard tip on provider-not-found#6023
apurvvkumaria merged 17 commits into
mainfrom
codex/salvage-5983

Conversation

@cv

@cv cv commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

When nemoclaw inference set fails because the requested provider is not registered, preserve a bounded, fully redacted failure diagnostic and add the registered provider list plus an onboarding recovery tip. This same-repository replacement preserves #5983's verified contributor history so the mandatory PR Review Advisor can run; fork-origin advisor jobs are skipped by policy.

Related Issue

Closes #5924
Supersedes #5983

Changes

  • Capture openshell inference set output and enrich only a quoted provider-not-found diagnostic naming the provider actually requested.
  • Fully redact, whitespace-compact, and cap generic and enhanced OpenShell failure details at 500 characters so diagnostics remain useful without exposing credentials or unbounded subprocess output.
  • Query the sandbox registry for known providers without allowing registry lookup failures to hide the original route-update error; emit only a static safe warning when that lookup fails.
  • Isolate parsing and message formatting in inference-set-error.ts, with focused security/correctness tests separate from the already-large action test.
  • Cover matching, mismatched, malformed, stderr, and stdout diagnostics; registered and empty registries; registry failures; full secret-shape redaction; enhanced-path output bounds; and generic failures.
  • Compatibility boundary: OpenShell 0.0.71 exposes this condition only as subprocess text. Unknown or drifted formats stay generic; replace this parser when OpenShell provides a structured provider-not-found error carrying the missing provider as a field.
  • Preserve fix(inference): show registered providers and onboard tip on provider-not-found #5983's exact four GitHub-Verified commits without rewriting or cherry-picking, then add two signed maintainer hardening/refactor commits on top.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: this enriches an existing failure path without changing commands, configuration, or successful behavior.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: full redaction, exact-provider correlation, bounded output, malformed-input behavior, safe registry-warning text, and focused regressions were manually reviewed.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior — 38/38 focused tests
  • npm run typecheck:cli passes
  • Full npm test passes (broad runtime changes only)
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Exact-head E2E: https://github.com/NVIDIA/NemoClaw/actions/runs/28425898821


Signed-off-by: kagura-agent kagura.agent.ai@gmail.com
Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features
    • Enhanced “provider not found” failure diagnostics when switching inference providers, including a registered-provider list (or “No providers registered”) and an onboarding tip to run nemoclaw onboard.
    • Improved visibility into command output while redacting sensitive details.
  • Bug Fixes
    • More reliable detection of provider-missing failures and clearer, actionable error reporting; non-provider-related failures remain generic.
    • When the requested provider can’t be found, existing route/sandbox state remains unchanged.
  • Documentation
    • Added prerequisites and troubleshooting guidance for cross-provider switching, including what happens when OpenShell can’t locate the requested provider.

kagura-agent and others added 4 commits June 29, 2026 18:22
…-not-found (#5924)

When `openshell inference set` fails with a provider-not-found error,
the error message now lists registered providers and suggests running
`nemoclaw onboard` to register a new one.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
Address CodeRabbit review:
- Don't report 'No providers registered' when listSandboxes() throws
- Add regression test for listSandboxes() throwing

Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
@cv cv added area: cli Command line interface, flags, terminal UX, or output area: inference Inference routing, serving, model selection, or outputs area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression v0.0.71 labels Jun 30, 2026
@cv cv self-assigned this Jun 30, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-code-quality

github-code-quality Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the codex/salvage-5983 branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/salvage-5983 3306e9d +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/li...bprocess-env.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/bl...print/runner.ts 95%
nemoclaw/src/co...ration-state.ts 94%
nemoclaw/src/bl...ate-networks.ts 94%
nemoclaw/src/index.ts 94%

TypeScript / code-coverage/cli

The overall coverage in the codex/salvage-5983 branch is 68%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/salvage-5983 3306e9d +/-
src/lib/shields...nsition-lock.ts 86%
src/lib/actions...dbox/rebuild.ts 80%
src/lib/actions...all/run-plan.ts 80%
src/lib/state/o...oard-session.ts 79%
src/lib/state/sandbox.ts 72%
src/lib/onboard/preflight.ts 69%
src/lib/shields/index.ts 67%
src/lib/onboard...er-gpu-patch.ts 59%
src/lib/actions...licy-channel.ts 58%
src/lib/onboard.ts 20%

Updated July 01, 2026 17:07 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@cv
cv requested a review from prekshivyas June 30, 2026 06:22
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: openclaw-inference-switch, hermes-inference-switch, inference-routing, diagnostics
Optional E2E: cloud-inference, credential-migration

Dispatch hint: openclaw-inference-switch,hermes-inference-switch,inference-routing,diagnostics

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • openclaw-inference-switch (high): Direct live coverage for OpenClaw nemoclaw inference set: OpenShell route mutation, compatible-endpoint and compatible-anthropic switches, in-sandbox OpenClaw config sync, registry/session updates, and inference.local/agent assertions.
  • hermes-inference-switch (high): Direct live coverage for Hermes nemoclaw inference set: OpenShell route mutation, Hermes config.yaml sync, API-family translation including Anthropic Messages, registry/session updates, and hosted/anthropic switch modes.
  • inference-routing (medium): Exercises inference routing negative/cleanup behavior at the live OpenShell/Docker boundary, which is relevant to changed provider validation, route failure handling, and unreachable/invalid provider diagnostics.
  • diagnostics (medium): Covers the gateway-backed credentials list/reset path in a live installed CLI environment; this is required because credentials list and shared provider-list filtering changed.

Optional E2E

  • cloud-inference (high): Useful additional confidence that a hosted onboarded sandbox can still send a live request through inference.local after the inference routing/provider metadata changes.
  • credential-migration (medium): Adjacent coverage for compatible-provider credential staging and gateway credential state; useful but less direct than diagnostics for the provider-list parsing change.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e.yaml
  • jobs input: openclaw-inference-switch,hermes-inference-switch,inference-routing,diagnostics

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

Required E2E targets: openclaw-inference-switch, hermes-inference-switch, diagnostics
Optional E2E targets: None

Dispatch required E2E targets:

  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=openclaw-inference-switch
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=hermes-inference-switch
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=diagnostics

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • openclaw-inference-switch: Changes to inference-set routing, compatible-provider metadata, degraded sync handling, OpenShell failure diagnostics, and provider/session sync affect the OpenClaw live inference-switch boundary covered by this discrete E2E job.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=openclaw-inference-switch
  • hermes-inference-switch: The inference-set changes also patch Hermes config.yaml, API-family selection, proxy API-key preservation, and session/registry sync, which are exercised by the wired Hermes inference-switch live E2E job.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=hermes-inference-switch
  • diagnostics: Changes to credentials list/provider-name parsing and OpenShell provider diagnostics affect gateway-backed credentials list/reset diagnostics covered by the wired diagnostics live E2E job.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=diagnostics

Optional E2E targets

  • None.

Relevant changed files

  • src/commands/credentials/list.ts
  • src/lib/actions/inference-set-error.ts
  • src/lib/actions/inference-set-provider-diagnostics.ts
  • src/lib/actions/inference-set.ts
  • src/lib/credentials/command-support.ts
  • src/lib/credentials/provider-list.ts

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updates OpenShell failure handling to capture command output, detect provider-not-found errors, and format messages with registered providers and onboarding guidance. Tests and docs cover the new message shapes, redaction, fallback behavior, and user guidance.

Changes

OpenShell provider-not-found error enrichment

Layer / File(s) Summary
Failure-message helpers and contract
src/lib/actions/inference-set-error.ts
Adds regex-based provider-not-found detection and a failure-message builder that redacts, compacts, and truncates OpenShell output before formatting error text.
OpenShell failure handling
src/lib/actions/inference-set.ts, docs/inference/switch-inference-providers.mdx
Extends the OpenShell dependency option type, pipes stdout and stderr from runOpenshell, detects provider-not-found failures, loads registered providers from listSandboxes, logs sandbox-listing failures, and throws enriched InferenceSetError messages. The switch-provider docs add the matching onboarding and registered-provider guidance.
Updated and new tests
src/lib/actions/inference-set.test.ts, src/lib/actions/inference-set-error.test.ts
Updates existing runOpenshell expectations to include stdio and adds coverage for provider-not-found formatting, generic failures, secret redaction, and sandbox-listing fallback behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. 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 matches the main change: improving provider-not-found inference errors with registered providers and onboard guidance.
Linked Issues check ✅ Passed The PR satisfies #5924 by adding registered-provider context and a nemoclaw onboard tip for unregistered-provider failures.
Out of Scope Changes check ✅ Passed The code, tests, and docs all support the inference-set provider-not-found fix and appear in scope.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/salvage-5983

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

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 4 test follow-ups
Since last review: 0 prior items resolved · 4 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Validate through the actual `nemoclaw inference set` CLI path, using a real or fixture OpenShell capture, that quoted `provider 'openai-api' not found` output produces a redacted OpenShell detail, `Registered providers: nvidia-prod` or `No providers registered`, and `Tip: register a new provider with `nemoclaw onboard``.. Focused unit coverage is strong for the parser, redaction, provider-list fallback, state mutation, SSRF-compatible endpoints, and shield checks. The remaining confidence gap is the actual CLI/OpenShell capture/rendering boundary: stream placement, exact OpenShell wording, oclif multiline error output, and real spawnSync ENOBUFS behavior are still mocked.
  • PRA-T2 Runtime validation — Validate through the actual capture-to-CLI path that unquoted or drifted provider-not-found wording remains on the generic redacted failure path without adding a registered-provider list or onboarding tip.. Focused unit coverage is strong for the parser, redaction, provider-list fallback, state mutation, SSRF-compatible endpoints, and shield checks. The remaining confidence gap is the actual CLI/OpenShell capture/rendering boundary: stream placement, exact OpenShell wording, oclif multiline error output, and real spawnSync ENOBUFS behavior are still mocked.
  • PRA-T3 Runtime validation — Validate through the actual capture-to-CLI path that stderr containing `https://user:password&#64;example.test/v1?token=secret\` does not expose raw URL userinfo or the query token in the final CLI error.. Focused unit coverage is strong for the parser, redaction, provider-list fallback, state mutation, SSRF-compatible endpoints, and shield checks. The remaining confidence gap is the actual CLI/OpenShell capture/rendering boundary: stream placement, exact OpenShell wording, oclif multiline error output, and real spawnSync ENOBUFS behavior are still mocked.
  • PRA-T4 Runtime validation — Validate through the actual capture boundary that an oversized or ENOBUFS OpenShell failure produces a bounded redacted `InferenceSetError` and leaves sandbox registry/config state unchanged.. Focused unit coverage is strong for the parser, redaction, provider-list fallback, state mutation, SSRF-compatible endpoints, and shield checks. The remaining confidence gap is the actual CLI/OpenShell capture/rendering boundary: stream placement, exact OpenShell wording, oclif multiline error output, and real spawnSync ENOBUFS behavior are still mocked.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-2: Double redaction pass lacks complete threat model justification; then add or justify PRA-T1.
Open items: 3 required · 7 warnings · 2 suggestions · 6 test follow-ups
Since last review: 1 prior item resolved · 4 still apply · 6 new items found

Action checklist

  • PRA-2 Fix: Double redaction pass lacks complete threat model justification in src/lib/actions/inference-set-error.ts:112
  • PRA-3 Fix: Unquoted provider edge cases with colon/equals separators untested in src/lib/actions/inference-set-error.ts:57
  • PRA-4 Fix: 64KB capture buffer may truncate verbose OpenShell errors before classification in src/lib/actions/inference-set-error.ts:10
  • PRA-1 Resolve or justify: Source-of-truth review needed: queryRegisteredGatewayProviders catch-all
  • PRA-5 Resolve or justify: Catch-all in queryRegisteredGatewayProviders swallows errors without debug logging in src/lib/actions/inference-set-provider-diagnostics.ts:18
  • PRA-6 Resolve or justify: URL credential redaction gap in redactFull in src/lib/security/redact.ts:127
  • PRA-7 Resolve or justify: inference-set.ts monolith growth to 839 lines in src/lib/actions/inference-set.ts:1
  • PRA-8 Resolve or justify: Overlapping PR feat(credentials): add CLI subcommand to register provider credentials #5969 modifies same command-support.ts in src/lib/credentials/command-support.ts:1
  • PRA-9 Resolve or justify: Overlapping PRs fix: sync OpenClaw main agent model (Fixes #5822) #5857 and fix(sandbox): add host-mediated gateway restart #5874 modify same inference-set.ts in src/lib/actions/inference-set.ts:1
  • PRA-10 Resolve or justify: Overlapping PR docs: fix doc-validate findings across guide pages (#5630-#5640) #5645 modifies same documentation in docs/inference/switch-inference-providers.mdx:1
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: queryRegisteredGatewayProviders catch-all
  • PRA-11 In-scope improvement: containsNotFoundPhrase and startsWithNotFoundPhrase consolidation opportunity in src/lib/actions/inference-set-error.ts:33
  • PRA-12 In-scope improvement: Follow-up extraction of patching and sync logic from inference-set.ts in src/lib/actions/inference-set.ts:1

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Required security src/lib/actions/inference-set-error.ts:112 Either enhance redactFull in src/lib/security/redact.ts to handle URL userinfo/query params and use only redactFull, or add explicit threat model comment listing: what redactFull catches, what redact adds, and proof that no pattern matched by redactFull leaves a prefix that redact would miss.
PRA-3 Required correctness src/lib/actions/inference-set-error.ts:57 Add two test cases to inference-set-error.test.ts: openshellReportsProviderNotFound('provider:openai-api not found', 'openai-api') === false and openshellReportsProviderNotFound('provider=openai-api not found', 'openai-api') === false. Document in parser comment that only quoted provider names are matched.
PRA-4 Required correctness src/lib/actions/inference-set-error.ts:10 Increase to 256KB (4x) to accommodate verbose OpenShell errors. Ensure PROVIDER_ERROR_SCAN_LIMIT matches or exceeds capture buffer. Document truncation behavior: 'Bounded to prevent memory exhaustion from runaway OpenShell output; 256KB accommodates typical verbose errors. Classification scans same window.' Consider making configurable via env var for extreme cases.
PRA-5 Resolve/justify architecture src/lib/actions/inference-set-provider-diagnostics.ts:18 Add debug logging in catch block: catch (e) { deps.log(' ⚠ Gateway provider query failed: ' + (e instanceof Error ? e.name + ': ' + e.message : String(e))); }. Document removal condition: when OpenShell returns structured provider-list errors with error codes.
PRA-6 Resolve/justify security src/lib/security/redact.ts:127 Either enhance redactFull to handle URL userinfo and sensitive query params, or add explicit comment that redactFull must never be used alone for untrusted output and must always be followed by redact().
PRA-7 Resolve/justify architecture src/lib/actions/inference-set.ts:1 Follow-up extraction PR for patchOpenClawInferenceConfig/patchHermesInferenceConfig (already in separate test files) and registry/session sync logic. Not blocking for this PR but should be tracked.
PRA-8 Resolve/justify architecture src/lib/credentials/command-support.ts:1 Coordinate with PR #5969 author. Ensure merge sequence or rebase resolves cleanly. This PR's extraction to provider-list.ts is a clean separation that should reduce conflicts.
PRA-9 Resolve/justify architecture src/lib/actions/inference-set.ts:1 Coordinate with PR authors. Consider rebasing or merging in sequence. Ensure semantic compatibility.
PRA-10 Resolve/justify architecture docs/inference/switch-inference-providers.mdx:1 Coordinate with PR #5645 author.
PRA-11 Improvement correctness src/lib/actions/inference-set-error.ts:33 Add comment explaining distinct purposes: containsNotFoundPhrase for 'provider X not found' anywhere in line; startsWithNotFoundPhrase for 'was not found' at start of remainder after quoted provider. Or consolidate with position parameter in follow-up.
PRA-12 Improvement architecture src/lib/actions/inference-set.ts:1 Extract patchOpenClawInferenceConfig, patchHermesInferenceConfig, registry update, and session sync to separate modules in a follow-up PR. Not blocking for this PR.

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-2 Required — Double redaction pass lacks complete threat model justification

  • Location: src/lib/actions/inference-set-error.ts:112
  • Category: security
  • Problem: buildOpenshellInferenceSetFailureMessage applies redactFull() then redact(). The comment claims 'no secret prefix survives an intermediate' but does not prove patterns caught by redactFull don't leave prefixes that redact's partial masking (first 4 chars) would then expose. FULL_REDACT_PATTERNS replaces secret values with <REDACTED>; SECRET_PATTERNS in redact() then scans for alphanumeric secret values. Since <REDACTED> contains non-alphanumeric chars, it likely won't match, but this must be explicitly documented with a threat model table.
  • Impact: If a secret pattern is transformed by redactFull in a way that redact then matches partially, a secret prefix could leak in failure diagnostics shown to users.
  • Required action: Either enhance redactFull in src/lib/security/redact.ts to handle URL userinfo/query params and use only redactFull, or add explicit threat model comment listing: what redactFull catches, what redact adds, and proof that no pattern matched by redactFull leaves a prefix that redact would miss.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Compare FULL_REDACT_PATTERNS in redact.ts:127-136 with SECRET_PATTERNS in secret-patterns.ts and redact.ts:64-73; check if any redactFull output pattern could be partially matched by redact's partial masking.
  • Missing regression test: Add test in inference-set-error.test.ts for secret pattern edge case: a secret that redactFull transforms but redact then partially reveals (e.g., key=value where redactFull replaces value with <REDACTED> but redact then matches key=<REDACTED> and shows first 4 chars).
  • Done when: The required change is committed and verification passes: Compare FULL_REDACT_PATTERNS in redact.ts:127-136 with SECRET_PATTERNS in secret-patterns.ts and redact.ts:64-73; check if any redactFull output pattern could be partially matched by redact's partial masking.
  • Evidence: Line 112-113 comment; test at inference-set-error.test.ts:37-52 verifies basic redaction but not intermediate-state leakage.

PRA-3 Required — Unquoted provider edge cases with colon/equals separators untested

  • Location: src/lib/actions/inference-set-error.ts:57
  • Category: correctness
  • Problem: lineReportsProviderNotFound only matches quoted providers (' , ", `). Cases like 'provider:openai-api not found' or 'provider=openai-api not found' return false but lack negative test coverage to confirm quoted-only requirement. If OpenShell ever outputs unquoted provider names, parser would silently fail to correlate and fall back to generic path, losing registered-provider list and onboard tip.
  • Impact: Silent fallback to generic error path loses actionable diagnostics (registered providers list, onboard tip) when OpenShell output format drifts to unquoted providers.
  • Required action: Add two test cases to inference-set-error.test.ts: openshellReportsProviderNotFound('provider:openai-api not found', 'openai-api') === false and openshellReportsProviderNotFound('provider=openai-api not found', 'openai-api') === false. Document in parser comment that only quoted provider names are matched.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check inference-set-error.test.ts for colon/equals test cases.
  • Missing regression test: Two test cases confirming both return false (quoted-only requirement).
  • Done when: The required change is committed and verification passes: Check inference-set-error.test.ts for colon/equals test cases.
  • Evidence: Parser at lines 57-75; existing tests at inference-set-error.test.ts:10-35 cover quoted match, unquoted no-match, malformed, cross-provider mismatch but not colon/equals separators.

PRA-4 Required — 64KB capture buffer may truncate verbose OpenShell errors before classification

  • Location: src/lib/actions/inference-set-error.ts:10
  • Category: correctness
  • Problem: OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER = 64KB and PROVIDER_ERROR_SCAN_LIMIT equals the same value. Classification scans the same 64KB window. For extremely verbose errors, provider-not-found pattern could be beyond 64KB, causing correlation failure and loss of registered-provider list and onboard tip.
  • Impact: Provider-not-found correlation could fail for verbose OpenShell output, falling back to generic error without registered providers list or onboard tip.
  • Required action: Increase to 256KB (4x) to accommodate verbose OpenShell errors. Ensure PROVIDER_ERROR_SCAN_LIMIT matches or exceeds capture buffer. Document truncation behavior: 'Bounded to prevent memory exhaustion from runaway OpenShell output; 256KB accommodates typical verbose errors. Classification scans same window.' Consider making configurable via env var for extreme cases.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER constant value and PROVIDER_ERROR_SCAN_LIMIT reference.
  • Missing regression test: Test that provider-not-found pattern at 100KB+ offset is still detected (or document that 64KB is acceptable bound with current OpenShell output patterns).
  • Done when: The required change is committed and verification passes: Check OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER constant value and PROVIDER_ERROR_SCAN_LIMIT reference.
  • Evidence: Constants at lines 10-11; test at inference-set-error.test.ts:66-69 verifies classification at 2.5KB offset but not beyond 64KB.
Review findings by urgency: 3 required fixes, 7 items to resolve/justify, 2 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Source-of-truth review needed: queryRegisteredGatewayProviders catch-all

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: inference-set-provider-diagnostics.test.ts:44-75 (4 failure modes)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: Catch block at inference-set-provider-diagnostics.ts:18-24; comment at line 21

PRA-5 Resolve/justify — Catch-all in queryRegisteredGatewayProviders swallows errors without debug logging

  • Location: src/lib/actions/inference-set-provider-diagnostics.ts:18
  • Category: architecture
  • Problem: Catch block at line 18 treats every thrown query or parsing error identically but logs only a static warning. No visibility into why query failed (timeout, ENOBUFS, nonzero exit, throw). Error details containing secrets are correctly not logged, but error type and message should be logged for diagnostics.
  • Impact: Operators cannot distinguish between transient gateway failures and systemic issues when provider list query fails during a route failure.
  • Recommended action: Add debug logging in catch block: catch (e) { deps.log(' ⚠ Gateway provider query failed: ' + (e instanceof Error ? e.name + ': ' + e.message : String(e))); }. Document removal condition: when OpenShell returns structured provider-list errors with error codes.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check inference-set-provider-diagnostics.ts catch block for error logging.
  • Missing regression test: Test that queryRegisteredGatewayProviders logs error type and message (without secrets) for thrown, timeout, ENOBUFS, and nonzero exit cases.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check inference-set-provider-diagnostics.ts catch block for error logging.
  • Evidence: Catch block at lines 18-24; comment at line 21 says 'intentionally treat every thrown query or parsing error identically' but no debug logging of the actual error.

PRA-6 Resolve/justify — URL credential redaction gap in redactFull

  • Location: src/lib/security/redact.ts:127
  • Category: security
  • Problem: redactFull's FULL_REDACT_PATTERNS does NOT handle URL userinfo (user:pass@host) or sensitive query params (?token=...). The double-pass in inference-set-error.ts relies on redact() for this via redactUrlPartial. If redactFull ever runs alone (e.g., in debug.ts), URL credentials leak.
  • Impact: URL credentials could leak in diagnostic dumps if redactFull is used without the subsequent redact() pass.
  • Recommended action: Either enhance redactFull to handle URL userinfo and sensitive query params, or add explicit comment that redactFull must never be used alone for untrusted output and must always be followed by redact().
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check FULL_REDACT_PATTERNS in redact.ts:127-136 for URL userinfo/query patterns; compare with redactUrlPartial in redact.ts:38-52.
  • Missing regression test: Test that redactFull alone redacts URL userinfo and sensitive query params, or document that it must always be paired with redact().
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check FULL_REDACT_PATTERNS in redact.ts:127-136 for URL userinfo/query patterns; compare with redactUrlPartial in redact.ts:38-52.
  • Evidence: inference-set-error.ts:112 comment acknowledges URL forms are 'absent from redactFull'; redact.ts FULL_REDACT_PATTERNS has no URL userinfo/query patterns.

PRA-7 Resolve/justify — inference-set.ts monolith growth to 839 lines

  • Location: src/lib/actions/inference-set.ts:1
  • Category: architecture
  • Problem: File grew from ~755 to 839 lines despite refactor extracting error handling. Multiple responsibilities: sandbox resolution, provider validation, custom endpoint metadata, local provider reachability, OpenShell invocation, registry updates, config patching (OpenClaw + Hermes), session sync, audit logging, degraded-state handling.
  • Impact: Increased review burden, attack surface, and cognitive complexity. Harder to verify security boundaries and correctness.
  • Recommended action: Follow-up extraction PR for patchOpenClawInferenceConfig/patchHermesInferenceConfig (already in separate test files) and registry/session sync logic. Not blocking for this PR but should be tracked.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check inference-set.ts line count and responsibility boundaries.
  • Missing regression test: N/A - architectural improvement.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check inference-set.ts line count and responsibility boundaries.
  • Evidence: Drift evidence shows +839 delta; file contains 10+ distinct concerns.

PRA-8 Resolve/justify — Overlapping PR #5969 modifies same command-support.ts

PRA-9 Resolve/justify — Overlapping PRs #5857 and #5874 modify same inference-set.ts

PRA-10 Resolve/justify — Overlapping PR #5645 modifies same documentation

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-11 Improvement — containsNotFoundPhrase and startsWithNotFoundPhrase consolidation opportunity

  • Location: src/lib/actions/inference-set-error.ts:33
  • Category: correctness
  • Problem: Two similar functions with overlapping purpose. containsNotFoundPhrase checks for 'not found' anywhere in a string with word boundaries; startsWithNotFoundPhrase checks for 'was not found' or 'not found' at start of remainder. Could unify with position parameter or add comment explaining distinct purposes.
  • Impact: Code duplication and potential inconsistency in provider-not-found phrase detection.
  • Suggested action: Add comment explaining distinct purposes: containsNotFoundPhrase for 'provider X not found' anywhere in line; startsWithNotFoundPhrase for 'was not found' at start of remainder after quoted provider. Or consolidate with position parameter in follow-up.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check inference-set-error.ts lines 33-60 for function definitions and usage.
  • Missing regression test: N/A - code quality improvement.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Functions at lines 33-47 and 48-60; both used in lineReportsProviderNotFound at lines 72 and 75.

PRA-12 Improvement — Follow-up extraction of patching and sync logic from inference-set.ts

  • Location: src/lib/actions/inference-set.ts:1
  • Category: architecture
  • Problem: patchOpenClawInferenceConfig and patchHermesInferenceConfig already have dedicated test files (inference-set-patch-openclaw.test.ts, inference-set-patch-hermes.test.ts) but remain in the monolith. Registry update and session sync logic could also be extracted.
  • Impact: Monolith remains large; extracted functions would be more reusable and testable in isolation.
  • Suggested action: Extract patchOpenClawInferenceConfig, patchHermesInferenceConfig, registry update, and session sync to separate modules in a follow-up PR. Not blocking for this PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check inference-set-patch-openclaw.test.ts and inference-set-patch-hermes.test.ts for existing isolated tests.
  • Missing regression test: N/A - architectural follow-up.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Test files exist for patching functions; inference-set.ts lines 340-580 contain these functions.
Simplification opportunities: 3 possible cuts, net -720 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-7 shrink (src/lib/actions/inference-set.ts:1): Extract patchOpenClawInferenceConfig, patchHermesInferenceConfig, registry update logic, session sync logic to separate modules
    • Replacement: Import from focused modules; inference-set.ts becomes orchestration layer only
    • Net: -400 lines
    • Safety boundary: Must not weaken registry-first consistency, shields gate, mutation lock, or degraded-state handling guarantees.
  • PRA-11 shrink (src/lib/actions/inference-set-error.ts:33): Two separate functions with similar word-boundary logic
    • Replacement: Single function with position parameter (e.g., 'anywhere' | 'start') or keep both with clear comment
    • Net: -20 lines
    • Safety boundary: Must not change matching behavior for quoted provider patterns.
  • PRA-12 shrink (src/lib/actions/inference-set.ts:1): patchOpenClawInferenceConfig, patchHermesInferenceConfig, updateMatchingOnboardSession, registryMetadataForProviderSwitch functions from inference-set.ts
    • Replacement: Import from new modules (e.g., inference-set-patch.ts, inference-set-registry.ts)
    • Net: -300 lines
    • Safety boundary: Must preserve registry-first consistency, upstream annotation tracking, and degraded-state handling semantics.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — openshellReportsProviderNotFound returns false for colon-separated unquoted provider. Runtime/sandbox/infrastructure paths need behavioral runtime validation: inference-set-error.ts, inference-set-provider-diagnostics.ts, inference-set.ts, credentials/list.ts. Unit tests cover logic well but full user-facing behavior and SSRF boundary with real DNS pinning need integration validation.
  • PRA-T2 Runtime validation — openshellReportsProviderNotFound returns false for equals-separated unquoted provider. Runtime/sandbox/infrastructure paths need behavioral runtime validation: inference-set-error.ts, inference-set-provider-diagnostics.ts, inference-set.ts, credentials/list.ts. Unit tests cover logic well but full user-facing behavior and SSRF boundary with real DNS pinning need integration validation.
  • PRA-T3 Runtime validation — openshellReportsProviderNotFound detects provider-not-found at 100KB offset. Runtime/sandbox/infrastructure paths need behavioral runtime validation: inference-set-error.ts, inference-set-provider-diagnostics.ts, inference-set.ts, credentials/list.ts. Unit tests cover logic well but full user-facing behavior and SSRF boundary with real DNS pinning need integration validation.
  • PRA-T4 Runtime validation — buildOpenshellInferenceSetFailureMessage redacts intermediate state: key=secret -> redactFull -> key=<REDACTED> -> redact does not leak 'key=<'. Runtime/sandbox/infrastructure paths need behavioral runtime validation: inference-set-error.ts, inference-set-provider-diagnostics.ts, inference-set.ts, credentials/list.ts. Unit tests cover logic well but full user-facing behavior and SSRF boundary with real DNS pinning need integration validation.
  • PRA-T5 Runtime validation — queryRegisteredGatewayProviders logs error details on catch. Runtime/sandbox/infrastructure paths need behavioral runtime validation: inference-set-error.ts, inference-set-provider-diagnostics.ts, inference-set.ts, credentials/list.ts. Unit tests cover logic well but full user-facing behavior and SSRF boundary with real DNS pinning need integration validation.
  • PRA-T6 queryRegisteredGatewayProviders catch-all — inference-set-provider-diagnostics.test.ts:44-75 (4 failure modes). Catch block at inference-set-provider-diagnostics.ts:18-24; comment at line 21
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: queryRegisteredGatewayProviders catch-all

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: inference-set-provider-diagnostics.test.ts:44-75 (4 failure modes)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: Catch block at inference-set-provider-diagnostics.ts:18-24; comment at line 21

PRA-2 Required — Double redaction pass lacks complete threat model justification

  • Location: src/lib/actions/inference-set-error.ts:112
  • Category: security
  • Problem: buildOpenshellInferenceSetFailureMessage applies redactFull() then redact(). The comment claims 'no secret prefix survives an intermediate' but does not prove patterns caught by redactFull don't leave prefixes that redact's partial masking (first 4 chars) would then expose. FULL_REDACT_PATTERNS replaces secret values with <REDACTED>; SECRET_PATTERNS in redact() then scans for alphanumeric secret values. Since <REDACTED> contains non-alphanumeric chars, it likely won't match, but this must be explicitly documented with a threat model table.
  • Impact: If a secret pattern is transformed by redactFull in a way that redact then matches partially, a secret prefix could leak in failure diagnostics shown to users.
  • Required action: Either enhance redactFull in src/lib/security/redact.ts to handle URL userinfo/query params and use only redactFull, or add explicit threat model comment listing: what redactFull catches, what redact adds, and proof that no pattern matched by redactFull leaves a prefix that redact would miss.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Compare FULL_REDACT_PATTERNS in redact.ts:127-136 with SECRET_PATTERNS in secret-patterns.ts and redact.ts:64-73; check if any redactFull output pattern could be partially matched by redact's partial masking.
  • Missing regression test: Add test in inference-set-error.test.ts for secret pattern edge case: a secret that redactFull transforms but redact then partially reveals (e.g., key=value where redactFull replaces value with <REDACTED> but redact then matches key=<REDACTED> and shows first 4 chars).
  • Done when: The required change is committed and verification passes: Compare FULL_REDACT_PATTERNS in redact.ts:127-136 with SECRET_PATTERNS in secret-patterns.ts and redact.ts:64-73; check if any redactFull output pattern could be partially matched by redact's partial masking.
  • Evidence: Line 112-113 comment; test at inference-set-error.test.ts:37-52 verifies basic redaction but not intermediate-state leakage.

PRA-3 Required — Unquoted provider edge cases with colon/equals separators untested

  • Location: src/lib/actions/inference-set-error.ts:57
  • Category: correctness
  • Problem: lineReportsProviderNotFound only matches quoted providers (' , ", `). Cases like 'provider:openai-api not found' or 'provider=openai-api not found' return false but lack negative test coverage to confirm quoted-only requirement. If OpenShell ever outputs unquoted provider names, parser would silently fail to correlate and fall back to generic path, losing registered-provider list and onboard tip.
  • Impact: Silent fallback to generic error path loses actionable diagnostics (registered providers list, onboard tip) when OpenShell output format drifts to unquoted providers.
  • Required action: Add two test cases to inference-set-error.test.ts: openshellReportsProviderNotFound('provider:openai-api not found', 'openai-api') === false and openshellReportsProviderNotFound('provider=openai-api not found', 'openai-api') === false. Document in parser comment that only quoted provider names are matched.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check inference-set-error.test.ts for colon/equals test cases.
  • Missing regression test: Two test cases confirming both return false (quoted-only requirement).
  • Done when: The required change is committed and verification passes: Check inference-set-error.test.ts for colon/equals test cases.
  • Evidence: Parser at lines 57-75; existing tests at inference-set-error.test.ts:10-35 cover quoted match, unquoted no-match, malformed, cross-provider mismatch but not colon/equals separators.

PRA-4 Required — 64KB capture buffer may truncate verbose OpenShell errors before classification

  • Location: src/lib/actions/inference-set-error.ts:10
  • Category: correctness
  • Problem: OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER = 64KB and PROVIDER_ERROR_SCAN_LIMIT equals the same value. Classification scans the same 64KB window. For extremely verbose errors, provider-not-found pattern could be beyond 64KB, causing correlation failure and loss of registered-provider list and onboard tip.
  • Impact: Provider-not-found correlation could fail for verbose OpenShell output, falling back to generic error without registered providers list or onboard tip.
  • Required action: Increase to 256KB (4x) to accommodate verbose OpenShell errors. Ensure PROVIDER_ERROR_SCAN_LIMIT matches or exceeds capture buffer. Document truncation behavior: 'Bounded to prevent memory exhaustion from runaway OpenShell output; 256KB accommodates typical verbose errors. Classification scans same window.' Consider making configurable via env var for extreme cases.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER constant value and PROVIDER_ERROR_SCAN_LIMIT reference.
  • Missing regression test: Test that provider-not-found pattern at 100KB+ offset is still detected (or document that 64KB is acceptable bound with current OpenShell output patterns).
  • Done when: The required change is committed and verification passes: Check OPEN_SHELL_FAILURE_CAPTURE_MAX_BUFFER constant value and PROVIDER_ERROR_SCAN_LIMIT reference.
  • Evidence: Constants at lines 10-11; test at inference-set-error.test.ts:66-69 verifies classification at 2.5KB offset but not beyond 64KB.

PRA-5 Resolve/justify — Catch-all in queryRegisteredGatewayProviders swallows errors without debug logging

  • Location: src/lib/actions/inference-set-provider-diagnostics.ts:18
  • Category: architecture
  • Problem: Catch block at line 18 treats every thrown query or parsing error identically but logs only a static warning. No visibility into why query failed (timeout, ENOBUFS, nonzero exit, throw). Error details containing secrets are correctly not logged, but error type and message should be logged for diagnostics.
  • Impact: Operators cannot distinguish between transient gateway failures and systemic issues when provider list query fails during a route failure.
  • Recommended action: Add debug logging in catch block: catch (e) { deps.log(' ⚠ Gateway provider query failed: ' + (e instanceof Error ? e.name + ': ' + e.message : String(e))); }. Document removal condition: when OpenShell returns structured provider-list errors with error codes.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check inference-set-provider-diagnostics.ts catch block for error logging.
  • Missing regression test: Test that queryRegisteredGatewayProviders logs error type and message (without secrets) for thrown, timeout, ENOBUFS, and nonzero exit cases.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check inference-set-provider-diagnostics.ts catch block for error logging.
  • Evidence: Catch block at lines 18-24; comment at line 21 says 'intentionally treat every thrown query or parsing error identically' but no debug logging of the actual error.

PRA-6 Resolve/justify — URL credential redaction gap in redactFull

  • Location: src/lib/security/redact.ts:127
  • Category: security
  • Problem: redactFull's FULL_REDACT_PATTERNS does NOT handle URL userinfo (user:pass@host) or sensitive query params (?token=...). The double-pass in inference-set-error.ts relies on redact() for this via redactUrlPartial. If redactFull ever runs alone (e.g., in debug.ts), URL credentials leak.
  • Impact: URL credentials could leak in diagnostic dumps if redactFull is used without the subsequent redact() pass.
  • Recommended action: Either enhance redactFull to handle URL userinfo and sensitive query params, or add explicit comment that redactFull must never be used alone for untrusted output and must always be followed by redact().
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check FULL_REDACT_PATTERNS in redact.ts:127-136 for URL userinfo/query patterns; compare with redactUrlPartial in redact.ts:38-52.
  • Missing regression test: Test that redactFull alone redacts URL userinfo and sensitive query params, or document that it must always be paired with redact().
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check FULL_REDACT_PATTERNS in redact.ts:127-136 for URL userinfo/query patterns; compare with redactUrlPartial in redact.ts:38-52.
  • Evidence: inference-set-error.ts:112 comment acknowledges URL forms are 'absent from redactFull'; redact.ts FULL_REDACT_PATTERNS has no URL userinfo/query patterns.

PRA-7 Resolve/justify — inference-set.ts monolith growth to 839 lines

  • Location: src/lib/actions/inference-set.ts:1
  • Category: architecture
  • Problem: File grew from ~755 to 839 lines despite refactor extracting error handling. Multiple responsibilities: sandbox resolution, provider validation, custom endpoint metadata, local provider reachability, OpenShell invocation, registry updates, config patching (OpenClaw + Hermes), session sync, audit logging, degraded-state handling.
  • Impact: Increased review burden, attack surface, and cognitive complexity. Harder to verify security boundaries and correctness.
  • Recommended action: Follow-up extraction PR for patchOpenClawInferenceConfig/patchHermesInferenceConfig (already in separate test files) and registry/session sync logic. Not blocking for this PR but should be tracked.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check inference-set.ts line count and responsibility boundaries.
  • Missing regression test: N/A - architectural improvement.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check inference-set.ts line count and responsibility boundaries.
  • Evidence: Drift evidence shows +839 delta; file contains 10+ distinct concerns.

PRA-8 Resolve/justify — Overlapping PR #5969 modifies same command-support.ts

PRA-9 Resolve/justify — Overlapping PRs #5857 and #5874 modify same inference-set.ts

PRA-10 Resolve/justify — Overlapping PR #5645 modifies same documentation

PRA-11 Improvement — containsNotFoundPhrase and startsWithNotFoundPhrase consolidation opportunity

  • Location: src/lib/actions/inference-set-error.ts:33
  • Category: correctness
  • Problem: Two similar functions with overlapping purpose. containsNotFoundPhrase checks for 'not found' anywhere in a string with word boundaries; startsWithNotFoundPhrase checks for 'was not found' or 'not found' at start of remainder. Could unify with position parameter or add comment explaining distinct purposes.
  • Impact: Code duplication and potential inconsistency in provider-not-found phrase detection.
  • Suggested action: Add comment explaining distinct purposes: containsNotFoundPhrase for 'provider X not found' anywhere in line; startsWithNotFoundPhrase for 'was not found' at start of remainder after quoted provider. Or consolidate with position parameter in follow-up.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check inference-set-error.ts lines 33-60 for function definitions and usage.
  • Missing regression test: N/A - code quality improvement.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Functions at lines 33-47 and 48-60; both used in lineReportsProviderNotFound at lines 72 and 75.

PRA-12 Improvement — Follow-up extraction of patching and sync logic from inference-set.ts

  • Location: src/lib/actions/inference-set.ts:1
  • Category: architecture
  • Problem: patchOpenClawInferenceConfig and patchHermesInferenceConfig already have dedicated test files (inference-set-patch-openclaw.test.ts, inference-set-patch-hermes.test.ts) but remain in the monolith. Registry update and session sync logic could also be extracted.
  • Impact: Monolith remains large; extracted functions would be more reusable and testable in isolation.
  • Suggested action: Extract patchOpenClawInferenceConfig, patchHermesInferenceConfig, registry update, and session sync to separate modules in a follow-up PR. Not blocking for this PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check inference-set-patch-openclaw.test.ts and inference-set-patch-hermes.test.ts for existing isolated tests.
  • Missing regression test: N/A - architectural follow-up.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Test files exist for patching functions; inference-set.ts lines 340-580 contain these functions.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ❌ Some jobs failed

Run: 28425855354
Workflow ref: codex/salvage-5983
Requested targets: (selector rejected by workflow validation)
Requested jobs: (selector rejected by workflow validation)
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
generate-matrix ❌ failure

Failed jobs: generate-matrix. Check run artifacts for logs.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/actions/inference-set-error.ts (1)

21-53: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move this pure failure-parsing helper out of actions/.

This module is pure provider-detection and message-formatting logic, so it makes src/lib/actions/ own domain behavior instead of orchestration. Prefer a domain helper and keep runInferenceSet as the caller. As per path instructions, "keep pure provider-detection/message-formatting logic in domain-level helpers (if applicable)" and "src/lib/{actions,domain,adapters,state}/**: actions orchestrate, domain modules make pure decisions."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/actions/inference-set-error.ts` around lines 21 - 53, Move the pure
helper logic out of the actions layer: relocate openshellReportsProviderNotFound
and buildOpenshellInferenceSetFailureMessage from inference-set-error into a
domain-level helper module, then have runInferenceSet call that helper instead
of owning the parsing/formatting itself. Keep the functions pure and preserve
their current behavior, using the same exported symbols or updated equivalents
so callers can still detect provider-not-found and build the failure message.
Update any imports/usages in the actions flow to reference the new domain helper
and leave src/lib/actions focused on orchestration only.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/actions/inference-set.ts`:
- Around line 629-637: The provider lookup in the provider-not-found fallback is
using sandbox entries via the `providerNotFound` branch in `inference-set.ts`,
but `use-command-deps` only guarantees `name` on sandboxes, so this path can
miss valid providers and fall back to `No providers registered`. Update the
fallback to read provider names from the authoritative registry source that owns
provider data, or adjust the dependency contract exposed by `use-command-deps`
so `deps.listSandboxes()` reliably includes provider information; keep the
enriched error path in `providerNotFound` and the registration lookup logic
aligned.

---

Nitpick comments:
In `@src/lib/actions/inference-set-error.ts`:
- Around line 21-53: Move the pure helper logic out of the actions layer:
relocate openshellReportsProviderNotFound and
buildOpenshellInferenceSetFailureMessage from inference-set-error into a
domain-level helper module, then have runInferenceSet call that helper instead
of owning the parsing/formatting itself. Keep the functions pure and preserve
their current behavior, using the same exported symbols or updated equivalents
so callers can still detect provider-not-found and build the failure message.
Update any imports/usages in the actions flow to reference the new domain helper
and leave src/lib/actions focused on orchestration only.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ec3612ea-9436-436d-bf54-28ae0a724cca

📥 Commits

Reviewing files that changed from the base of the PR and between a17077e and 54f90a0.

📒 Files selected for processing (4)
  • src/lib/actions/inference-set-error.test.ts
  • src/lib/actions/inference-set-error.ts
  • src/lib/actions/inference-set.test.ts
  • src/lib/actions/inference-set.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/actions/inference-set.test.ts

Comment thread src/lib/actions/inference-set.ts Outdated
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28425898821
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28426243228
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

cv added 2 commits June 30, 2026 00:07
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28426909065
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28427403988
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28428062734
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28429009674
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28429719656
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28430843790
Workflow ref: codex/salvage-5983
Requested targets: (default — all supported)
Requested jobs: openclaw-inference-switch,hermes-inference-switch,inference-routing
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-inference-switch ✅ success
inference-routing ✅ success
openclaw-inference-switch ✅ success

@cv cv left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Exact-head automated review resolution for 94fbfbf472196c02d6a80618ceebca25e8e05d6f:

  • Nemotron run 28430837636 reports merge_after_fixes, but its sole required item, PRA-2, explicitly says “No action needed — resolved in this PR.” Its own verification confirms the former 1,349-line test monolith is deleted and the routing tests are split into focused files under 300 lines. The repository file-size gate and the full commit hook pass; the focused suite is 51/51.
  • inference-set.ts is 755 lines, below its 758-line base. Provider failure reporting and provider-list diagnostics are isolated in dedicated modules.
  • The provider-list catch-all is intentional: secondary diagnostics must not mask the primary route failure or emit thrown details that may contain secrets. Thrown, timeout, ENOBUFS, and nonzero paths are directly tested to return the same observable static warning, with no raw query error logged.
  • Redaction is intentionally ordered as full token masking first, then URL-aware userinfo/query cleanup. Regression tests cover env assignments, bearer tokens, URL credentials, and sensitive query values.
  • The 64 KiB capture limit is an intentional bounded-output/DoS control shared with the classification scan. ENOBUFS behavior is tested for bounded, redacted output and no state mutation.
  • Exact-head standard CI is green. Exact-head E2E run 28430843790 passed inference routing and hosted/Anthropic variants for both OpenClaw and Hermes. GPT-5.5 is exact-head merge_as_is; CodeRabbit has no unresolved findings.
  • Sequencing remains relevant for overlapping open PRs: #5969 touches command-support.ts; #5857 and #5874 touch inference-set.ts; #5645 touches the provider-switching docs. The current PR is mergeable with no conflict, but whichever lands later must rebase and revalidate semantic compatibility.

This is a COMMENTED review recording evidence and sequencing risk, not an approval or advisor override. A human approval is still required.

@prekshivyas prekshivyas 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.

Provider-not-found error path is correct — bounded scan, proper redaction, clean fallback. CodeRabbit finding already addressed by author. LGTM.

prekshivyas and others added 3 commits June 30, 2026 11:04
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Prek Shiv <prekshiv@nvidia.com>
@cv cv added v0.0.72 and removed v0.0.71 labels Jun 30, 2026
Preserve captured provider diagnostics and the latest shields mutation lock.

Retain current endpoint validation behavior.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@apurvvkumaria
apurvvkumaria merged commit 27b83c3 into main Jul 1, 2026
34 checks passed
@apurvvkumaria
apurvvkumaria deleted the codex/salvage-5983 branch July 1, 2026 21:53
ericksoa pushed a commit that referenced this pull request Jul 2, 2026
## Summary
- Add the `v0.0.72` release-note section with links to the deeper docs
pages for installer recovery, command diagnostics, inference, policy,
and sandbox repair changes.
- Document the custom preset `allowed_ips` guard for user-authored
policy files.

## Related Issue
None.

## Source summary
- #6132 -> `docs/about/release-notes.mdx`: Summarizes installer and
upgrade recovery before generic onboarding, with links to quickstart and
lifecycle docs.
- #6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents
that user-authored custom presets reject `allowed_ips` for ordinary
endpoints; also summarized in release notes.
- #5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based
inference probes that keep API keys out of process arguments.
- #6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels
status` configuration reporting.
- #6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2
metadata discovery disablement and links to security guidance.
- #5980 and #5991 -> `docs/about/release-notes.mdx`: Summarizes `exec`
multiline argument rejection and recovery guidance.
- #6023 -> `docs/about/release-notes.mdx`: Summarizes
registered-provider diagnostics for `inference set` failures.
- #6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed
NVIDIA Endpoints featured-model selection behavior.
- #5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add`
provider credential registration.
- #6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw
config permission restoration after `exec`.
- #6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily
access for managed Python workflows.
- #6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime
version-scheme comparison during upgrade checks.
- #6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway
watchdog recovery behavior.
- #5976 and #5990 -> `docs/about/release-notes.mdx`: Summarizes prompt
stdin EOF cancellation behavior during onboarding.
- #5540 -> `docs/about/release-notes.mdx`: Summarizes clarified
host-level and per-sandbox status command scope.
- #5978 and #6018 -> `docs/about/release-notes.mdx`: Summarizes
policy-denial log breadcrumbs in connect shells.

## Testing
- `npm run docs:sync-agent-variants`
- `npm run docs`
- Commit hooks passed during `git commit`, including commitlint and
gitleaks.
- Pre-push hook passed during `git push`, including TypeScript CLI and
package/tag version sync.

## Checklist
- [x] Documentation updated.
- [x] `npm run docs` completed with 0 errors and 1 existing Fern
warning.
- [x] No source code or generated build artifacts committed.

Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added release notes for v0.0.72 covering improved installer recovery,
clearer CLI diagnostics, safer inference setup and provider switching,
better credential handling, stronger policy boundaries, and more robust
runtime repair behavior.
* Updated network policy guidance to clarify when `allowed_ips` can be
used, including a specific exception for the sandbox-to-host bridge
endpoint.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
…-not-found (NVIDIA#6023)

<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 sentences: what this PR does and why. -->

When `nemoclaw inference set` fails because the requested provider is
not registered, preserve a bounded, fully redacted failure diagnostic
and add the registered provider list plus an onboarding recovery tip.
This same-repository replacement preserves NVIDIA#5983's verified contributor
history so the mandatory PR Review Advisor can run; fork-origin advisor
jobs are skipped by policy.

## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->

Closes NVIDIA#5924
Supersedes NVIDIA#5983

## Changes
<!-- Bullet list of key changes. -->

- Capture `openshell inference set` output and enrich only a quoted
provider-not-found diagnostic naming the provider actually requested.
- Fully redact, whitespace-compact, and cap generic and enhanced
OpenShell failure details at 500 characters so diagnostics remain useful
without exposing credentials or unbounded subprocess output.
- Query the sandbox registry for known providers without allowing
registry lookup failures to hide the original route-update error; emit
only a static safe warning when that lookup fails.
- Isolate parsing and message formatting in `inference-set-error.ts`,
with focused security/correctness tests separate from the already-large
action test.
- Cover matching, mismatched, malformed, stderr, and stdout diagnostics;
registered and empty registries; registry failures; full secret-shape
redaction; enhanced-path output bounds; and generic failures.
- Compatibility boundary: OpenShell 0.0.71 exposes this condition only
as subprocess text. Unknown or drifted formats stay generic; replace
this parser when OpenShell provides a structured provider-not-found
error carrying the missing provider as a field.
- Preserve NVIDIA#5983's exact four GitHub-Verified commits without rewriting
or cherry-picking, then add two signed maintainer hardening/refactor
commits on top.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: this enriches an existing
failure path without changing commands, configuration, or successful
behavior.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: full redaction,
exact-provider correlation, bounded output, malformed-input behavior,
safe registry-warning text, and focused regressions were manually
reviewed.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior — 38/38 focused tests
- [x] `npm run typecheck:cli` passes
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the style guide (doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Exact-head E2E:
https://github.com/NVIDIA/NemoClaw/actions/runs/28425898821

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Enhanced “provider not found” failure diagnostics when switching
inference providers, including a registered-provider list (or “No
providers registered”) and an onboarding tip to run `nemoclaw onboard`.
* Improved visibility into command output while redacting sensitive
details.
* **Bug Fixes**
* More reliable detection of provider-missing failures and clearer,
actionable error reporting; non-provider-related failures remain
generic.
* When the requested provider can’t be found, existing route/sandbox
state remains unchanged.
* **Documentation**
* Added prerequisites and troubleshooting guidance for cross-provider
switching, including what happens when OpenShell can’t locate the
requested provider.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Prek Shiv <prekshiv@nvidia.com>
Co-authored-by: kagura-agent <kagura.agent.ai@gmail.com>
Co-authored-by: Claude Opus 4 <noreply@anthropic.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
- Add the `v0.0.72` release-note section with links to the deeper docs
pages for installer recovery, command diagnostics, inference, policy,
and sandbox repair changes.
- Document the custom preset `allowed_ips` guard for user-authored
policy files.

## Related Issue
None.

## Source summary
- NVIDIA#6132 -> `docs/about/release-notes.mdx`: Summarizes installer and
upgrade recovery before generic onboarding, with links to quickstart and
lifecycle docs.
- NVIDIA#6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents
that user-authored custom presets reject `allowed_ips` for ordinary
endpoints; also summarized in release notes.
- NVIDIA#5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based
inference probes that keep API keys out of process arguments.
- NVIDIA#6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels
status` configuration reporting.
- NVIDIA#6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2
metadata discovery disablement and links to security guidance.
- NVIDIA#5980 and NVIDIA#5991 -> `docs/about/release-notes.mdx`: Summarizes `exec`
multiline argument rejection and recovery guidance.
- NVIDIA#6023 -> `docs/about/release-notes.mdx`: Summarizes
registered-provider diagnostics for `inference set` failures.
- NVIDIA#6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed
NVIDIA Endpoints featured-model selection behavior.
- NVIDIA#5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add`
provider credential registration.
- NVIDIA#6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw
config permission restoration after `exec`.
- NVIDIA#6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily
access for managed Python workflows.
- NVIDIA#6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime
version-scheme comparison during upgrade checks.
- NVIDIA#6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway
watchdog recovery behavior.
- NVIDIA#5976 and NVIDIA#5990 -> `docs/about/release-notes.mdx`: Summarizes prompt
stdin EOF cancellation behavior during onboarding.
- NVIDIA#5540 -> `docs/about/release-notes.mdx`: Summarizes clarified
host-level and per-sandbox status command scope.
- NVIDIA#5978 and NVIDIA#6018 -> `docs/about/release-notes.mdx`: Summarizes
policy-denial log breadcrumbs in connect shells.

## Testing
- `npm run docs:sync-agent-variants`
- `npm run docs`
- Commit hooks passed during `git commit`, including commitlint and
gitleaks.
- Pre-push hook passed during `git push`, including TypeScript CLI and
package/tag version sync.

## Checklist
- [x] Documentation updated.
- [x] `npm run docs` completed with 0 errors and 1 existing Fern
warning.
- [x] No source code or generated build artifacts committed.

Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added release notes for v0.0.72 covering improved installer recovery,
clearer CLI diagnostics, safer inference setup and provider switching,
better credential handling, stronger policy boundaries, and more robust
runtime repair behavior.
* Updated network policy guidance to clarify when `allowed_ips` can be
used, including a specific exception for the sandbox-to-host bridge
endpoint.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: inference Inference routing, serving, model selection, or outputs area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][Inference] nemoclaw inference set with unregistered provider returns provider '<X>' not found with no hint to run nemoclaw onboard

5 participants