Skip to content

fix(e2e): install reviewed OpenShell SDK for catalogue jobs - #11397

Merged
cv merged 3 commits into
mainfrom
codex/fix-network-policy-export
Sep 10, 2026
Merged

fix(e2e): install reviewed OpenShell SDK for catalogue jobs#11397
cv merged 3 commits into
mainfrom
codex/fix-network-policy-export

Conversation

@cv

@cv cv commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Outcome

Catalogue E2E jobs install the reviewed OpenShell SDK before running SDK-backed commands such as nemoclaw config export. JSON command failures also retain their redacted error message alongside exit metadata.

Reason

The network-policy job failed during configuration export, after onboarding and before its network-policy probes. Its retained output contained only error.oclif.exit, which hid the failure reason.

Catalogue workspace setup uses npm ci --ignore-scripts without package credentials. The private OpenShell SDK is an optional dependency, so that setup can succeed without installing the SDK required by configuration export. The workflow already packages a verified SDK archive for external-gateway health checks, but catalogue jobs did not consume it.

Changes

  • Run the existing trusted SDK package job for E2E runs and pass its run-scoped artifact to all five catalogue profiles. Package-read permission stays with the producer.
  • Install exactly one archive without package scripts or authentication environment variables, then check that OpenShellClient.connect loads before restoring the CLI and running the target.
  • Preserve non-enumerable Error.message before the existing JSON redaction. Add command and configuration-export regressions.
  • Update workflow boundary checks and the E2E maintainer guide. Add shell-boundary tests for a valid archive, missing or duplicate archives, credential removal, and an unusable SDK.

Verification

  • Focused CLI and E2E-support tests: 7 files, 214 tests passed. Command: npx vitest run --project cli --project e2e-support src/commands/config/export.test.ts src/lib/cli/nemoclaw-oclif-command.test.ts src/commands/doctor.test.ts test/e2e/support/standard-profile-workflow-boundary.test.ts test/e2e/support/openshell-sdk-install.test.ts test/e2e/support/base-image-publication-workflow-boundary.test.ts test/e2e/support/workflow-plan.test.ts --coverage=false.
  • npm run build:cli and npm run validate:pr: passed for publication commit ce894e7594cec7d63c1c490ebcbb75d556447aaa in the isolated checkout.
  • npm run check: 34,442 CLI/integration tests passed, 280 failed, and one suite failed during TLS fixture setup; plugin coverage passed. Rerunning all 45 failing files on canonical base e94c06f130e1904229c9214f9d1f914b98f6b1ba reproduced the same 281 failure records. These include temporary-checkout permissions, OpenSSL fixtures, process cleanup in the container, and DGX Spark host detection. This local broad gate is not reported as passing.
  • Reviewed the complete diff and passed the repository secret scan; no secrets, API keys, or credentials are included.
  • Live confirmation remains pending. Manual candidate E2E uses the trusted main workflow and would not exercise these candidate workflow changes. The retained job proves the export failure; the repair addresses the SDK setup gap found in its workflow.

Review notes

Self-review covers NVIDIA/NemoClaw commit ce894e7, including sensitive paths .github/workflows/e2e.yaml, .github/workflows/e2e-standard-profile.yaml, tools/e2e/operations-workflow-boundary.mts, and tools/e2e/standard-profile-workflow-boundary.mts. Review checked the package producer, all catalogue consumers, credential boundaries, failure behavior, and regression evidence. No independent pre-publication review has occurred; these paths await independent review in this draft PR.

Validation uses canonical base e94c06f130e1904229c9214f9d1f914b98f6b1ba. Package manifests, lockfiles, hook configuration, and validator entry points match that base. Because the E2E validation helpers change, checks ran in a disposable Ubuntu container with no network, host credentials, signing agent, Docker socket, or added capabilities. Node and resolved validator executables were fingerprinted, and the tested source tree was checked against the publication tree. Publication hooks run in that same isolation and propagate failures; commit signing remains outside the container. This records validation for the maintainer-requested PR and does not claim independent approval or a CI waiver.


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

Summary by CodeRabbit

  • Bug Fixes

    • Improved command-line error reporting in JSON mode, preserving exit codes and redacting sensitive API keys.
    • Standardized SDK validation during automated test workflows to detect missing, ambiguous, or incompatible packages earlier.
  • Security

    • SDK installation now avoids package credentials and lifecycle scripts.
  • Documentation

    • Added guidance describing SDK packaging, verification, and installation for end-to-end test profiles.
  • Tests

    • Expanded coverage for structured error output, SDK installation, artifact handling, and workflow configuration.

cv added 2 commits September 9, 2026 22:44
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Sep 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 10, 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 Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b67461ae-4528-4a04-aa3f-3b7338770860

📥 Commits

Reviewing files that changed from the base of the PR and between 5150eb7 and 39d3cdd.

📒 Files selected for processing (10)
  • .github/workflows/e2e-standard-profile.yaml
  • .github/workflows/e2e.yaml
  • src/commands/config/export.test.ts
  • src/lib/cli/nemoclaw-oclif-command.test.ts
  • src/lib/cli/nemoclaw-oclif-command.ts
  • test/e2e/README.md
  • test/e2e/support/openshell-sdk-install.test.ts
  • test/e2e/support/standard-profile-workflow-boundary.test.ts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/standard-profile-workflow-boundary.mts

📝 Walkthrough

Walkthrough

The PR integrates a reviewed OpenShell SDK artifact into catalogue E2E workflows. It adds credential-free SDK installation and validation, expands workflow boundary tests, and preserves structured CLI error details in JSON output.

Changes

OpenShell SDK E2E integration

Layer / File(s) Summary
Catalogue workflow SDK wiring
.github/workflows/e2e.yaml, tools/e2e/operations-workflow-boundary.mts, tools/e2e/standard-profile-workflow-boundary.mts
Catalogue jobs now depend on SDK packaging and pass its artifact name to the standard profile workflow.
Reviewed SDK installation contract
.github/workflows/e2e-standard-profile.yaml, tools/e2e/standard-profile-workflow-boundary.mts, test/e2e/README.md
The profile downloads exactly one reviewed archive, installs it without credentials or package scripts, and validates OpenShellClient.connect.
SDK workflow validation
test/e2e/support/openshell-sdk-install.test.ts, test/e2e/support/standard-profile-workflow-boundary.test.ts
Tests cover archive selection, credential removal, installation behavior, SDK loading, and workflow dependency rules.

CLI JSON error serialization

Layer / File(s) Summary
Structured CLI error output
src/lib/cli/nemoclaw-oclif-command.ts, src/lib/cli/nemoclaw-oclif-command.test.ts, src/commands/config/export.test.ts
JSON error output preserves messages and exit codes, redacts API keys, and stops document publication after observation failure.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SDKPackageJob
  participant CatalogueJob
  participant StandardProfile
  participant OpenShellSDK
  SDKPackageJob->>CatalogueJob: provide reviewed artifact name
  CatalogueJob->>StandardProfile: pass openshell_sdk_artifact_name
  StandardProfile->>SDKPackageJob: download named artifact
  StandardProfile->>OpenShellSDK: install one archive without credentials or scripts
  StandardProfile->>OpenShellSDK: validate OpenShellClient.connect
Loading

Suggested reviewers: apurvvkumaria, aasthajh

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-network-policy-export

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit ce894e7 in the codex/fix-network-po... branch remains at 96%, unchanged from commit e94c06f in the main branch.

@cv
cv marked this pull request as ready for review September 10, 2026 08:48
@cv
cv merged commit ec7694a into main Sep 10, 2026
25 of 28 checks passed
@cv
cv deleted the codex/fix-network-policy-export branch September 10, 2026 08:48
sandl99 added a commit that referenced this pull request Sep 10, 2026
## Outcome

Catalogue E2E jobs and the external-gateway health job install the
reviewed OpenShell SDK from the locked dependency graph. SDK setup no
longer re-resolves project dependencies before the tests run.

## Reason

[The gateway
job](https://github.com/NVIDIA/NemoClaw/actions/runs/34477226195/job/102872848753)
failed during the SDK install added by #11397. At inspection time, 61
jobs in that run failed at the same shared step. The
`--package-lock=false` install reproduced an npm Arborist `edgesOut`
crash while resolving Vitest peers, before any gateway test ran.

## Changes

- Add the reviewed SDK archive to npm's cache, then use `npm ci` with
lifecycle scripts disabled and cached packages preferred. Apply this to
both SDK installation paths.
- Keep package credentials out of cache staging, installation, and SDK
validation. Require the SDK connection API to load in both workflows.
- Add offline tests with real npm and local package archives. Cover the
missing optional SDK, locked transitive and sibling dependencies,
disabled lifecycle scripts, and setup failures. Select these tests when
either owning workflow changes.

## Verification

- Reproduced the original `edgesOut` crash with Node 22.23.2 and npm
10.9.8 in Linux ARM64 using the retained, integrity-verified SDK
archive.
- Executed the fixed catalogue script from the changed YAML against the
full dependency graph with networking disabled: 509 packages installed,
the SDK API loaded, and SHA-256 digests of both manifests remained
unchanged.
- `npx vitest run --project e2e-support
test/e2e/support/openshell-sdk-install.test.ts
test/e2e/support/standard-profile-workflow-boundary.test.ts
test/e2e/support/base-image-publication-workflow-boundary.test.ts
test/e2e/support/workflow-plan.test.ts
test/e2e/support/e2e-operations-workflow-boundary.test.ts
--coverage=false` — 255 tests passed. The final SDK test rerun passed
all 8 tests.
- `npx vitest run --project integration
test/repository/vitest-watch-triggers.test.ts --coverage=false` — 77
tests passed.
- `npm run checks:repository`, `npm run source-shape:check`,
changed-file Oxlint/Oxfmt, ShellCheck for both install scripts, and `git
diff --check` — passed.
- `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` — passed
in the isolated Linux container after building the CLI and plugin. All
pre-commit, commit-message, and applicable pre-push checks passed.
- Reviewed the complete diff for secrets, API keys, and credentials;
none are included.

## Review notes

Self-review covers NVIDIA/NemoClaw commit
`316b0a6606cff97147f2c4a78ec9b49cc1f51de7`, including sensitive paths
`.github/workflows/e2e-standard-profile.yaml`,
`.github/workflows/e2e.yaml`, and
`tools/e2e/standard-profile-workflow-boundary.mts`. Review checked
archive selection, lockfile installation, credential removal, disabled
scripts, failure propagation, sibling coverage, and regression evidence.
Independent review of these paths is pending.

Publication validation uses canonical base
`5b82037acb402862bb590ef57cb4d4c608e35ce7`. Its validation entry points,
hook configuration, package manifests, and lockfiles match the
candidate. The changed workflow validator expectations and watch
mappings were reviewed separately. Validation runs in an offline
container without host credentials, signing access, host mounts, or a
Docker socket. Resolved validator files and the Node/npm executables are
fingerprinted. This records the maintainer-requested publication
evidence and does not claim independent approval or a CI waiver. GitHub
CI and live E2E confirmation remain pending.

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

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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved end-to-end test setup by installing the SDK through a cached,
offline-compatible workflow.
- Removed the need to provide package credentials during SDK
installation.
- Added validation that the SDK connection API is available before tests
run.

- **Tests**
- Expanded coverage for installation failures, invalid or missing
packages, and staged setup issues.
- Updated workflow monitoring so SDK installation checks run when
relevant E2E workflows change.

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

Signed-off-by: San Dang <sdang@nvidia.com>
prekshivyas added a commit that referenced this pull request Sep 11, 2026
## Outcome

Manual PR E2E now stages the active reviewed OpenShell SDK and any
approved transition replacement, then lets the candidate lockfile select
the exact version. This preserves ordinary main runs while allowing
reviewed SDK upgrade PRs to reach product tests.

## Reason

PR #11251 run 34540154148 failed across the catalogue before product
execution. The trusted workflow packaged SDK 0.0.106 from main, while
the candidate lock requires 0.0.116. After #11455 switched installation
to cache staging plus npm ci, npm correctly followed the candidate lock
but could not satisfy it from the single cached archive, omitted the
private optional dependency, and every consumer failed with
ERR_MODULE_NOT_FOUND.

#11397 introduced the single-main-version artifact assumption. #11455
exposed that latent mismatch deterministically.

## Changes

- Add an optional reviewed-replacement packaging mode without weakening
the existing strict transition mode used by pull_request_target.
- Make E2E package the active SDK plus an available base-approved
replacement.
- Allow exactly one archive in steady state or two during an approved
transition, cache each without credentials or lifecycle scripts, and
retain lockfile-driven npm ci.
- Add real-npm coverage for both active and replacement lock selection
in catalogue and external-gateway workflows.
- Extend workflow and package-verifier boundary coverage and
documentation.

## Verification

- Exact retained PR artifact from run 34536766601 contained reviewed SDK
0.0.106 and 0.0.116 archives. Against PR #11251 package.json and
package-lock.json, the proposed commands installed 509 packages,
selected exactly SDK 0.0.116, and imported OpenShellClient.connect.
- Real Linux npm tests cover active and replacement selection in both
workflow scripts: 11/11 passed.
- Package transition tests: 5/5 passed.
- Standard-profile boundary tests: 17/17 passed.
- Base-image, operations, watch-trigger, and workflow-plan coverage: 320
tests passed initially; the 19 missing-esbuild setup failures were
repaired, then 106/107 workflow-plan tests passed and the sole 5-second
container timeout passed with a 15-second harness budget.
- Repository checks, source-shape checks, canonical CLI build,
TypeScript checks, formatting, lint, YAML validation, secret scan, E2E
semantic phases, growth guardrails, commit hooks, and pre-push hooks
passed.
- Brev was attempted first but its local auth-token JSON is truncated; a
credential-free feedback report was submitted. The equivalent Linux
Docker reproduction completed locally.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

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

## Summary by CodeRabbit

* **New Features**
* SDK packaging and installation now support one or two approved archive
versions, including available transition replacements.
* Optional replacement packages can be included when available, while
required replacements are validated explicitly.

* **Bug Fixes**
* Archive discovery is now deterministic and rejects missing, excessive,
or ambiguous archive combinations.
* Reviewed SDK archives are cached offline without package credentials.
* Dependency installation verifies the selected SDK version and
suppresses lifecycle scripts for safer setup.

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

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant