Skip to content

perf(e2e): skip throwaway Hermes onboarding - #7244

Closed
cjagwani wants to merge 4 commits into
codex/e2e-exdev-parallel-lanesfrom
codex/e2e-hermes-rebuild-bootstrap
Closed

perf(e2e): skip throwaway Hermes onboarding#7244
cjagwani wants to merge 4 commits into
codex/e2e-exdev-parallel-lanesfrom
codex/e2e-hermes-rebuild-bootstrap

Conversation

@cjagwani

Copy link
Copy Markdown
Collaborator

Summary

Removes the throwaway current Hermes install/onboard/delete cycle from the rebuild E2E lanes. The rebuild scenarios now build the current source CLI in workspace setup, install pinned OpenShell, start the named gateway, and enter the old-sandbox rebuild fixture directly, saving an estimated 6–7 minutes per lane while retaining backup/recreate/restore and stale-base coverage.

Related Issue

Part of #7140.

Changes

  • Use the canonical prepare-e2e CLI build and a credential-sanitized pinned OpenShell install in both Hermes rebuild jobs.
  • Replace install.sh and its generated current sandbox with a direct current-CLI/pinned-gateway bootstrap.
  • Run rebuild and cleanup through the checked-out CLI entrypoint instead of relying on a host-exposed installation.
  • Preserve old Hermes base construction, curated registry/session state, messaging placeholders, backup hygiene, rebuild, stale-cache refresh, and post-rebuild runtime assertions.
  • Add a support contract preventing the removed install/current-sandbox bootstrap from returning.

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:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: Documentation review found no claim that rebuild-hermes owns installer coverage or must create a throwaway current sandbox; contributor commands remain unchanged.
  • 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: Workflow boundaries require the pinned OpenShell installer to unset Docker, NVIDIA, and GitHub credentials; the live test preserves sandbox/provider cleanup and backup credential-leak assertions.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

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 check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: 57 rebuild workflow/timing/runner-pressure tests and 44 bootstrap/workflow tests passed; CLI type-check, Biome, YAML validation, repository checks, and project membership checks passed.
  • 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: Charan Jagwani cjagwani@nvidia.com

@cjagwani cjagwani self-assigned this Jul 20, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 425e50c2-7b72-4b94-af9d-fa129a557444

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/e2e-hermes-rebuild-bootstrap

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

@github-code-quality

github-code-quality Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 8263aae in the codex/e2e-hermes-reb... branch remains at 96%, unchanged from commit a5ccdca in the codex/e2e-exdev-para... branch.

TypeScript / code-coverage/cli

The overall coverage in commit 8263aae in the codex/e2e-hermes-reb... branch remains at 80%, unchanged from commit a5ccdca in the codex/e2e-exdev-para... branch.

Show a code coverage summary of the most impacted files.
File codex/e2e-exdev-para... a5ccdca codex/e2e-hermes-reb... 8263aae +/-
src/lib/onboard...box-prebuild.ts 88% 69% -19%
src/lib/actions...ess-recovery.ts 78% 77% -1%
src/lib/messagi...flow-planner.ts 93% 93% 0%
src/lib/onboard...-patch-clone.ts 94% 94% 0%
src/lib/onboard...erfile-patch.ts 93% 93% 0%
src/lib/onboard...es-dashboard.ts 62% 62% 0%
src/lib/onboard...st-proxy-env.ts 95% 95% 0%
src/lib/actions...eway-restart.ts 90% 93% +3%
src/lib/onboard...host-anchors.ts 90% 94% +4%
src/lib/onboard...corporate-ca.ts 92% 100% +8%

Updated July 20, 2026 15:56 UTC

cjagwani added 2 commits July 20, 2026 08:26
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Partial review preserved 1 canonical finding(s) before the advisor stopped.

Model lanes

  • GPT-5.6 Terra (primary): Failed after a partial review · low confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, security-posture, rebuild-hermes, rebuild-hermes-stale-base

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Add a negative regression test for Hermes installer credential scrubbing

  • Location: tools/e2e/workflow-boundary.mts:1608
  • Category: tests
  • Problem: The PR adds enforcement that both Hermes rebuild jobs' new `Install OpenShell CLI` step contains six `env -u` credential removals, but the checked-in tests only assert the unmodified workflow validates. No test mutates either Hermes installer command and proves this new enforcement rejects a removed scrubber.
  • Impact: A future change can weaken or remove the credential-scrubbing requirement in these secret-adjacent installer steps without a focused regression failure, exposing workflow credentials to installer execution.
  • Recommendation: Extend the existing E2E workflow-boundary unit tests to remove one required `-u` fragment (ideally parameterized over all six) from each Hermes installer step and assert the corresponding validation error.
  • Verification: Inspect `test/e2e/support/e2e-workflow.test.ts` and confirm it has no mutation case for `rebuild-hermes` or `rebuild-hermes-stale-base` that removes an installer `-u` fragment and asserts `validateE2eWorkflowBoundary` rejects it.
  • Test coverage: A unit test that clones the parsed E2E workflow, removes `-u NVIDIA_INFERENCE_API_KEY` (and preferably each of the six required variables) from both Hermes `Install OpenShell CLI` steps, and asserts the boundary validator reports the job/step-specific missing-fragment error.
  • Evidence: `tools/e2e/workflow-boundary.mts:1608-1620` adds the six required installer `-u` fragments for both Hermes jobs. `test/e2e/support/e2e-workflow.test.ts:36-39` validates only the unmodified workflow; its Hermes-specific mutations at lines 208-230 cover Docker engine cache selection, not installer sanitization. The other installer-sanitization mutation tests identified in the test inventory target different jobs.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@cjagwani

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@cjagwani

Copy link
Copy Markdown
Collaborator Author

@apurvvkumaria overlap check before extending this stack: #7213 now covers the same Hermes bootstrap surface plus the immutable fixture, provenance, exact current-base reuse, lifecycle assertions, and measured 38–42% median improvement. A repository comparator pass scored #7213 at 14.5/16 versus this narrower draft at 13/16; #7213 covers nearly all #7144 criteria, while this draft uniquely removes the phase-one current sandbox and starts the pinned gateway directly.

Could you confirm whether #7213 should supersede #7244, or whether the direct-gateway bootstrap remains desirable as a follow-on after #7213? I am keeping this PR draft and will not combine the conflicting designs without that direction.

@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 integration: hermes Hermes integration behavior labels Jul 20, 2026

@dfernandez365-rgb dfernandez365-rgb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent exact-head sensitive-path review of 8263aaeeb19cc5c353707b5e2c00544bf4b3d83d: FAIL. The performance direction is reasonable, but the replacement bootstrap removes state that authoritative rebuild requires and seeds a port the production preflight explicitly rejects.

  1. HIGH — Configure the required OpenShell inference route before rebuild. test/e2e/live/rebuild-hermes.test.ts:545-561 starts and probes only the gateway. The provider created later at lines 622-642 is the Discord credential provider, not an inference route. Seeding registry/session JSON does not configure gateway state. preflightAuthoritativeRebuildTarget() requires inferenceRouteReady(target.provider, target.model) unless a prepared-backup deferral is explicit (src/lib/onboard/authoritative-rebuild-target.ts:196-210), and the helper proves that state through openshell inference get -g <gateway> (src/lib/onboard/inference-route.ts:18-39). This exact test should therefore fail before destructive rebuild work. Configure the compatible provider/model route through the supported OpenShell interface and assert the exact live route before invoking rebuild.

  2. HIGH — Do not persist Hermes API port 8642 as dashboardPort. HERMES_API_FORWARD_PORT is 8642, assigned to phase1DashboardPort at test/e2e/live/rebuild-hermes.test.ts:562, then written into the curated registry at lines 375 and 758-760. Production defines 8642 as the reserved Hermes OpenAI-compatible API port, never a dashboard port (src/lib/core/ports.ts:62-63); the Hermes dashboard is separately exposed on 18789 (agents/hermes/manifest.yaml:35-48). Authoritative preflight calls assertDashboardPortNotReserved() and deterministically rejects 8642 (src/lib/onboard/authoritative-rebuild-target.ts:212-214, src/lib/onboard/preflight-ports.ts:45-54). Preserve separate API and dashboard/control-UI ports and add a regression that the curated target passes authoritative preflight.

  3. HIGH correctness / MEDIUM trust — Bind execution to the OpenShell binary that this workflow installs. .github/workflows/e2e.yaml:2284-2300 installs in one step, then the test invokes bare openshell. In noninteractive mode the installer can write $HOME/.local/bin/openshell and explicitly warns that PATH must be updated (scripts/install-openshell.sh:791-822); it may also reuse/replace another compatible location. The test and fixture clients default to openshell, so the job can fail to find the installed binary or execute a stale system binary. Follow the nearby canonical workflow pattern: resolve an absolute selected binary, prepend $HOME/.local/bin, export OPENSHELL_BIN, and record/verify the selected version and provenance before the test.

  4. MEDIUM — The new credential-scrubbing boundary is lexical and untested. tools/e2e/workflow-boundary.mts:1603-1614 accepts raw -u NAME substrings, so comments/dead shell text can satisfy it, and no negative mutation test removes any required scrubber from either job. The existing advisor warning is correct. It is also incomplete: scripts/install-openshell.sh:742 prefers GH_TOKEN over GITHUB_TOKEN, but the new step unsets only GITHUB_TOKEN. Validate the actual command/order, unset both tokens, and add negative mutations for every scrubbed variable in both jobs.

The exact-head credentialed rebuild jobs did not run: the PR E2E gate stopped at maintainer authorization/observer timeout. Static green checks therefore do not rebut the deterministic route and reserved-port failures above. Please keep this draft until both live rebuild lanes execute against the repaired exact head and upload artifacts.

cv added a commit that referenced this pull request Jul 23, 2026
<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 plain sentences: what changes and why. Describe
before-and-after behavior when it applies. Follow the NemoClaw Writing
Guide: https://github.com/NVIDIA/NemoClaw/blob/main/WRITING.md. Do not
add unrelated prose cleanup. -->
Rebuilds #7245 on current `main` and centralizes larger-runner selection
for resource-heavy E2E lanes. Trusted final-main executions can use one
administrator-configured label, while unset, PR-checkout, and untrusted
contexts continue to use `ubuntu-latest`. Exact-head PR gates now add a
bounded swap fallback for the hosted Hermes image-building lanes that
intentionally remain on standard runners.

## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->
Part of #7145. Supersedes #7245, whose protected head branch is stacked
on obsolete #7244 history.

## Changes
<!-- List concrete changes. If this adds an abstraction, configuration,
fallback, migration, or compatibility path, name its current requirement
and consumer, explain why a direct change is insufficient, and identify
the test that protects it. -->

- Build one validated runner map in `generate-matrix` before target code
is checked out, consuming `E2E_LARGER_RUNNER_LABEL` only for
`NVIDIA/NemoClaw` on `refs/heads/main` with no alternate checkout SHA.
- Route common egress, Hermes rebuilds, heavy MCP shards, and the Hermes
lanes repeatedly interrupted in run 29897237525 through that map.
- Keep the OpenClaw matrix counterparts, MCP OpenClaw/dev lanes, and
unrelated jobs on standard runners.
- For exact-head PR gates only, reuse at least 32 GiB of active swap or
provision one fixed 32 GiB file before the hosted Hermes image-building
lanes. The setup uses absolute non-interactive executables in a clean
environment and fails closed before Vitest.
- Exclude scheduled/manual `main`, larger-runner, workflow-managed
rebuild, dedicated-runner, MCP dev, and non-Hermes executions from the
swap fallback.
- Document the runner sizing, concurrency, comparison, fallback, and
rollback requirements.
- Protect the centralized rollout, exact-head fallback, and trust
boundary with executable tests. A workflow-only swap step cannot help an
alternate checkout until that workflow revision reaches trusted `main`.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
<!-- Check one tests line and one docs line. Check other lines when
applicable. Add every requested justification or approval reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [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: Independent focused
review passed with no blockers after exact-head-only activation,
absolute privileged executables, a clean fixed environment, and
active-swap-safe cleanup were enforced at `af1cb1c77`.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed
implementation
- Result: `docs-updated`
- Evidence: `test/e2e/README.md` documents the larger-runner trust
boundary and the bounded exact-head swap fallback, selected Hermes
lanes, fail-closed behavior, exclusions, sizing, measurement, and
rollback requirements.
- Agent: Codex Desktop
- PR: #7391
<!-- docs-review-head-sha: 0d92d12 -->
<!-- docs-review-agents-blob-sha: 560ff38 -->

## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or merging.
This is human-reviewed evidence, not authenticated hardware provenance.
Exceptional bypasses use existing repository governance and must be
documented on the PR. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes a `Signed-off-by:` line 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 — 59 focused E2E-support tests passed
after the current `main` sync.
- [x] Applicable broad gate passed — `npm run checks`, `npm run
typecheck:cli`, and `npm run docs` passed; Fern reported 0 errors and 2
non-fatal warnings.
- [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)

---
<!-- 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: Apurv Kumaria <akumaria@nvidia.com>


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

* **New Features**
* E2E workflows now generate a trusted runner-routing map and use it to
route selected “heavy” lanes to a configurable larger Ubuntu runner,
with validation and safe fallback to `ubuntu-latest`.
* Live Vitest E2E runs can now provision a bounded Hermes swap file
beforehand when required, and fail closed if provisioning fails.
* **Documentation**
* Added guidance for enabling, validating boundaries, and rolling back
larger-runner routing.
* **Tests**
* Added e2e boundary coverage for runner routing and expanded Hermes
swap provisioning/selection coverage.
* **CI / Chores**
* Updated workflow boundary checks and routing assertions to match the
new trusted routing behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Charan Jagwani <cjagwani@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

I am working on the #7144 current-main refresh and noticed that this PR is the overlapping implementation. I have not pushed the local branch or opened a competing PR.

The current-main version removes the disposable current Hermes onboard/sandbox, resolves only the published Dockerfile-pinned base, bootstraps the product gateway/inference route directly, preserves the existing rebuild/state assertions, and adds focused provenance, route, and dashboard-port guards. It is based on current main; this PR is still based on #7243, which is now closed unmerged.

@cjagwani, are you planning to refresh #7244 onto main, or would you prefer that I publish the current-main successor and credit this work? I will hold publication until we align so we do not duplicate effort.

@cv

cv commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Closing this draft history as non-viable for the release. #7449 replaced only the closed EXDEV base #7243; it did not supersede the unique Hermes rebuild-bootstrap performance idea. However, this PR is still stacked on #7243’s closed, unmerged non-main branch, cannot be maintainer-edited, and its exact-head review has three HIGH route/port/binary-provenance defects plus incomplete credential scrubbing. The credentialed rebuild lanes never ran, so static checks cannot validate the replacement bootstrap. Please preserve the idea under #7140 and, only after its current prerequisites/design are settled, open a fresh current-main PR that configures and proves the inference route, separates API/dashboard ports, binds the installed OpenShell binary, scrubs both GitHub token variables with negative boundary tests, and runs both credentialed rebuild lanes.

@cv cv closed this Jul 26, 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 integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants