Skip to content

test(onboard): pin Hermes product endpoint OAuth acceptance - #13999

Draft
chengjiew wants to merge 1 commit into
mainfrom
fix/12898_hermes-provider-oauth-endpoint
Draft

chengjiew wants to merge 1 commit into
mainfrom
fix/12898_hermes-provider-oauth-endpoint

Conversation

@chengjiew

Copy link
Copy Markdown
Contributor

Outcome

NemoClaw no longer rejects its own product-defined Hermes Provider inference endpoint (https://inference-api.nousresearch.com/v1) during onboarding. On v0.0.131, the curated Hermes Provider OAuth flow passed that endpoint as an explicit endpointUrl, and setupHermesProviderInference failed closed on it because it is a DNS-backed HTTPS URL. Current main already accepts this endpoint through the native hosted provider path; this PR pins that acceptance with a regression test so the behavior cannot silently regress.

Reason

Issue #12898 reports that Hermes Provider onboarding on a DGX Spark (NemoClaw v0.0.131) stopped before sandbox creation with:

Error: Inference endpoint URL points to a private or internal address, or could not be resolved:
DNS-backed HTTPS URLs are not supported for arbitrary persisted sandbox config values.

The rejected URL was the same public Hermes Provider endpoint that NemoClaw's provider configuration declares (src/lib/onboard/providers.ts, HERMES_INFERENCE_ENDPOINT_URL). Root cause: in v0.0.131, setupHermesProviderInference validated every non-null endpointUrl with rewriteConfigUrlsWithDnsPinning, which deliberately fails closed for DNS-backed HTTPS persisted config values (#6139, #4684). Native hosted provider setup (#12886) later exempted the product-defined endpoint via usesNativeHermesEndpoint, resolving the reported failure path. A dedicated regression test was still missing, so this exact scenario had no guard against future regressions.

Related issues

Fixes #12898

Changes

  • Add a regression test in src/lib/onboard/inference-providers/hermes.test.ts ("accepts the product-defined Hermes Provider endpoint from the curated OAuth flow without DNS pinning ([DGX Spark][Onboard] Hermes Provider OAuth rejects its own public inference endpoint #12898)"):
    • It reproduces the reported scenario at the unit boundary: provider = "hermes-provider", endpointUrl set to the product-defined endpoint exactly as the curated provider menu supplies it, and OAuth as the Hermes auth method.
    • It asserts the native Hermes path accepts the endpoint, returns nativeInference with the canonical endpoint and OPENAI_API_KEY, calls prepareNativeProvider exactly once with the canonical endpoint, and never invokes the DNS lookup (the DNS-rebinding validator is not consulted for this endpoint).
    • It protects the usesNativeHermesEndpoint exemption for the product-defined endpoint; the existing failure-path tests continue to enforce that every other DNS-backed HTTPS endpoint is still rejected.

Verification

  • npx vitest run --project cli src/lib/onboard/inference-providers/hermes.test.ts — 35 passed (includes the new test).
  • npx vitest run test/onboarding/onboard-inference-failure-paths.test.ts — 25 passed; the injected-lookup test that rejects a non-product DNS-backed HTTPS Hermes endpoint (https://api.public.example.test/v1) still passes, confirming the SSRF fail-closed boundary is intact.
  • npx oxfmt --check src/lib/onboard/inference-providers/hermes.test.ts — formatting clean.
  • Pre-commit hooks and commitlint passed on commit; the published commit is Verified on GitHub.
  • Platform scope note: the original report was reproduced on DGX Spark with an interactive Nous OAuth login. This environment cannot perform that interactive OAuth flow, so E2E reproduction was not run; the failing validation and its resolution were verified at the setupHermesProviderInference boundary, which is where the reported error is produced (Inference endpoint URL points to a private or internal address, or could not be resolved: …). Note that completing the full OAuth path currently stops later on the retired mint_agent_key pathway tracked separately in Remove deprecated mint_agent_key Hermes Oauth pathway #12976; that issue is out of scope here.
  • The diff contains no secrets, API keys, or credentials.

Review notes

No pre-publication review exists for this change. The changed path src/lib/onboard/inference-providers/hermes.test.ts matches the contributor sensitive path src/lib/onboard/**; the PR is opened as a draft with that path awaiting independent review. The change is test-only: no production source, policy, credential, or workflow file is modified.


Signed-off-by: Chengjie Wang chengjiew@nvidia.com

The curated Hermes Provider onboarding flow passes the product-defined
managed inference endpoint (https://inference-api.nousresearch.com/v1)
as an explicit endpointUrl. In v0.0.131 that URL failed closed in
setupHermesProviderInference because it is a DNS-backed HTTPS URL, so
onboarding rejected NemoClaw's own provider configuration before sandbox
creation (#12898).

Native hosted provider setup (#12886) already accepts this endpoint
without DNS resolution; every other DNS-backed HTTPS endpoint is still
rejected by the existing SSRF failure-path tests. Pin the #12898
boundary so the product-defined endpoint keeps flowing through the
native Hermes path.

Fixes #12898
@copy-pr-bot

copy-pr-bot Bot commented Oct 29, 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 29, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chengjiew

Copy link
Copy Markdown
Contributor Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded pi (pi-coding-agent) Session record type session, version 3, cwd /Projects/nemoclaw.
Skills partial fix-issue (complete read); nemoclawqa report rules (complete read); nemoclaw-contributor-create-pr (complete read); its publication.md reference (complete read) Session record covers file reads to cutoff; injected skill listings not individually recorded.
Instruction files partial user AGENTS.md, /Projects/AGENTS.md, /Projects/nemoclaw/AGENTS.md (injected) Startup injections are not recorded in the session file.
Tool calls recorded bash: 129; read: 5; write: 2; edit: 2 Counts include failed and retried calls; cutoff excludes publication reads after this comment was drafted.
Session window recorded 2026-10-29T18:02:37Z to 2026-10-29T18:36:57Z; about 34 min First session event to cutoff at comment drafting; the session continues for publication steps after the cutoff.
Compactions recorded 0 Record contains no compaction events.
Models recorded nvidia/zai-org/glm-5.3-flash Single model_change event; no changes.
Reasoning levels recorded high Single thinking_level_change event; no changes.

@github-code-quality

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

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd fix/12898_hermes-pro... 7906e49 +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd fix/12898_hermes-pro... 7906e49 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
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/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd fix/12898_hermes-pro... 7906e49 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd fix/12898_hermes-pro... 7906e49 +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/actions...ess-recovery.ts 65% 81% +16%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 73% +73%
src/lib/inferen...er/lifecycle.ts 0% 75% +75%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 83% +83%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/actions...ned-recovery.ts 0% 93% +93%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 29, 2026 19:19 UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 7906e49. 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

@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening labels Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DGX Spark][Onboard] Hermes Provider OAuth rejects its own public inference endpoint

2 participants