Skip to content

fix(e2e): repair Hermes GPU fallback coverage - #10398

Merged
sandl99 merged 51 commits into
mainfrom
fix/10155-hermes-gpu-fallback-cleanup
Aug 28, 2026
Merged

fix(e2e): repair Hermes GPU fallback coverage#10398
sandl99 merged 51 commits into
mainfrom
fix/10155-hermes-gpu-fallback-cleanup

Conversation

@sandl99

@sandl99 sandl99 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Repair the Hermes managed-image GPU fallback E2E path after a focused rerun reproduced the failure on a different GPU runner. The live cell now exercises the supported pre-create rejection boundary while production cleanup remains fail-closed after managed state exists.

Related Issue

Addresses the Hermes GPU fallback failure in #10155.

Draft pending #10113.

Changes

  • Make the Hermes GPU fallback fixture reject the native --gpu create before build or sandbox progress, then delegate one compatibility create and GPU proof. This keeps the managed-runner consumer executable without fabricating a post-create NVML failure that cannot be cleaned up by exact identity.
  • Prove stable sandbox and labeled-container absence without mutable-name deletion before the compatibility retry. A same-name sandbox blocks the retry, and focused cleanup tests protect both outcomes.
  • Reuse the exact managed image digest when the pre-create rejection leaves no native runtime snapshot. The managed-bootstrap routing test protects this compatibility launch contract.
  • Propagate the exact managed cleanup handoff for native create and readiness failures, which blocks compatibility retry instead of deleting by mutable sandbox name. Remove the unreachable cleanup-completion receipt state and its two receipt-only tests.

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:
  • 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: The cleanup identity boundary remains fail-closed; tests reject mutable-name deletion and block a same-name replacement.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the latest PR commit — command/result or justification: focused CLI fallback and cleanup tests, 83 passed; focused Hermes E2E-support tests, 17 passed; the normal hooks passed on b3108fd15338e9d4b681a6cef9d987d11f2c23a0.
  • Focused live E2E passed for b3108fd15338e9d4b681a6cef9d987d11f2c23a0 in trusted run 33138120657: native, fallback, and compatibility-only passed. The dispatch receipt binds PR fix(e2e): repair Hermes GPU fallback coverage #10398, NVIDIA/NemoClaw, base and workflow SHA 4e0e663a9a4cf6bac8df8972ea23dfc26ce3c309, and workflow attempt 1.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • 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)

Signed-off-by: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved GPU sandbox fallback when native GPU creation is rejected before startup progress.
    • Compatibility launches now use the correct managed image while preserving startup commands and policy.
    • Prevented destructive cleanup while the original sandbox may still exist.
    • Standardized fallback handling and NVIDIA capability verification after native GPU failures.
  • Tests

    • Expanded coverage for safe cleanup, image selection, fallback behavior, and concurrent GPU creation failures.

sandl99 added 30 commits August 25, 2026 18:11
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
…or-image-changes

# Conflicts:
#	test/platform/images/vllm-docker-storage.test.ts
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99
sandl99 changed the base branch from fix/e2e-local-build-for-image-changes to main August 26, 2026 14:30
@sandl99
sandl99 marked this pull request as draft August 26, 2026 14:30
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 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.

ericksoa added a commit that referenced this pull request Aug 28, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

Hermes GPU creation retains NemoClaw policy authority when OpenShell
applies the reviewed GPU baseline enrichment or changes the policy
during the same verified create transaction. Completed sandboxes,
external policy mutations, and arbitrary filesystem additions remain
unable to refresh a receipt.

## Reason

The fallback and compatibility-only Hermes GPU jobs reached the exact
sandbox, then rejected policy ownership. The compatibility route did not
recognize the reviewed GPU enrichment. A later product-owned container
transition could also advance the policy identity after the first
receipt was recorded.

The broader seven-job report contains three distinct root causes. This
PR claims only the product-owned GPU receipt-transition cause. PR #10398
owns a different fallback cleanup failure. PRs #10116 and #10119 own
external-policy preservation.

### Related issues

Part of #9833.
Relates to #10155.

## Changes

- Recognize the reviewed native and compatibility GPU enrichment shapes
while preserving route-specific `/proc` requirements.
- Refresh a managed receipt only through the in-progress verified create
transaction after exact identity and stable policy verification pass
again.
- Update the durable pending checkpoint with compare-and-set against the
prior checkpoint before later effects continue.
- Reject receipt refresh for completed sandbox mutations, routes without
GPU injection, and arbitrary added filesystem paths.
- Preserve the Hermes portable native-policy verifier on the renamed
shared enrichment predicate.

## Verification

- `npx vitest run --project cli
src/lib/onboard/sandbox-create/policy-creation-receipt.test.ts` — 29
tests passed.
- Focused CLI suites for receipt verification, orchestration, GPU
identity gates, GPU create, policy mutation authority, and registry
transitions — 9 files and 288 tests passed.
- `tsc -p tsconfig.cli.json` — passed.
- `tsx scripts/checks/run.mts` — repository checks passed.
- File-local formatting, Oxlint, whitespace, and ignored-file hooks —
passed.
- `git diff --check` — passed.
- The diff contains no secrets, API keys, or credentials.

## Review notes

E2E root cause: `sandbox create / GPU policy receipt verification /
reviewed compatibility enrichment and verified create transition
rejected`

Source run: https://github.com/NVIDIA/NemoClaw/actions/runs/33111985611
(run 33111985611, attempt 1)

Failed jobs:
- Hermes GPU fallback:
https://github.com/NVIDIA/NemoClaw/actions/runs/33111985611/job/98657665722
- Hermes GPU compatibility-only:
https://github.com/NVIDIA/NemoClaw/actions/runs/33111985611/job/98657665787

Signatures:
- The live base policy does not match the policy supplied by the create
transaction.
- The creation receipt no longer matches the live sandbox policy before
the runtime patch.

Scope: one root cause.

Security boundary: refresh requires the active verified create boundary,
exact sandbox lifecycle identity, stable sandbox-scoped policy, an
allowlisted GPU enrichment, and checkpoint compare-and-set. External
mutations and completed-sandbox policy drift remain denied. Independent
sensitive-path review remains required.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

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

- **Bug Fixes**
- Improved GPU policy validation across native and compatibility routes,
including supported proxy-only access.
- Strengthened post-creation checks for sandbox identity, reservations,
checkpoints, and policy consistency.
- Prevented unexpected policy registration changes during active sandbox
creation.
- Ensured mismatched managed policy registrations are rejected with
clearer error handling.

- **Tests**
- Expanded coverage for GPU enrichment, proxy-only access, and policy
registration revalidation.
- Added coverage confirming mismatched managed registrations are
rejected rather than refreshed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99
sandl99 marked this pull request as ready for review August 28, 2026 02:15
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
@cv

cv commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

@sandl99 is https://github.com/NVIDIA/NemoClaw/actions/runs/33135982202/attempts/1#summary-98736002680 something to worry about?

Signed-off-by: San Dang <sdang@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

All previous runs

@sandl99

sandl99 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

@cv Thanks for flagging this. Yes, the earlier Advisor run found an unreachable nativeCleanupReceipt authorization branch and two tests that could only create that state synthetically.

I removed the receipt type, authorization branch, and receipt-only tests in commit b3108fd. The existing fail-closed cleanup handoff remains covered. This repair removes 103 lines and adds 2. The complete PR is net -153 lines.

Evidence for b3108fd:

  • Focused CLI tests: 83 passed.
  • E2E-support tests: 17 passed.
  • The trusted live E2E run, attempt 1, passed the native, fallback, and compatibility-only scenarios.
  • Required checks pass. The final Advisor review reports no findings. CodeRabbit reports no actionable comments. GitHub reports APPROVED and CLEAN.

@cv, please merge PR #10398.

@sandl99
sandl99 merged commit 144fb37 into main Aug 28, 2026
104 checks passed
@sandl99
sandl99 deleted the fix/10155-hermes-gpu-fallback-cleanup branch August 28, 2026 03:36
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions 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 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions 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.

4 participants