Skip to content

fix(e2e): use hosted validation models in Vitest lanes - #5893

Merged
cv merged 4 commits into
mainfrom
fix/vitest-hosted-validation-models-v2
Jun 27, 2026
Merged

fix(e2e): use hosted validation models in Vitest lanes#5893
cv merged 4 commits into
mainfrom
fix/vitest-hosted-validation-models-v2

Conversation

@cv

@cv cv commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes hosted-compatible Vitest lanes that reached the custom provider path but still used public/provider-specific model or env setup, causing hosted endpoint validation to fail with HTTP 401/403. The affected tests now use the shared hosted-compatible model/env plumbing consistently.

Changes

  • Removes the Hermes Vitest workflow override for NEMOCLAW_MODEL=minimaxai/minimax-m2.7 so hosted-compatible runs use the shared hosted model default.
  • Updates Hermes and cron live Vitest tests to default to DEFAULT_HOSTED_INFERENCE_MODEL.
  • Routes diagnostics and stale-upgrade live Vitest setup through requireHostedInferenceConfig() / hosted.env instead of manually passing only NVIDIA_INFERENCE_API_KEY.
  • Updates the workflow boundary validator to require Hermes Vitest to use the shared hosted-compatible model default.

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: workflow boundary tests cover the Hermes model contract; TypeScript covers the live helper env signatures.
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: live E2E harness behavior only.
  • 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: self-review; change narrows test model/env selection to the existing hosted-compatible fixture boundary without broadening secret exposure.
  • 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
  • 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)

Targeted verification:

npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run typecheck:cli

Live scenario test files are gated locally unless NEMOCLAW_RUN_E2E_SCENARIOS=1 is set; the validation evidence will come from targeted GitHub E2E reruns after merge.


Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Tests

    • Updated end-to-end live scenarios (Hermes chat, diagnostics, cron preflight, and stale sandbox upgrade) to use shared hosted-inference model defaults instead of hardcoded model strings and to wire hosted env/model consistently.
    • Removed direct model pinning from the Hermes Vitest workflow job configuration and expanded validation to disallow user-pinned overrides.
    • Added an E2E test covering the workflow boundary rejection behavior.
  • Bug Fixes

    • Reduced configuration mismatches that could cause E2E failures when model settings diverged from hosted inference defaults.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d958a231-c926-4a96-a2b1-7ed966fc906c

📥 Commits

Reviewing files that changed from the base of the PR and between 59a8e36 and 69e1654.

📒 Files selected for processing (1)
  • test/e2e-scenario/live/diagnostics.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e-scenario/live/diagnostics.test.ts

📝 Walkthrough

Walkthrough

The PR removes a pinned Hermes model env entry and updates live E2E scenarios and stale-sandbox helpers to use hosted inference defaults and env objects.

Changes

Hosted inference env alignment

Layer / File(s) Summary
CI job model env contract
.github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts, test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts
hermes-e2e-vitest stops setting NEMOCLAW_MODEL, validateHermesE2EVitestJob rejects any explicit value, and a support test verifies the boundary check.
Hosted config in live scenarios
test/e2e-scenario/live/cron-preflight-inference-local.test.ts, test/e2e-scenario/live/diagnostics.test.ts
The cron-preflight and diagnostics live scenarios source hosted inference configuration and default models from shared helpers instead of hardcoded model strings or direct secret lookups.
Hermes E2E hosted wiring
test/e2e-scenario/live/hermes-e2e.test.ts
The Hermes live E2E test uses hosted inference defaults for its command environment and passes explicit model values into chat request payloads.
Stale-sandbox hosted env plumbing
test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts, test/e2e-scenario/live/upgrade-stale-sandbox.test.ts
commandEnv merges caller-provided hosted env, installCurrentNemoclaw accepts a nested hosted object, and the scenario passes hosted.env/hosted.apiKey through installation and command redaction.

Estimated review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5890: Modifies the same workflow-boundary validation path for hermes-e2e-vitest.
  • NVIDIA/NemoClaw#5776: Touches the Hermes e2e workflow and hosted-inference env wiring in the same area.
  • NVIDIA/NemoClaw#5805: Updates hosted-inference config propagation through E2E helpers and scenarios.

Suggested labels

area: e2e, area: inference, bug-fix

Suggested reviewers

  • jyaunches

Poem

A rabbit hopped through CI glow,
where hosted defaults gently flow.
No hardcoded seed,
just envs that lead,
and tests that bounce soft to-and-fro. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 PR’s main change: switching Vitest E2E lanes to hosted-compatible validation models and environment plumbing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/vitest-hosted-validation-models-v2

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

@github-code-quality

github-code-quality Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/vitest-hosted-va... 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 fix/vitest-hosted-va... 69e1654 +/-
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 fix/vitest-hosted-va... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/vitest-hosted-va... 69e1654 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/actions...dbox/rebuild.ts 73%
src/lib/sandbox/config.ts 72%
src/lib/onboard/preflight.ts 62%
src/lib/shields/index.ts 62%
src/lib/actions...licy-channel.ts 60%
src/lib/state/sandbox.ts 56%
src/lib/policy/index.ts 48%
src/lib/onboard...er-gpu-patch.ts 47%
src/lib/onboard.ts 19%

Updated June 27, 2026 05:20 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: hermes-e2e-vitest, diagnostics-vitest, cron-preflight-inference-local-vitest, upgrade-stale-sandbox-vitest

Dispatch hint: hermes-e2e-vitest,diagnostics-vitest,cron-preflight-inference-local-vitest,upgrade-stale-sandbox-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No merge-blocking product E2E is required because the PR changes E2E scenario tests, workflow validation, and CI workflow configuration only; it does not modify NemoClaw runtime, installer, onboarding state machines, sandbox lifecycle implementation, credentials implementation, network policy, or inference routing source.

Optional E2E

  • hermes-e2e-vitest (high): Validates the changed Hermes workflow/env contract and the updated hosted-model handling for install, Hermes health, direct NVIDIA hosted inference, and inference.local chat.
  • diagnostics-vitest (high): Validates the diagnostics scenario after switching to requireHostedInferenceConfig for credentials, model, install/onboard, debug archive redaction, status, and credentials reset/list checks.
  • cron-preflight-inference-local-vitest (medium): Validates the cron preflight inference.local scenario after replacing its hard-coded model with the shared hosted-compatible default.
  • upgrade-stale-sandbox-vitest (high): Validates that the stale sandbox upgrade live scenario still installs, detects stale OpenClaw metadata, rebuilds, and checks upgrade status with the new hosted inference env plumbing.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: hermes-e2e-vitest,diagnostics-vitest,cron-preflight-inference-local-vitest,upgrade-stale-sandbox-vitest

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: cron-preflight-inference-local-vitest, diagnostics-vitest, upgrade-stale-sandbox-vitest
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cron-preflight-inference-local-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=diagnostics-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=upgrade-stale-sandbox-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • cron-preflight-inference-local-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/cron-preflight-inference-local.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cron-preflight-inference-local-vitest
  • diagnostics-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/diagnostics.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=diagnostics-vitest
  • upgrade-stale-sandbox-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/upgrade-stale-sandbox.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=upgrade-stale-sandbox-vitest

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/diagnostics.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox.test.ts
  • test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@github-actions

github-actions Bot commented Jun 27, 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 · 0 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 — Hermes live scenario installs without a job-level NEMOCLAW_MODEL override, then both direct https://inference-api.nvidia.com/v1/chat/completions and sandbox https://inference.local/v1/chat/completions return the expected PONG response using hosted.model.. Static review and support tests cover the workflow/model wiring and the negative validator boundary, but the changed behavior crosses live installer, hosted endpoint validation, Docker/OpenShell sandbox creation, diagnostics archive generation, stale sandbox rebuild, and sandbox inference.local routing.
  • PRA-T2 Runtime validation — Diagnostics live scenario installs with hosted.env staging both NVIDIA_INFERENCE_API_KEY and COMPATIBLE_API_KEY, then debug archives and credentials list/reset output do not contain the hosted key or nvapi-shaped credentials.. Static review and support tests cover the workflow/model wiring and the negative validator boundary, but the changed behavior crosses live installer, hosted endpoint validation, Docker/OpenShell sandbox creation, diagnostics archive generation, stale sandbox rebuild, and sandbox inference.local routing.
  • PRA-T3 Runtime validation — Upgrade-stale-sandbox live scenario installs with hosted.env, reports a registered old agentVersion as stale, rebuilds the sandbox, and then reports upgrade-sandboxes --check as up to date.. Static review and support tests cover the workflow/model wiring and the negative validator boundary, but the changed behavior crosses live installer, hosted endpoint validation, Docker/OpenShell sandbox creation, diagnostics archive generation, stale sandbox rebuild, and sandbox inference.local routing.
  • PRA-T4 Runtime validation — Cron preflight live scenario onboards with the shared hosted default model and the in-sandbox preflightCronModelProvider reaches the managed inference.local provider without EAI_AGAIN or local endpoint unreachable text.. Static review and support tests cover the workflow/model wiring and the negative validator boundary, but the changed behavior crosses live installer, hosted endpoint validation, Docker/OpenShell sandbox creation, diagnostics archive generation, stale sandbox rebuild, and sandbox inference.local routing.

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.

@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

🤖 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 `@tools/e2e-scenarios/workflow-boundary.mts`:
- Around line 3877-3878: The Hermes hosted-inference validator in
requireHostedInferenceConfig currently only rejects NEMOCLAW_MODEL, so it still
allows a bypass via NEMOCLAW_COMPAT_MODEL. Update the same check in
workflow-boundary.mts to treat NEMOCLAW_COMPAT_MODEL as an explicit model
override too, alongside NEMOCLAW_MODEL, and keep pushing the same shared-default
error when either variable is set.
🪄 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: f2f11428-e394-4b8b-ab56-5630f94313ff

📥 Commits

Reviewing files that changed from the base of the PR and between 544a279 and 1c849c2.

📒 Files selected for processing (7)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/diagnostics.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts
💤 Files with no reviewable changes (1)
  • .github/workflows/e2e-vitest-scenarios.yaml

Comment on lines +3877 to +3878
if (jobEnv.NEMOCLAW_MODEL !== undefined) {
errors.push("hermes-e2e-vitest job must use the shared hosted-compatible model default");

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject NEMOCLAW_COMPAT_MODEL here too.

requireHostedInferenceConfig() treats NEMOCLAW_COMPAT_MODEL as the same kind of explicit model override as NEMOCLAW_MODEL, so this validator still allows the Hermes job to bypass the shared default by setting only the compat variable.

Suggested fix
-  if (jobEnv.NEMOCLAW_MODEL !== undefined) {
+  if (
+    jobEnv.NEMOCLAW_MODEL !== undefined ||
+    jobEnv.NEMOCLAW_COMPAT_MODEL !== undefined
+  ) {
     errors.push("hermes-e2e-vitest job must use the shared hosted-compatible model default");
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (jobEnv.NEMOCLAW_MODEL !== undefined) {
errors.push("hermes-e2e-vitest job must use the shared hosted-compatible model default");
if (
jobEnv.NEMOCLAW_MODEL !== undefined ||
jobEnv.NEMOCLAW_COMPAT_MODEL !== undefined
) {
errors.push("hermes-e2e-vitest job must use the shared hosted-compatible model default");
🤖 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 `@tools/e2e-scenarios/workflow-boundary.mts` around lines 3877 - 3878, The
Hermes hosted-inference validator in requireHostedInferenceConfig currently only
rejects NEMOCLAW_MODEL, so it still allows a bypass via NEMOCLAW_COMPAT_MODEL.
Update the same check in workflow-boundary.mts to treat NEMOCLAW_COMPAT_MODEL as
an explicit model override too, alongside NEMOCLAW_MODEL, and keep pushing the
same shared-default error when either variable is set.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Source-of-truth review needed: Redundant options.model pattern in cron-preflight-inference-local.test.ts.
Open items: 0 required · 4 warnings · 1 suggestion · 8 test follow-ups
Since last review: 1 prior item resolved · 1 still applies · 2 new items found

Action checklist

  • PRA-1 Resolve or justify: Source-of-truth review needed: Redundant options.model pattern in cron-preflight-inference-local.test.ts
  • PRA-2 Resolve or justify: Incomplete isolated validator coverage for validateHermesE2EVitestJob in test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts:1
  • PRA-3 Resolve or justify: Redundant MODEL constant and options.model argument in cron-preflight-inference-local.test.ts in test/e2e-scenario/live/cron-preflight-inference-local.test.ts:31
  • PRA-4 Resolve or justify: Redundant CHAT_MODEL constant in hermes-e2e.test.ts in test/e2e-scenario/live/hermes-e2e.test.ts:39
  • 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: Incomplete isolated validator coverage for validateHermesE2EVitestJob
  • PRA-T7 Add or justify test follow-up: Acceptance clause
  • PRA-T8 Add or justify test follow-up: Redundant options.model pattern in cron-preflight-inference-local.test.ts
  • PRA-5 In-scope improvement: Workflow validator enforcement of shared hosted-compatible model default is a security improvement in .github/workflows/e2e-vitest-scenarios.yaml:1700

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 Resolve/justify tests test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts:1 Add additional test cases in hermes-workflow-boundary.test.ts for other hermes-e2e-vitest validation rules to improve isolated validator coverage. This is local to the new test file and should be done in this PR.
PRA-3 Resolve/justify scope test/e2e-scenario/live/cron-preflight-inference-local.test.ts:31 Remove the MODEL constant and the options.model argument from the requireHostedInferenceConfig call. The fixture's fallback chain (env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL) already preserves the override capability.
PRA-4 Resolve/justify scope test/e2e-scenario/live/hermes-e2e.test.ts:39 Remove CHAT_MODEL constant and simplify commandEnv to use hostedEnv.NEMOCLAW_MODEL directly (or rely on fixture's env.NEMOCLAW_MODEL which is already set to the resolved model).
PRA-5 Improvement security .github/workflows/e2e-vitest-scenarios.yaml:1700 No action needed — security improvement confirmed. Consider extending similar prohibition to other vitest jobs that should use the shared default.
Review findings by urgency: 0 required fixes, 4 items to resolve/justify, 1 in-scope improvement

⚠️ 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: Redundant options.model pattern in cron-preflight-inference-local.test.ts

  • 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: No dedicated test for fixture fallback chain; all live tests implicitly exercise it
  • 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: cron-preflight-inference-local.test.ts:31 defines MODEL = env ?? DEFAULT; line 214 passes { model: MODEL }; fixture requireHostedInferenceConfig already does env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL

PRA-2 Resolve/justify — Incomplete isolated validator coverage for validateHermesE2EVitestJob

  • Location: test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts:1
  • Category: tests
  • Problem: The new hermes-workflow-boundary.test.ts only tests the NEMOCLAW_MODEL prohibition rule. The validator function validateHermesE2EVitestJob has 10+ validation rules (runs-on, needs, if condition, NEMOCLAW_RUN_E2E_SCENARIOS, NEMOCLAW_CLI_BIN, E2E_ARTIFACT_DIR, NEMOCLAW_AGENT, NEMOCLAW_ONBOARD_VALIDATION_TIMEOUT_SECONDS, secret exposure, step structure). Other rules are tested in e2e-scenarios-workflow.test.ts but only as part of full workflow validation, not the hermes-specific validator in isolation.
  • Impact: A regression in any single hermes-e2e-vitest validation rule (e.g., missing needs: generate-matrix, wrong runs-on, secret exposure in job env, wrong artifact dir) would only be caught by the full workflow validation test, not by a focused unit test. Isolated unit tests catch regressions earlier and with clearer diagnostics.
  • Recommended action: Add additional test cases in hermes-workflow-boundary.test.ts for other hermes-e2e-vitest validation rules to improve isolated validator coverage. This is local to the new test file and should be done in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read validateHermesE2EVitestJob in tools/e2e-scenarios/workflow-boundary.mts lines 3797-3870 and compare against test cases in hermes-workflow-boundary.test.ts — only 1 of ~10 rules has a dedicated test case
  • Missing regression test: Isolated unit tests for each validateHermesE2EVitestJob rule: runs-on ubuntu-latest, needs generate-matrix, if condition on hermes_selected, NEMOCLAW_RUN_E2E_SCENARIOS=1, NEMOCLAW_CLI_BIN path, E2E_ARTIFACT_DIR path, NEMOCLAW_AGENT=hermes, NEMOCLAW_ONBOARD_VALIDATION_TIMEOUT_SECONDS=60, secret exposure in job env, step structure (checkout persist-credentials=false, setup-node, npm ci, build, vitest step env)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read validateHermesE2EVitestJob in tools/e2e-scenarios/workflow-boundary.mts lines 3797-3870 and compare against test cases in hermes-workflow-boundary.test.ts — only 1 of ~10 rules has a dedicated test case.
  • Evidence: workflow-boundary.mts:3797-3870 defines validateHermesE2EVitestJob with 10+ assertion blocks; hermes-workflow-boundary.test.ts:1-29 contains only 1 test case for NEMOCLAW_MODEL prohibition; e2e-scenarios-workflow.test.ts tests full workflow but not hermes-specific validator in isolation

PRA-3 Resolve/justify — Redundant MODEL constant and options.model argument in cron-preflight-inference-local.test.ts

  • Location: test/e2e-scenario/live/cron-preflight-inference-local.test.ts:31
  • Category: scope
  • Problem: cron-preflight-inference-local.test.ts defines MODEL = process.env.NEMOCLAW_CRON_PREFLIGHT_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL and passes it as options.model to requireHostedInferenceConfig. The fixture already falls back to DEFAULT_HOSTED_INFERENCE_MODEL when no env override exists, making the explicit options.model redundant.
  • Impact: Unnecessary local constants and config indirection. Increases cognitive load and maintenance surface without adding flexibility (env override already handled by fixture).
  • Recommended action: Remove the MODEL constant and the options.model argument from the requireHostedInferenceConfig call. The fixture's fallback chain (env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL) already preserves the override capability.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep -n 'requireHostedInferenceConfig.*model:' test/e2e-scenario/live/*.test.ts — shows cron-preflight-inference-local.test.ts:214 with redundant pattern
  • Missing regression test: N/A — code simplification, no behavior change
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep -n 'requireHostedInferenceConfig.*model:' test/e2e-scenario/live/*.test.ts — shows cron-preflight-inference-local.test.ts:214 with redundant pattern.
  • Evidence: cron-preflight-inference-local.test.ts:31 defines MODEL = env ?? DEFAULT; line 214 passes { model: MODEL } to requireHostedInferenceConfig; fixture requireHostedInferenceConfig already resolves model as env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL

PRA-4 Resolve/justify — Redundant CHAT_MODEL constant in hermes-e2e.test.ts

  • Location: test/e2e-scenario/live/hermes-e2e.test.ts:39
  • Category: scope
  • Problem: hermes-e2e.test.ts defines CHAT_MODEL = process.env.NEMOCLAW_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL and uses it in commandEnv as NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL ?? CHAT_MODEL. The fixture already resolves the same fallback, making the local constant redundant. chatPayload calls are already fixed to use hosted.model.
  • Impact: Unnecessary local constant and config indirection. Increases cognitive load and maintenance surface without adding flexibility.
  • Recommended action: Remove CHAT_MODEL constant and simplify commandEnv to use hostedEnv.NEMOCLAW_MODEL directly (or rely on fixture's env.NEMOCLAW_MODEL which is already set to the resolved model).
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read hermes-e2e.test.ts lines 39 and 72-74 — CHAT_MODEL constant and commandEnv usage
  • Missing regression test: N/A — code simplification, no behavior change
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read hermes-e2e.test.ts lines 39 and 72-74 — CHAT_MODEL constant and commandEnv usage.
  • Evidence: hermes-e2e.test.ts:39 defines CHAT_MODEL = env ?? DEFAULT; lines 72-74 use NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL ?? CHAT_MODEL; fixture requireHostedInferenceConfig returns env.NEMOCLAW_MODEL = model (the resolved value)

💡 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-5 Improvement — Workflow validator enforcement of shared hosted-compatible model default is a security improvement

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:1700
  • Category: security
  • Problem: Workflow validator now enforces NEMOCLAW_MODEL must be undefined in hermes-e2e-vitest job, preventing hardcoded model pins that could cause hosted endpoint validation failures. This is a defense-in-depth improvement for supply chain security.
  • Impact: Positive — prevents accidental model pin divergence from centralized default, reducing risk of HTTP 401/403 failures from mismatched model/endpoint combinations.
  • Suggested action: No action needed — security improvement confirmed. Consider extending similar prohibition to other vitest jobs that should use the shared default.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check workflow-boundary.mts validateHermesE2EVitestJob line 3833: if (jobEnv.NEMOCLAW_MODEL !== undefined) { errors.push(...) }
  • Missing regression test: Already covered by hermes-workflow-boundary.test.ts test case
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: workflow-boundary.mts:3833 enforces jobEnv.NEMOCLAW_MODEL !== undefined; hermes-workflow-boundary.test.ts asserts error message 'hermes-e2e-vitest job must use the shared hosted-compatible model default'
Simplification opportunities: 2 possible cuts, net -7 lines possible

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

  • PRA-3 shrink (test/e2e-scenario/live/cron-preflight-inference-local.test.ts:31): const MODEL = process.env.NEMOCLAW_CRON_PREFLIGHT_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL; and { model: MODEL } argument
    • Replacement: Direct call to requireHostedInferenceConfig(secrets, process.env) — fixture handles fallback
    • Net: -4 lines
    • Safety boundary: Must preserve env.NEMOCLAW_CRON_PREFLIGHT_MODEL override capability for local E2E runs — fixture already handles this via env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL before falling back to options.model or DEFAULT
  • PRA-4 shrink (test/e2e-scenario/live/hermes-e2e.test.ts:39): const CHAT_MODEL = process.env.NEMOCLAW_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL; and NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL ?? CHAT_MODEL
    • Replacement: NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL (fixture already sets this to resolved model)
    • Net: -3 lines
    • Safety boundary: Must preserve env.NEMOCLAW_MODEL override capability for local E2E runs — fixture already handles this via env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL before falling back to DEFAULT_HOSTED_INFERENCE_MODEL
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 — validateHermesE2EVitestJob rejects job with runs-on !== ubuntu-latest. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts. Unit tests for validator rules are incomplete.
  • PRA-T2 Runtime validation — validateHermesE2EVitestJob rejects job missing needs: generate-matrix. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts. Unit tests for validator rules are incomplete.
  • PRA-T3 Runtime validation — validateHermesE2EVitestJob rejects job with wrong if-condition. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts. Unit tests for validator rules are incomplete.
  • PRA-T4 Runtime validation — validateHermesE2EVitestJob rejects job missing NEMOCLAW_RUN_E2E_SCENARIOS=1. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts. Unit tests for validator rules are incomplete.
  • PRA-T5 Runtime validation — validateHermesE2EVitestJob rejects job with wrong NEMOCLAW_CLI_BIN. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/e2e-vitest-scenarios.yaml, tools/e2e-scenarios/workflow-boundary.mts. Unit tests for validator rules are incomplete.
  • PRA-T6 Incomplete isolated validator coverage for validateHermesE2EVitestJob — Add additional test cases in hermes-workflow-boundary.test.ts for other hermes-e2e-vitest validation rules to improve isolated validator coverage. This is local to the new test file and should be done in this PR.
  • PRA-T7 Acceptance clause — Update test files to use centralized DEFAULT_HOSTED_INFERENCE_MODEL — add test evidence or identify existing coverage. diagnostics.test.ts and upgrade-stale-sandbox files fixed; cron-preflight-inference-local.test.ts and hermes-e2e.test.ts still have redundant local constants
  • PRA-T8 Redundant options.model pattern in cron-preflight-inference-local.test.ts — No dedicated test for fixture fallback chain; all live tests implicitly exercise it. cron-preflight-inference-local.test.ts:31 defines MODEL = env ?? DEFAULT; line 214 passes { model: MODEL }; fixture requireHostedInferenceConfig already does env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: Redundant options.model pattern in cron-preflight-inference-local.test.ts

  • 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: No dedicated test for fixture fallback chain; all live tests implicitly exercise it
  • 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: cron-preflight-inference-local.test.ts:31 defines MODEL = env ?? DEFAULT; line 214 passes { model: MODEL }; fixture requireHostedInferenceConfig already does env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL

PRA-2 Resolve/justify — Incomplete isolated validator coverage for validateHermesE2EVitestJob

  • Location: test/e2e-scenario/support-tests/hermes-workflow-boundary.test.ts:1
  • Category: tests
  • Problem: The new hermes-workflow-boundary.test.ts only tests the NEMOCLAW_MODEL prohibition rule. The validator function validateHermesE2EVitestJob has 10+ validation rules (runs-on, needs, if condition, NEMOCLAW_RUN_E2E_SCENARIOS, NEMOCLAW_CLI_BIN, E2E_ARTIFACT_DIR, NEMOCLAW_AGENT, NEMOCLAW_ONBOARD_VALIDATION_TIMEOUT_SECONDS, secret exposure, step structure). Other rules are tested in e2e-scenarios-workflow.test.ts but only as part of full workflow validation, not the hermes-specific validator in isolation.
  • Impact: A regression in any single hermes-e2e-vitest validation rule (e.g., missing needs: generate-matrix, wrong runs-on, secret exposure in job env, wrong artifact dir) would only be caught by the full workflow validation test, not by a focused unit test. Isolated unit tests catch regressions earlier and with clearer diagnostics.
  • Recommended action: Add additional test cases in hermes-workflow-boundary.test.ts for other hermes-e2e-vitest validation rules to improve isolated validator coverage. This is local to the new test file and should be done in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read validateHermesE2EVitestJob in tools/e2e-scenarios/workflow-boundary.mts lines 3797-3870 and compare against test cases in hermes-workflow-boundary.test.ts — only 1 of ~10 rules has a dedicated test case
  • Missing regression test: Isolated unit tests for each validateHermesE2EVitestJob rule: runs-on ubuntu-latest, needs generate-matrix, if condition on hermes_selected, NEMOCLAW_RUN_E2E_SCENARIOS=1, NEMOCLAW_CLI_BIN path, E2E_ARTIFACT_DIR path, NEMOCLAW_AGENT=hermes, NEMOCLAW_ONBOARD_VALIDATION_TIMEOUT_SECONDS=60, secret exposure in job env, step structure (checkout persist-credentials=false, setup-node, npm ci, build, vitest step env)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read validateHermesE2EVitestJob in tools/e2e-scenarios/workflow-boundary.mts lines 3797-3870 and compare against test cases in hermes-workflow-boundary.test.ts — only 1 of ~10 rules has a dedicated test case.
  • Evidence: workflow-boundary.mts:3797-3870 defines validateHermesE2EVitestJob with 10+ assertion blocks; hermes-workflow-boundary.test.ts:1-29 contains only 1 test case for NEMOCLAW_MODEL prohibition; e2e-scenarios-workflow.test.ts tests full workflow but not hermes-specific validator in isolation

PRA-3 Resolve/justify — Redundant MODEL constant and options.model argument in cron-preflight-inference-local.test.ts

  • Location: test/e2e-scenario/live/cron-preflight-inference-local.test.ts:31
  • Category: scope
  • Problem: cron-preflight-inference-local.test.ts defines MODEL = process.env.NEMOCLAW_CRON_PREFLIGHT_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL and passes it as options.model to requireHostedInferenceConfig. The fixture already falls back to DEFAULT_HOSTED_INFERENCE_MODEL when no env override exists, making the explicit options.model redundant.
  • Impact: Unnecessary local constants and config indirection. Increases cognitive load and maintenance surface without adding flexibility (env override already handled by fixture).
  • Recommended action: Remove the MODEL constant and the options.model argument from the requireHostedInferenceConfig call. The fixture's fallback chain (env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL) already preserves the override capability.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep -n 'requireHostedInferenceConfig.*model:' test/e2e-scenario/live/*.test.ts — shows cron-preflight-inference-local.test.ts:214 with redundant pattern
  • Missing regression test: N/A — code simplification, no behavior change
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep -n 'requireHostedInferenceConfig.*model:' test/e2e-scenario/live/*.test.ts — shows cron-preflight-inference-local.test.ts:214 with redundant pattern.
  • Evidence: cron-preflight-inference-local.test.ts:31 defines MODEL = env ?? DEFAULT; line 214 passes { model: MODEL } to requireHostedInferenceConfig; fixture requireHostedInferenceConfig already resolves model as env.NEMOCLAW_MODEL || env.NEMOCLAW_COMPAT_MODEL || options.model || DEFAULT_HOSTED_INFERENCE_MODEL

PRA-4 Resolve/justify — Redundant CHAT_MODEL constant in hermes-e2e.test.ts

  • Location: test/e2e-scenario/live/hermes-e2e.test.ts:39
  • Category: scope
  • Problem: hermes-e2e.test.ts defines CHAT_MODEL = process.env.NEMOCLAW_MODEL ?? DEFAULT_HOSTED_INFERENCE_MODEL and uses it in commandEnv as NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL ?? CHAT_MODEL. The fixture already resolves the same fallback, making the local constant redundant. chatPayload calls are already fixed to use hosted.model.
  • Impact: Unnecessary local constant and config indirection. Increases cognitive load and maintenance surface without adding flexibility.
  • Recommended action: Remove CHAT_MODEL constant and simplify commandEnv to use hostedEnv.NEMOCLAW_MODEL directly (or rely on fixture's env.NEMOCLAW_MODEL which is already set to the resolved model).
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read hermes-e2e.test.ts lines 39 and 72-74 — CHAT_MODEL constant and commandEnv usage
  • Missing regression test: N/A — code simplification, no behavior change
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read hermes-e2e.test.ts lines 39 and 72-74 — CHAT_MODEL constant and commandEnv usage.
  • Evidence: hermes-e2e.test.ts:39 defines CHAT_MODEL = env ?? DEFAULT; lines 72-74 use NEMOCLAW_MODEL: hostedEnv.NEMOCLAW_MODEL ?? CHAT_MODEL; fixture requireHostedInferenceConfig returns env.NEMOCLAW_MODEL = model (the resolved value)

PRA-5 Improvement — Workflow validator enforcement of shared hosted-compatible model default is a security improvement

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:1700
  • Category: security
  • Problem: Workflow validator now enforces NEMOCLAW_MODEL must be undefined in hermes-e2e-vitest job, preventing hardcoded model pins that could cause hosted endpoint validation failures. This is a defense-in-depth improvement for supply chain security.
  • Impact: Positive — prevents accidental model pin divergence from centralized default, reducing risk of HTTP 401/403 failures from mismatched model/endpoint combinations.
  • Suggested action: No action needed — security improvement confirmed. Consider extending similar prohibition to other vitest jobs that should use the shared default.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check workflow-boundary.mts validateHermesE2EVitestJob line 3833: if (jobEnv.NEMOCLAW_MODEL !== undefined) { errors.push(...) }
  • Missing regression test: Already covered by hermes-workflow-boundary.test.ts test case
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: workflow-boundary.mts:3833 enforces jobEnv.NEMOCLAW_MODEL !== undefined; hermes-workflow-boundary.test.ts asserts error message 'hermes-e2e-vitest job must use the shared hosted-compatible model default'

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.

cv added 3 commits June 26, 2026 21:56
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv merged commit db3e66c into main Jun 27, 2026
45 checks passed
@cv
cv deleted the fix/vitest-hosted-validation-models-v2 branch June 27, 2026 05:23
cv added a commit that referenced this pull request Jun 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fixes the remaining post-#5893 hosted-compatible validation assertions
in live Vitest lanes. Hermes and diagnostics now assert the
hosted-compatible provider name, and the stale-upgrade old-base fixture
includes the sandbox rlimits script required by the current base
Dockerfile.

## Changes
- Updates Hermes `openshell inference get` assertion to expect
`hosted.providerName` instead of hard-coded `nvidia-prod`.
- Updates diagnostics credential assertions/reset to use
`hosted.providerName` instead of hard-coded `nvidia-prod`.
- Copies `scripts/lib/sandbox-rlimits.sh` into the stale-upgrade
old-base Docker build context so `Dockerfile.base` can build.

## 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
- [x] Existing tests cover changed behavior — justification: affected
live tests are gated locally; TypeScript validates the helper and
assertion updates.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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: self-review; changes
use existing hosted provider metadata and copy an existing checked-in
script into a test Docker build context.
- [ ] 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
- [ ] 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
- [ ] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm run typecheck:cli
```

Live scenario test files are gated locally unless
`NEMOCLAW_RUN_E2E_SCENARIOS=1` is set; validation evidence will come
from targeted GitHub E2E reruns after merge.

---
<!-- 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: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Tests**
* Updated end-to-end checks to use the active provider name dynamically
instead of a fixed value.
* Improved coverage for credential reset behavior, including the
expected removal message and post-reset credential state.
* Adjusted inference verification to match the current provider
identifier format.
* **Chores**
* Kept test artifacts in sync with the detected provider name and
provider-specific skip reason.
* Updated upgrade test setup to include an additional script in the
temporary build context.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv added the v0.0.69 label Jun 27, 2026
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fixes hosted-compatible Vitest lanes that reached the custom provider
path but still used public/provider-specific model or env setup, causing
hosted endpoint validation to fail with HTTP 401/403. The affected tests
now use the shared hosted-compatible model/env plumbing consistently.

## Changes
- Removes the Hermes Vitest workflow override for
`NEMOCLAW_MODEL=minimaxai/minimax-m2.7` so hosted-compatible runs use
the shared hosted model default.
- Updates Hermes and cron live Vitest tests to default to
`DEFAULT_HOSTED_INFERENCE_MODEL`.
- Routes diagnostics and stale-upgrade live Vitest setup through
`requireHostedInferenceConfig()` / `hosted.env` instead of manually
passing only `NVIDIA_INFERENCE_API_KEY`.
- Updates the workflow boundary validator to require Hermes Vitest to
use the shared hosted-compatible model default.

## 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
- [x] Existing tests cover changed behavior — justification: workflow
boundary tests cover the Hermes model contract; TypeScript covers the
live helper env signatures.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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: self-review; change
narrows test model/env selection to the existing hosted-compatible
fixture boundary without broadening secret exposure.
- [ ] 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
- [ ] 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
- [ ] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run typecheck:cli
```

Live scenario test files are gated locally unless
`NEMOCLAW_RUN_E2E_SCENARIOS=1` is set; the validation evidence will come
from targeted GitHub E2E reruns after merge.

---
<!-- 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: Carlos Villela <cvillela@nvidia.com>


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

* **Tests**
* Updated end-to-end live scenarios (Hermes chat, diagnostics, cron
preflight, and stale sandbox upgrade) to use shared hosted-inference
model defaults instead of hardcoded model strings and to wire hosted
env/model consistently.
* Removed direct model pinning from the Hermes Vitest workflow job
configuration and expanded validation to disallow user-pinned overrides.
  * Added an E2E test covering the workflow boundary rejection behavior.

* **Bug Fixes**
* Reduced configuration mismatches that could cause E2E failures when
model settings diverged from hosted inference defaults.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fixes the remaining post-NVIDIA#5893 hosted-compatible validation assertions
in live Vitest lanes. Hermes and diagnostics now assert the
hosted-compatible provider name, and the stale-upgrade old-base fixture
includes the sandbox rlimits script required by the current base
Dockerfile.

## Changes
- Updates Hermes `openshell inference get` assertion to expect
`hosted.providerName` instead of hard-coded `nvidia-prod`.
- Updates diagnostics credential assertions/reset to use
`hosted.providerName` instead of hard-coded `nvidia-prod`.
- Copies `scripts/lib/sandbox-rlimits.sh` into the stale-upgrade
old-base Docker build context so `Dockerfile.base` can build.

## 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
- [x] Existing tests cover changed behavior — justification: affected
live tests are gated locally; TypeScript validates the helper and
assertion updates.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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: self-review; changes
use existing hosted provider metadata and copy an existing checked-in
script into a test Docker build context.
- [ ] 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
- [ ] 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
- [ ] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm run typecheck:cli
```

Live scenario test files are gated locally unless
`NEMOCLAW_RUN_E2E_SCENARIOS=1` is set; validation evidence will come
from targeted GitHub E2E reruns after merge.

---
<!-- 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: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Tests**
* Updated end-to-end checks to use the active provider name dynamically
instead of a fixed value.
* Improved coverage for credential reset behavior, including the
expected removal message and post-reset credential state.
* Adjusted inference verification to match the current provider
identifier format.
* **Chores**
* Kept test artifacts in sync with the detected provider name and
provider-specific skip reason.
* Updated upgrade test setup to include an additional script in the
temporary build context.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants