Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions .agents/skills/nemoclaw-maintainer-e2e/references/manual-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Before either candidate dispatch or base replay:

1. Read the shared task record with `node tools/task-continuation/checkpoint.mts resume "$TASK_RECORD"`.
2. Compare the requested PR, jobs, targets, credential flags, cost bounds, and cleanup obligations with its recorded authorization.
3. Check expiry, remaining run and comparison budgets, spent retries, and active matching runs.
3. Check expiry, remaining run and comparison budgets, spent retries, and active matching runs, including the diagnostic flag.
4. Stop before dispatch if authorization is absent, mismatched, expired, exhausted, or cannot be established from the record.
5. Reuse a matching active run. Reconcile pending operations before another dispatch.
6. Persist dispatch intent and its budget consumption through the shared task-continuation procedure before the external write.
Expand Down Expand Up @@ -145,11 +145,13 @@ save_dispatch_intent() {
--arg owner "$E2E_CLEANUP_OWNER" --arg cleanup "$E2E_CLEANUP_OBLIGATION" \
--arg cost "$E2E_COST_BOUNDS" --argjson jetson "$jetson" \
--argjson launchable "$INCLUDE_STAGING_BREV_LAUNCHABLE" \
--argjson nativeDiagnostic "${NATIVE_HERMES_GPU_DIAGNOSTIC:-false}" \
'{phase:$phase,prNumber:$pr,checkoutSha:$checkout,repository:$repository,
baseSha:$base,workflowSha:$workflow,jobs:$jobs,targets:$targets,
correlationId:$correlation,budgetKey:$budget,cleanupOwner:$owner,
cleanupObligation:$cleanup,costBounds:$cost,inferenceMode:"mock",
allowJetsonDispatch:$jetson,includeStagingBrevLaunchable:$launchable}')"
allowJetsonDispatch:$jetson,includeStagingBrevLaunchable:$launchable}
+ (if $nativeDiagnostic then {nativeHermesGpuDiagnostic:true} else {} end)')"
jq -e --arg key "manualE2E.authorization.${budget}" --argjson action "$action" '
(.identities[$key] | fromjson) == ($action | del(.correlationId))
' <<<"$view" >/dev/null || {
Expand All @@ -160,7 +162,8 @@ save_dispatch_intent() {
jq -e --arg key "manualE2E.authorization.${E2E_CANDIDATE_BUDGET:?Use the authorized candidate budget key}" \
--argjson action "$action" '
(.identities[$key] | fromjson) as $candidate |
$candidate.jobs == $action.jobs and $candidate.targets == $action.targets
$candidate.jobs == $action.jobs and $candidate.targets == $action.targets and
($candidate.nativeHermesGpuDiagnostic // false) == ($action.nativeHermesGpuDiagnostic // false)
' <<<"$view" >/dev/null || {
echo "Base selectors differ from recorded candidate authorization; stop before replay" >&2
return 1
Expand Down Expand Up @@ -224,6 +227,15 @@ find_dispatch_run() {
Use the values verified against that record. Set an unused selector explicitly to an empty string;
at least one selector must be nonempty. Enumerate authorized jobs for a full run instead of using controller defaults.
Do not populate missing authorization from environment values or from this recipe.
For a native Hermes GPU diagnostic, record `nativeHermesGpuDiagnostic: true` in the grant.
Set `NATIVE_HERMES_GPU_DIAGNOSTIC=true`, `E2E_JOBS=hermes-gpu-startup`, and empty `E2E_TARGETS`.
Retain this flag for base replay. Omit the grant field and optional dispatch input for normal runs.
For diagnostics, verify support in the pinned trusted controller before recording dispatch intent.
The diagnostic runs only the existing native scenario. Full qualification still requires native, fallback, and compatibility-only.
Native diagnostics use a separate concurrency group from full qualification.
The run’s E2E Execution Plan summary identifies native-only scope and the two unqualified scenarios.
Pinned PR-candidate diagnostics retain the existing reporting restriction and do not post a PR comment.

Retain these values for base replay; recheck its separate authorization and remaining comparison budget before dispatch:

```bash
Expand All @@ -241,6 +253,24 @@ ALLOW_JETSON_DISPATCH="${ALLOW_JETSON_DISPATCH:?Set the recorded credential flag
INCLUDE_STAGING_BREV_LAUNCHABLE="${INCLUDE_STAGING_BREV_LAUNCHABLE:?Set the recorded credential flag}"
[[ "$ALLOW_JETSON_DISPATCH" = true || "$ALLOW_JETSON_DISPATCH" = false ]]
[[ "$INCLUDE_STAGING_BREV_LAUNCHABLE" = true || "$INCLUDE_STAGING_BREV_LAUNCHABLE" = false ]]
NATIVE_HERMES_GPU_DIAGNOSTIC="${NATIVE_HERMES_GPU_DIAGNOSTIC:-false}"
case "$NATIVE_HERMES_GPU_DIAGNOSTIC" in
true|false) ;;
*) echo "Native Hermes GPU diagnostic flag must be true or false" >&2; exit 1 ;;
esac
NATIVE_DIAGNOSTIC_ARGS=()
if [[ "$NATIVE_HERMES_GPU_DIAGNOSTIC" = true ]]; then
# Inspect the pinned trusted controller before consuming dispatch budget.
node --input-type=module - "$WORKFLOW_SHA" <<'JS'
import { execFileSync } from 'node:child_process';
import YAML from 'yaml';
const workflow = YAML.parse(execFileSync('git', ['show', `${process.argv[2]}:.github/workflows/e2e.yaml`], { encoding: 'utf8' }));
if (workflow.on?.workflow_dispatch?.inputs?.native_hermes_gpu_diagnostic?.type !== 'boolean') {
throw new Error('Trusted main does not support native Hermes GPU diagnostics');
}
JS
NATIVE_DIAGNOSTIC_ARGS=(-f native_hermes_gpu_diagnostic=true)
fi
HEAD_CORRELATION_ID="$(python3 -c 'import uuid; print(uuid.uuid4())')"
save_dispatch_intent candidate "$HEAD_CORRELATION_ID" \
"${E2E_CANDIDATE_BUDGET:?Use the authorized candidate budget key}" \
Expand All @@ -252,6 +282,7 @@ gh workflow run .github/workflows/e2e.yaml \
-f "jobs=${E2E_JOBS}" \
-f inference_mode=mock \
-f "include_staging_brev_launchable=${INCLUDE_STAGING_BREV_LAUNCHABLE}" \
${NATIVE_DIAGNOSTIC_ARGS[@]+"${NATIVE_DIAGNOSTIC_ARGS[@]}"} \
-f "allow_jetson_dispatch=${ALLOW_JETSON_DISPATCH}" \
-f "pr_number=${PR_NUMBER}" \
-f "checkout_sha=${HEAD_SHA}" \
Expand Down Expand Up @@ -349,6 +380,7 @@ gh workflow run .github/workflows/e2e.yaml \
-f "jobs=${E2E_JOBS}" \
-f inference_mode=mock \
-f "include_staging_brev_launchable=${INCLUDE_STAGING_BREV_LAUNCHABLE}" \
${NATIVE_DIAGNOSTIC_ARGS[@]+"${NATIVE_DIAGNOSTIC_ARGS[@]}"} \
-f allow_jetson_dispatch=false \
-f "pr_number=${PR_NUMBER}" \
-f "checkout_sha=${BASE_SHA}" \
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
required: false
default: false
type: boolean
native_hermes_gpu_diagnostic:
description: "Run only the existing native Hermes GPU scenario for diagnosis. Requires jobs=hermes-gpu-startup and no targets; full qualification still requires every scenario."
required: false
default: false
type: boolean
inference_mode:
description: "Inference adapter mode for compatible Vitest E2E jobs: mock, internal-nvidia, or public-nvidia."
required: false
Expand Down Expand Up @@ -104,7 +109,7 @@ permissions:
pull-requests: read

concurrency:
group: e2e-${{ github.ref }}-${{ inputs.jobs == 'llama-cpp-dgx-spark-qualification' && format('spark-{0}', github.run_id) || (inputs.jobs == 'staging-brev-launchable' || inputs.jobs == 'staging-brev-launchable-identity' || inputs.include_staging_brev_launchable) && format('launchable-{0}', github.run_id) || inputs.checkout_sha != '' && (inputs.checkout_sha == inputs.base_sha && format('pr-{0}-base-{1}-jobs-{2}-targets-{3}', inputs.pr_number, inputs.base_sha, toJSON(inputs.jobs), toJSON(inputs.targets)) || format('pr-{0}-candidate', inputs.pr_number)) || inputs.targets || 'supported' }}-${{ inputs.checkout_sha != '' && 'manual-pr' || inputs.jobs || 'all-jobs' }}
group: e2e-${{ github.ref }}-${{ inputs.jobs == 'llama-cpp-dgx-spark-qualification' && format('spark-{0}', github.run_id) || (inputs.jobs == 'staging-brev-launchable' || inputs.jobs == 'staging-brev-launchable-identity' || inputs.include_staging_brev_launchable) && format('launchable-{0}', github.run_id) || inputs.checkout_sha != '' && (inputs.checkout_sha == inputs.base_sha && format('pr-{0}-base-{1}-jobs-{2}-targets-{3}', inputs.pr_number, inputs.base_sha, toJSON(inputs.jobs), toJSON(inputs.targets)) || format('pr-{0}-candidate', inputs.pr_number)) || inputs.targets || 'supported' }}-${{ inputs.checkout_sha != '' && 'manual-pr' || inputs.jobs || 'all-jobs' }}${{ inputs.native_hermes_gpu_diagnostic && '-native-hermes-gpu-diagnostic' || '' }}
cancel-in-progress: ${{ inputs.checkout_sha != '' && inputs.checkout_sha != inputs.base_sha && inputs.jobs != 'llama-cpp-dgx-spark-qualification' && !inputs.allow_jetson_dispatch && !contains(format(',{0},{1},', inputs.jobs, inputs.targets), ',dgx-station-express,') && !contains(format(',{0},', inputs.jobs), ',staging-brev-launchable,') && !contains(format(',{0},', inputs.jobs), ',staging-brev-launchable-identity,') && !inputs.include_staging_brev_launchable }}

env:
Expand Down Expand Up @@ -410,6 +415,7 @@ jobs:
matrix: ${{ steps.matrix.outputs.matrix }}
test_matrix: ${{ steps.matrix.outputs.test_matrix }}
hermes_selected: ${{ steps.matrix.outputs.hermes_selected }}
hermes_gpu_native_diagnostic_matrix: ${{ steps.matrix.outputs.hermes_gpu_native_diagnostic_matrix }}
explicit_only_jobs: ${{ steps.matrix.outputs.explicit_only_jobs }}
release_required_jobs: ${{ steps.matrix.outputs.release_required_jobs }}
selected_jobs: ${{ steps.matrix.outputs.selected_jobs }}
Expand Down Expand Up @@ -534,6 +540,7 @@ jobs:
DISPATCH_TARGETS: ${{ inputs.targets }}
EVENT_NAME: ${{ github.event_name }}
INCLUDE_STAGING_BREV_LAUNCHABLE: ${{ inputs.include_staging_brev_launchable && 'true' || 'false' }}
NATIVE_HERMES_GPU_DIAGNOSTIC: ${{ inputs.native_hermes_gpu_diagnostic && 'true' || 'false' }}
PR_NUMBER: ${{ inputs.checkout_sha != '' && inputs.pr_number || '' }}
REPOSITORY: ${{ github.repository }}
RUN_ATTEMPT: ${{ github.run_attempt }}
Expand Down Expand Up @@ -561,6 +568,7 @@ jobs:
--argjson allowDgxSparkRunnerQueue "$ALLOW_DGX_SPARK_RUNNER_QUEUE" \
--argjson allowJetsonRunnerQueue "$ALLOW_JETSON_RUNNER_QUEUE" \
--argjson includeStagingBrevLaunchable "$INCLUDE_STAGING_BREV_LAUNCHABLE" \
--argjson nativeHermesGpuDiagnostic "$NATIVE_HERMES_GPU_DIAGNOSTIC" \
--argjson workflowRunAttempt "$RUN_ATTEMPT" \
'{
kind: "nemoclaw-e2e-dispatch-v2",
Expand All @@ -582,7 +590,7 @@ jobs:
includeStagingBrevLaunchable: $includeStagingBrevLaunchable,
triggeringActor: $triggeringActor,
emptySelectors: ($jobs == "" and $targets == "")
}' >"$DISPATCH_RECEIPT_DIR/dispatch.json"
} + (if $nativeHermesGpuDiagnostic then {nativeHermesGpuDiagnostic: true} else {} end)' >"$DISPATCH_RECEIPT_DIR/dispatch.json"
- name: Upload trusted E2E dispatch receipt
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand Down Expand Up @@ -706,6 +714,7 @@ jobs:
- id: matrix
name: Generate E2E target matrix
env:
NEMOCLAW_E2E_NATIVE_HERMES_GPU_DIAGNOSTIC: ${{ github.event_name == 'workflow_dispatch' && inputs.native_hermes_gpu_diagnostic && 'true' || 'false' }}
NEMOCLAW_E2E_INCLUDE_STAGING_BREV_LAUNCHABLE: ${{ github.repository == 'NVIDIA/NemoClaw' && github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && inputs.include_staging_brev_launchable && 'true' || 'false' }}
INFERENCE_MODE: ${{ inputs.inference_mode || 'mock' }}
NEMOCLAW_GATEWAY_RUNTIMES: ${{ inputs.jobs == 'portable-hermes-finalization' && 'podman' || inputs.gateway_runtimes || inputs.gateway_runtime || 'docker' }}
Expand All @@ -717,6 +726,11 @@ jobs:
NEMOCLAW_E2E_CREDENTIALS_ALLOWED: ${{ (inputs.checkout_sha == '' || steps.candidate_authorization.outputs.nvidia_owned == 'true') && 'true' || 'false' }}
run: |
set -euo pipefail
if [[ "${NEMOCLAW_E2E_NATIVE_HERMES_GPU_DIAGNOSTIC:-false}" == true &&
( "${JOBS:-}" != hermes-gpu-startup || -n "${TARGETS:-}" ) ]]; then
echo "::error::Native Hermes GPU diagnostics require only jobs=hermes-gpu-startup and no targets"
exit 1
fi
if [[ "${JOBS:-}" == "llama-cpp-dgx-spark-qualification" && -z "${TARGETS:-}" ]]; then
{
echo 'matrix=[]'
Expand All @@ -731,6 +745,7 @@ jobs:
echo 'selected_jobs=["llama-cpp-dgx-spark-qualification"]'
echo 'selected_workflow_jobs=["llama-cpp-dgx-spark-qualification"]'
echo 'hermes_selected=false'
echo 'hermes_gpu_native_diagnostic_matrix=[false]'
echo 'explicit_only_jobs=llama-cpp-dgx-spark-qualification'
echo 'release_required_jobs=[]'
echo 'managed_image_required=false'
Expand All @@ -751,6 +766,7 @@ jobs:
echo 'selected_jobs=["native-runtime-qualification-producer"]'
echo 'selected_workflow_jobs=["native-runtime-qualification-producer"]'
echo 'hermes_selected=false'
echo 'hermes_gpu_native_diagnostic_matrix=[false]'
echo 'explicit_only_jobs=native-runtime-qualification-producer'
echo 'release_required_jobs=[]'
echo 'managed_image_required=false'
Expand Down Expand Up @@ -6381,12 +6397,17 @@ jobs:
max-parallel: 2
matrix:
scenario: [native, fallback, compatibility-only]
native_diagnostic: ${{ fromJSON(needs.generate-matrix.outputs.hermes_gpu_native_diagnostic_matrix) }}
runtime_provider: ${{ fromJSON(needs.generate-matrix.outputs.runtime_providers_by_job)['hermes-gpu-startup'] }}
exclude:
- scenario: fallback
runtime_provider: podman
- scenario: compatibility-only
runtime_provider: podman
- scenario: fallback
native_diagnostic: true
- scenario: compatibility-only
native_diagnostic: true
env:
E2E_MANAGED_IMAGE_REVISION: ${{ needs.base-image-publication.outputs.managed_image_revision }}
E2E_MANAGED_IMAGE_COHORT_RECEIPT: ${{ needs.base-image-publication.outputs.managed_image_receipt }}
Expand Down Expand Up @@ -7132,6 +7153,7 @@ jobs:
SELECTED_WORKFLOW_JOBS: ${{ needs.generate-matrix.outputs.selected_workflow_jobs }}
JOB_PR_NUMBER: ${{ inputs.pr_number }}
JOB_TARGETS: ${{ inputs.targets }}
JOB_NATIVE_HERMES_GPU_DIAGNOSTIC: ${{ inputs.native_hermes_gpu_diagnostic && 'true' || 'false' }}
JOBS: ${{ inputs.jobs }}
NEEDS_JSON: ${{ toJSON(needs) }}
with:
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ Add the existing `--jobs` or `--targets` selector to render a filtered plan:

```bash
npx tsx tools/e2e/workflow-plan.mts --summary --jobs hermes-e2e
npx tsx tools/e2e/workflow-plan.mts --summary --jobs hermes-gpu-startup --native-hermes-gpu-diagnostic
npx tsx tools/e2e/workflow-plan.mts --summary --targets ubuntu-repo-cloud-openclaw
```

Expand Down Expand Up @@ -1490,6 +1491,15 @@ snake-case include entries and use `coverage_variant` when one job contributes
multiple rows. `tools/e2e/workflow-plan.mts` composes and validates these sources.
Do not add a separate hand-maintained execution list.

The optional `native_hermes_gpu_diagnostic` workflow input selects only the existing native Hermes GPU scenario.
It requires `jobs=hermes-gpu-startup` and empty `targets`. It defaults to false.
Use it to diagnose native startup without invoking legacy fallback fixtures.
It does not qualify fallback or compatibility-only; full qualification retains all three scenarios.
Record the selection in the dispatch grant and preserve it for base replay.
Native diagnostics use a separate concurrency group from full qualification.
The run’s E2E Execution Plan summary identifies native-only scope and the two unqualified scenarios.
Pinned PR-candidate diagnostics retain the existing reporting restriction and do not post a PR comment.

The typed registry contains executable matrix cells only. Each cell must name
executable platform, install, runtime, and onboarding routes plus resolved
coverage metadata. A declared lifecycle route must also be executable. Registry
Expand Down
16 changes: 16 additions & 0 deletions test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,3 +1139,19 @@ it.each(["failure", "skipped"])(
expect(report.body).not.toContain("All requested tests passed");
},
);

it("labels a native Hermes GPU diagnostic as partial scenario evidence", () => {
const report = renderE2eReport({
needs: {
"generate-matrix": { result: "success" },
"hermes-gpu-startup": { result: "success" },
},
env: { JOBS: "hermes-gpu-startup", JOB_NATIVE_HERMES_GPU_DIAGNOSTIC: "true" },
apiJobs: [],
apiJobsLoaded: true,
context: REPORT_CONTEXT,
});
expect(report.body).toContain(
"Native Hermes GPU diagnostic only. Fallback and compatibility-only remain unqualified.",
);
});
36 changes: 34 additions & 2 deletions test/e2e/support/manual-pr-concurrency.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function scheduling(overrides: Record<string, string | boolean | number> = {}) {
targets: "",
allow_jetson_dispatch: false,
include_staging_brev_launchable: false,
native_hermes_gpu_diagnostic: false,
...overrides,
};
// Evaluate the checked-in expressions with concrete inputs in a credential-free child.
Expand Down Expand Up @@ -71,7 +72,7 @@ describe("manual PR comparison scheduling", () => {
"format('pr-{0}-base-{1}', inputs.pr_number, inputs.base_sha)",
);
expect(validateE2eWorkflow(workflow)).toContain(
"workflow concurrency must isolate baseline comparisons and each Launchable dispatch",
"workflow concurrency must isolate baseline comparisons, Launchable dispatches, and native Hermes GPU diagnostics",
);
});

Expand Down Expand Up @@ -109,7 +110,38 @@ describe("manual PR comparison scheduling", () => {
(workflow.concurrency as Record<string, unknown>).group =
"e2e-${{ github.ref }}-pr-${{ inputs.pr_number }}-manual-pr";
expect(validateE2eWorkflow(workflow)).toContain(
"workflow concurrency must isolate baseline comparisons and each Launchable dispatch",
"workflow concurrency must isolate baseline comparisons, Launchable dispatches, and native Hermes GPU diagnostics",
);
});

it.each([
{ checkout_sha: "a".repeat(40), expectedCancel: true },
{ checkout_sha: "b".repeat(40), expectedCancel: false },
])(
"isolates native diagnostics from qualification for %j",
({ checkout_sha, expectedCancel }) => {
const selected = { checkout_sha, jobs: "hermes-gpu-startup" };
const qualification = scheduling(selected);
const diagnostic = scheduling({ ...selected, native_hermes_gpu_diagnostic: true });
expect(diagnostic.group).not.toBe(qualification.group);
expect(diagnostic.group).not.toBe(scheduling({ checkout_sha, jobs: "full-e2e" }).group);
expect(diagnostic.cancel).toBe(expectedCancel);
expect(qualification.cancel).toBe(expectedCancel);
expect(qualification).toEqual(
scheduling({ ...selected, native_hermes_gpu_diagnostic: false }),
);
},
);

it("rejects a diagnostic that shares a qualification concurrency group", () => {
const workflow = readWorkflow();
const concurrency = workflow.concurrency as Record<string, unknown>;
concurrency.group = String(concurrency.group).replace(
"${{ inputs.native_hermes_gpu_diagnostic && '-native-hermes-gpu-diagnostic' || '' }}",
"",
);
expect(validateE2eWorkflow(workflow)).toContain(
"workflow concurrency must isolate baseline comparisons, Launchable dispatches, and native Hermes GPU diagnostics",
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe("staging Brev Launchable identity workflow boundary", () => {
it("rejects outer concurrency that lets focused Launchable dispatches replace each other", () => {
const value = readWorkflow();
const validationError =
"workflow concurrency must isolate baseline comparisons and each Launchable dispatch";
"workflow concurrency must isolate baseline comparisons, Launchable dispatches, and native Hermes GPU diagnostics";
expect(validateE2eWorkflow(value)).not.toContain(validationError);
(value.concurrency as Record<string, unknown>).group =
"e2e-${{ github.ref }}-${{ inputs.jobs }}";
Expand Down
Loading
Loading