Skip to content

fix(e2e): install reviewed SDK from locked dependencies - #11455

Merged
sandl99 merged 2 commits into
mainfrom
fix/e2e-sdk-install-edgesout
Sep 10, 2026
Merged

fix(e2e): install reviewed SDK from locked dependencies#11455
sandl99 merged 2 commits into
mainfrom
fix/e2e-sdk-install-edgesout

Conversation

@sandl99

@sandl99 sandl99 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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

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.

Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99 sandl99 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

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: 476c7810-aa19-426b-8036-b5df0e76ddfb

📥 Commits

Reviewing files that changed from the base of the PR and between 5b82037 and 4238cdd.

📒 Files selected for processing (7)
  • .github/workflows/e2e-standard-profile.yaml
  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/openshell-sdk-install.test.ts
  • test/helpers/vitest-watch-triggers.ts
  • test/repository/vitest-watch-triggers.test.ts
  • tools/e2e/standard-profile-workflow-boundary.mts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The E2E workflows now cache the SDK archive offline, run credential-free npm ci, and validate SDK loading. Tests execute real offline installation flows, verify command behavior, cover failures, and update workflow watch triggers.

Changes

Offline SDK installation

Layer / File(s) Summary
Offline installation flow
.github/workflows/e2e-standard-profile.yaml, .github/workflows/e2e.yaml, tools/e2e/standard-profile-workflow-boundary.mts, test/e2e/README.md
The workflows and standard-profile tooling add the SDK archive to the npm cache, run locked offline dependency installation, disable package credentials and scripts, and validate OpenShellClient.connect.
Installation behavior tests
test/e2e/support/openshell-sdk-install.test.ts
The test builds local archives, executes real offline npm flows, checks command ordering, integrity, package loading, credential isolation, script suppression, invalid archives, and staged failures.
Workflow test trigger coverage
test/helpers/vitest-watch-triggers.ts, test/repository/vitest-watch-triggers.test.ts
Workflow watch mappings and expectations include the SDK installation test for both E2E workflows.

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

Suggested reviewers: cv, ericksoa, prekshivyas

Merge Risk: ⚪ Minimal · up to 4238c

No actionable merge-blocking risk remains from the reviewed SDK installation changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: installing the reviewed SDK through locked dependencies in E2E workflows.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-sdk-install-edgesout

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

@github-code-quality

github-code-quality Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 4238cdd in the fix/e2e-sdk-install-... branch remains at 96%, unchanged from commit 5b82037 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 4238cdd in the fix/e2e-sdk-install-... branch remains at 83%, unchanged from commit 5b82037 in the main branch.


Updated September 10, 2026 16:17 UTC

@sandl99
sandl99 marked this pull request as ready for review September 10, 2026 16:02
@sandl99
sandl99 requested review from cv and rsliter September 10, 2026 16:06

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed exact head 4238cdd with no blocking findings. The change replaces unlocked SDK peer re-resolution with lockfile-driven npm ci, stages the reviewed archive in npm cache without package credentials, keeps lifecycle scripts disabled, and validates the SDK connection API. Independent Linux/Brev verification passed all 8 focused SDK-install tests, including real offline installs for both workflow paths, locked transitive/sibling dependencies, missing or ambiguous archives, and failure propagation. This directly addresses the 61-job npm Arborist edgesOut signature in main run 34501169319. Final live validation remains the first trusted main E2E run after merge.

@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 labels Sep 10, 2026
@sandl99
sandl99 merged commit 9166f90 into main Sep 10, 2026
68 checks passed
@sandl99
sandl99 deleted the fix/e2e-sdk-install-edgesout branch September 10, 2026 17:10
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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants