Skip to content

ci(e2e): guard Jetson runner dispatch - #6532

Closed
HOYALIM wants to merge 2 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-6430-jetson-runner-guard
Closed

HOYALIM wants to merge 2 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-6430-jetson-runner-guard

Conversation

@HOYALIM

@HOYALIM HOYALIM commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add allow_jetson_runner_queue for manual E2E dispatches and route unconfirmed jetson-nvmap-gpu selections to a hosted fail-fast guard.
  • Keep the real Jetson job on the self-hosted runner label only after explicit confirmation, with actionable runner/timeout guidance in the guard and report text.
  • Extend workflow contract coverage for the Jetson guard, Docker auth ordering, and the existing OpenShell gateway upgrade upload-name contract.

Root cause

GitHub Actions does not apply timeout-minutes while a self-hosted job is queued before runner assignment. An explicit jobs=jetson-nvmap-gpu or targets=jetson-nvmap-gpu dispatch could therefore wait forever on linux-arm64-gpu-jetson-orin-latest-1, preventing the report and scorecard jobs from finalizing.

Fixes #6430

Validation

  • npx vitest run --project e2e-support test/e2e/support/jetson-workflow-boundary.test.ts test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts test/e2e/support/dockerhub-auth-workflow-boundary.test.ts test/e2e/support/e2e-workflow.test.ts
  • npm run check:diff

DCO

DCO verification: commit 317f258a1e68dde8e693c3cb783b4ba39aa90aa0 includes Signed-off-by: Ho Lim <[email protected]>.

Summary by CodeRabbit

  • New Features

    • Added a new workflow dispatch option for Jetson E2E runs, letting you explicitly allow queueing on a Jetson runner when one is online.
    • Jetson E2E jobs now automatically fall back to a hosted runner unless queueing is enabled.
  • Bug Fixes

    • Improved guardrails and error messages for Jetson job dispatch to prevent unsupported queued runs.
    • Updated E2E step ordering checks so Jetson runs follow the correct authentication flow.

Copilot AI review requested due to automatic review settings July 9, 2026 01:37
@copy-pr-bot

copy-pr-bot Bot commented Jul 9, 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.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 9, 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

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: e5df232d-2d6e-415a-b7a1-1c06d5fa34bd

📥 Commits

Reviewing files that changed from the base of the PR and between 11dc191 and f28e93f.

📒 Files selected for processing (4)
  • .github/workflows/e2e.yaml
  • test/e2e/support/jetson-workflow-boundary.test.ts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts
💤 Files with no reviewable changes (2)
  • tools/e2e/workflow-boundary.mts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/support/jetson-workflow-boundary.test.ts
  • .github/workflows/e2e.yaml

📝 Walkthrough

Walkthrough

Adds a workflow_dispatch input gating the Jetson E2E job to a hosted runner unless explicitly allowed to queue on a self-hosted runner, with a fail-fast guard step and updated skip-reason messaging. Updates workflow-boundary validators and tests to enforce these rules, and refactors upload-e2e-artifacts boundary validation into helper functions with adjusted job coverage.

Changes

Jetson Runner Dispatch Guard

Layer / File(s) Summary
Workflow input and guard
.github/workflows/e2e.yaml
Adds allow_jetson_runner_queue boolean input (default false), switches jetson-nvmap-gpu's runs-on between ubuntu-latest and the Jetson runner label based on the flag, inserts a fail-fast guard step when the flag is false, and updates the PR comment skip-reason text.
Workflow-boundary validation
tools/e2e/workflow-boundary.mts
Refactors Docker Hub auth-index computation with Jetson-specific offset (+2 vs +1), and adds validators for the new dispatch input contract and the guard step's runs-on, if, run, env, and ordering constraints, replacing the previous inline check.
Boundary tests
test/e2e/support/dockerhub-auth-workflow-boundary.test.ts, test/e2e/support/jetson-workflow-boundary.test.ts
Updates auth-step ordering expectation to account for the Jetson offset, and adds a helper plus new assertions covering the input shape, runs-on expression, guard step conditions, step ordering, and always-run upload/cleanup steps.

Upload-e2e-artifacts Contract Adjustment

Layer / File(s) Summary
Upload contract validation
tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
Extracts helper functions for collecting expected/default upload jobs, upload-step extraction, and post-upload deviation detection; wires these into the main validator with added JSDoc documentation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant E2EWorkflow
  participant JetsonJob
  participant GuardStep
  Operator->>E2EWorkflow: dispatch with allow_jetson_runner_queue
  E2EWorkflow->>JetsonJob: select runs-on target
  JetsonJob->>GuardStep: evaluate queue-allowed check
  GuardStep-->>E2EWorkflow: fail fast or continue
Loading

Suggested labels: area: ci, area: e2e

Suggested reviewers: brandonpelfrey, jacobtomlinson

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main Jetson runner dispatch guard change.
Linked Issues check ✅ Passed The PR adds a bounded fail-fast Jetson guard, preserves Jetson execution when explicitly allowed, and adds boundary coverage matching #6430.
Out of Scope Changes check ✅ Passed The Docker auth, upload-contract, and workflow-boundary updates are all called out in the PR objectives and support the Jetson fix.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@HOYALIM HOYALIM changed the title Guard Jetson E2E runner dispatch ci(e2e): guard Jetson runner dispatch Jul 9, 2026

@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: 3

🧹 Nitpick comments (2)
test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts (1)

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

No dedicated tamper test for the new openshell-gateway-upgrade explicit contract.

The context snippet shows an existing pattern (test/e2e/support/e2e-workflow.test.ts) that tampers with an explicit contract's path/name and asserts the validator rejects it. This PR only updates the default-caller count assertion; there's no equivalent regression test proving the new openshell-gateway-upgrade contract (with path omitted) is actually enforced by validateUploadE2eArtifactsInvocations. Consider adding a tamper test mirroring the existing pattern to lock in the new contract behavior.

🤖 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 `@test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts` at line 181,
Add a regression tamper test for the new openshell-gateway-upgrade explicit
contract so validateUploadE2eArtifactsInvocations is covered beyond the
default-caller count check. Follow the existing explicit-contract tamper pattern
from e2e-workflow.test.ts by locating the upload-e2e-artifacts workflow
invocation, mutating the contract metadata (such as name/path handling for this
new contract), and asserting the validator rejects the modified invocation. Keep
the test aligned with the current workflow boundary test structure so the new
contract is locked in even if its path is omitted.
tools/e2e/upload-e2e-artifacts-workflow-boundary.mts (1)

48-51: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Optional fields weaken future contract enforcement.

Making both name and path optional on ExplicitUploadContract removes the compile-time guarantee that new explicit entries specify a path (or name). Combined with the isDeepStrictEqual(record(upload.with), explicitContract) check at Line 350, an entry with only name now only asserts that upload.with has no other keys besides name — it can no longer catch, at the type level, an entry that forgot to add path when it should have one. Since openshell-gateway-upgrade intentionally has no path, this is likely by design, but the type change silently loosens validation for all future entries in the map, not just this one.

🤖 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/upload-e2e-artifacts-workflow-boundary.mts` around lines 48 - 51,
The `ExplicitUploadContract` type is too permissive because both `name` and
`path` are optional, weakening the compile-time checks for future explicit
uploads. Tighten the contract in `upload-e2e-artifacts-workflow-boundary.mts` by
making the shared explicit shape require `name`/`path` as appropriate, and model
the `openshell-gateway-upgrade` exception separately so the
`isDeepStrictEqual(record(upload.with), explicitContract)` validation still
catches missing `path` entries for new cases. Use `ExplicitUploadContract` and
the explicit upload map as the main touchpoints for the fix.
🤖 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 @.github/workflows/e2e.yaml:
- Around line 2695-2703: The guard step in the Jetson dispatch job is reading an
unset shell variable instead of the configured GitHub Actions variable, so the
error message can show the wrong runner label. Update the Guard Jetson runner
dispatch step to use the same label source as the runs-on expression in the job,
referencing the configured vars.JETSON_E2E_RUNNER_LABEL with the same fallback
so the echoed message always matches the actual runner selection.

In `@test/e2e/support/jetson-workflow-boundary.test.ts`:
- Around line 74-108: Update the Jetson workflow boundary test name so the final
test title includes the issue reference suffix `(`#6430`)`. Add it to the
`it(...)` description in `jetson-workflow-boundary.test.ts`, since the
surrounding `describe(...)` does not include the reference and the suite still
needs a visible `(`#6430`)` in the resolved test name.

In `@tools/e2e/workflow-boundary.mts`:
- Around line 3906-3939: The Jetson dispatch guard validation is only checking
for the literal default runner label, so it misses cases where the guard script
is not actually wired to vars.JETSON_E2E_RUNNER_LABEL. Update the workflow
boundary checks around jetsonDispatchGuard to validate the rendered run script
references the GitHub expression for the configurable label, not just the
fallback string, and keep the existing checks for allow_jetson_runner_queue and
timeout-minutes.

---

Nitpick comments:
In `@test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts`:
- Line 181: Add a regression tamper test for the new openshell-gateway-upgrade
explicit contract so validateUploadE2eArtifactsInvocations is covered beyond the
default-caller count check. Follow the existing explicit-contract tamper pattern
from e2e-workflow.test.ts by locating the upload-e2e-artifacts workflow
invocation, mutating the contract metadata (such as name/path handling for this
new contract), and asserting the validator rejects the modified invocation. Keep
the test aligned with the current workflow boundary test structure so the new
contract is locked in even if its path is omitted.

In `@tools/e2e/upload-e2e-artifacts-workflow-boundary.mts`:
- Around line 48-51: The `ExplicitUploadContract` type is too permissive because
both `name` and `path` are optional, weakening the compile-time checks for
future explicit uploads. Tighten the contract in
`upload-e2e-artifacts-workflow-boundary.mts` by making the shared explicit shape
require `name`/`path` as appropriate, and model the `openshell-gateway-upgrade`
exception separately so the `isDeepStrictEqual(record(upload.with),
explicitContract)` validation still catches missing `path` entries for new
cases. Use `ExplicitUploadContract` and the explicit upload map as the main
touchpoints for the fix.
🪄 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: 161043e1-de27-45e1-a507-eb74a2fc27e1

📥 Commits

Reviewing files that changed from the base of the PR and between 17bf9a6 and 317f258.

📒 Files selected for processing (6)
  • .github/workflows/e2e.yaml
  • test/e2e/support/dockerhub-auth-workflow-boundary.test.ts
  • test/e2e/support/jetson-workflow-boundary.test.ts
  • test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

Comment thread .github/workflows/e2e.yaml Resolved
Comment thread tools/e2e/workflow-boundary.mts Resolved
@HOYALIM
HOYALIM force-pushed the codex/issue-6430-jetson-runner-guard branch 2 times, most recently from 9132a89 to 0c53552 Compare July 9, 2026 01:53
@HOYALIM
HOYALIM force-pushed the codex/issue-6430-jetson-runner-guard branch from 0c53552 to 11dc191 Compare July 9, 2026 01:57
@apurvvkumaria apurvvkumaria self-assigned this Jul 9, 2026
@cv

cv commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

The exact-head DCO check is failing because the PR description mentions the sign-off inline but does not contain a standalone declaration. The commit history is already compliant; no rewrite or force-push is needed. Please add this exact line to the PR description:

Signed-off-by: Ho Lim <[email protected]>

Once the body is updated, rerun the DCO check.

@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Superseded by #6582, which preserves the corrected Jetson queue guard on a clean GitHub-verified, DCO-compliant commit and credits Ho Lim as co-author. Your latest head fixed the configurable runner-label output, validator, issue-suffixed test title, and review threads; the replacement carries that focused behavior while dropping unrelated upload-validator changes already superseded on main.

apurvvkumaria added a commit that referenced this pull request Jul 9, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prevent manual Jetson E2E dispatches from waiting indefinitely for an
unavailable self-hosted runner by requiring explicit queue confirmation
and otherwise routing to a hosted fail-fast guard. This is a clean,
verified replacement for #6532; Ho Lim's original implementation is
preserved and credited as co-author.

## Related Issue

Fixes #6430. Supersedes #6532 because its PR-level DCO declaration
remains invalid and its branch includes unrelated upload-validator
changes already superseded on `main`.

## Changes

- Add `allow_jetson_runner_queue` for manual E2E dispatches.
- Use the configured Jetson runner label only after explicit
confirmation; otherwise run a hosted guard with actionable guidance.
- Validate the configurable runner-label source and rendered shell
variable so the guard cannot silently print an unset label.
- Add focused workflow-boundary coverage with the required `(#6430)`
behavior-title suffix.

## 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

- [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 changes only internal
workflow dispatch safeguards and does not alter NemoClaw user commands,
configuration, or runtime 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 — the guard defaults to a hosted runner, requires explicit
confirmation before using the self-hosted Jetson label, and validates
the configured label at the workflow boundary.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — focused E2E-support validation passed
38/38 tests.
- [x] Applicable broad gate passed — `npm run check:diff`, scoped hooks,
and CLI type-check passed on the replacement commit.
- [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)

---
Signed-off-by: Apurv Kumaria <[email protected]>


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

* **New Features**
* Added a new workflow dispatch flag to explicitly enable queued Jetson
self-hosted runner usage.
* Introduced a Jetson dispatch guard that controls which runners are
targeted based on the new flag.

* **Bug Fixes**
* Prevented Jetson end-to-end runs from stalling indefinitely when the
queue option isn’t enabled by enforcing a hosted-runner fallback.

* **Tests & Validation**
* Updated workflow boundary validation and end-to-end tests to reflect
the new runner gating and step ordering behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Apurv Kumaria <[email protected]>
Co-authored-by: Ho Lim <[email protected]>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prevent manual Jetson E2E dispatches from waiting indefinitely for an
unavailable self-hosted runner by requiring explicit queue confirmation
and otherwise routing to a hosted fail-fast guard. This is a clean,
verified replacement for NVIDIA#6532; Ho Lim's original implementation is
preserved and credited as co-author.

## Related Issue

Fixes NVIDIA#6430. Supersedes NVIDIA#6532 because its PR-level DCO declaration
remains invalid and its branch includes unrelated upload-validator
changes already superseded on `main`.

## Changes

- Add `allow_jetson_runner_queue` for manual E2E dispatches.
- Use the configured Jetson runner label only after explicit
confirmation; otherwise run a hosted guard with actionable guidance.
- Validate the configurable runner-label source and rendered shell
variable so the guard cannot silently print an unset label.
- Add focused workflow-boundary coverage with the required `(NVIDIA#6430)`
behavior-title suffix.

## 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

- [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 changes only internal
workflow dispatch safeguards and does not alter NemoClaw user commands,
configuration, or runtime 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 — the guard defaults to a hosted runner, requires explicit
confirmation before using the self-hosted Jetson label, and validates
the configured label at the workflow boundary.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — focused E2E-support validation passed
38/38 tests.
- [x] Applicable broad gate passed — `npm run check:diff`, scoped hooks,
and CLI type-check passed on the replacement commit.
- [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)

---
Signed-off-by: Apurv Kumaria <[email protected]>


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

* **New Features**
* Added a new workflow dispatch flag to explicitly enable queued Jetson
self-hosted runner usage.
* Introduced a Jetson dispatch guard that controls which runners are
targeted based on the new flag.

* **Bug Fixes**
* Prevented Jetson end-to-end runs from stalling indefinitely when the
queue option isn’t enabled by enforcing a hosted-runner fallback.

* **Tests & Validation**
* Updated workflow boundary validation and end-to-end tests to reflect
the new runner gating and step ordering behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Apurv Kumaria <[email protected]>
Co-authored-by: Ho Lim <[email protected]>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance platform: jetson Affects Jetson AGX Thor or Orin labels Nov 16, 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 chore Build, CI, dependency, or tooling maintenance platform: jetson Affects Jetson AGX Thor or Orin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(e2e): prevent an unavailable Jetson runner from blocking workflow finalization

5 participants