Skip to content

ci(e2e): include shared CLI runtime in artifact - #8337

Closed
sandl99 wants to merge 2 commits into
mainfrom
ci/fix-e2e-cli-artifact-runtime
Closed

sandl99 wants to merge 2 commits into
mainfrom
ci/fix-e2e-cli-artifact-runtime

Conversation

@sandl99

@sandl99 sandl99 commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The shared E2E artifact restored dist/ but omitted the generated modules under nemoclaw/dist/shared/, so artifact consumers stopped before tests with MODULE_NOT_FOUND. The artifact now packages, validates, and restores both compiled roots before the CLI version check.

Changes

  • Package dist/ and nemoclaw/dist/shared/ in the content-addressed candidate CLI artifact.
  • Reject an archive that omits required generated modules, adds unexpected paths, or would overwrite either compiled destination.
  • Execute the restored shared runtime in the regression fixture instead of using a standalone fake CLI.
  • Pin all 62 artifact consumers to action commit ba10383ce965a78b470e15c65948bbf739bfb0ca.
  • Update test/e2e/README.md with the two-root artifact and restore contract.

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: This changes an internal CI artifact contract. test/e2e/README.md documents that contract; no user-facing command, configuration, or output changes.
  • 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: Maintainer review of the archive extraction and activation boundary is pending.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: test/e2e/README.md documents the two-root candidate CLI artifact, validation requirements, and restore behavior.
  • Agent: Codex CLI

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

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 validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project e2e-support test/e2e/support/cli-artifact-workflow-boundary.test.ts test/e2e/support/prepare-e2e-workflow-boundary.test.ts test/e2e/support/runner-comparison-workflow-boundary.test.ts — 3 files, 69 tests 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: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved end-to-end CLI artifact restoration for shared runtime files.
    • Added validation to reject incomplete artifacts and avoid overwriting existing compiled directories.
    • Updated artifact packaging and restoration checks to support the relocated shared runtime.
  • Tests
    • Expanded end-to-end coverage for successful restoration, missing files, existing directories, and dangling links.
  • Documentation
    • Updated end-to-end artifact workflow guidance and validation requirements.

sandl99 added 2 commits August 5, 2026 19:16
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99 sandl99 self-assigned this Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The E2E CLI artifact now packages and restores nemoclaw/dist/shared with the existing root dist. Validation protects preexisting paths, checks required runtime modules, updates pinned action references, and adds boundary tests.

Changes

CLI artifact shared runtime

Layer / File(s) Summary
Package shared runtime modules
.github/workflows/e2e.yaml, tools/e2e/cli-artifact-workflow-boundary.mts, test/e2e/support/cli-artifact-workflow-boundary.test.ts
The producer validates and packages the shared runtime modules. Test archives include valid and missing-runtime variants.
Restore nested CLI build
.github/actions/restore-e2e-cli-artifact/action.yaml, .github/workflows/e2e.yaml, tools/e2e/cli-artifact-workflow-boundary.mts, test/e2e/README.md
The restore path validates and moves nemoclaw/dist alongside root dist. It rejects preexisting nested output and missing shared modules. E2E jobs use the updated pinned action.
Validate restoration boundaries
test/e2e/support/cli-artifact-workflow-boundary.test.ts
Boundary tests cover successful restoration, missing shared modules, preexisting directories, and dangling symlinks without overwriting existing contents.

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

Sequence Diagram(s)

sequenceDiagram
  participant E2EWorkflow
  participant RestoreAction
  participant Workspace
  participant VersionCheck
  E2EWorkflow->>RestoreAction: provide CLI artifact with dist and nemoclaw/dist/shared
  RestoreAction->>RestoreAction: validate shared runtime modules and target paths
  RestoreAction->>Workspace: restore dist and nemoclaw/dist
  Workspace->>VersionCheck: expose restored CLI
  VersionCheck->>Workspace: verify CLI version
Loading

Possibly related PRs

Suggested labels: area: ci, area: e2e, bug-fix

Suggested reviewers: apurvvkumaria, jyaunches, senthilr-nv

🚥 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 clearly summarizes the main change: adding the shared CLI runtime to the E2E artifact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch ci/fix-e2e-cli-artifact-runtime
🛠️ 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 ci/fix-e2e-cli-artifact-runtime

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

@sandl99

sandl99 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #8335, which merged the complete CLI build artifact restore fix into main before this PR opened. Post-merge E2E run 31008970541 confirms the artifact path is fixed: generate-matrix packaged successfully and consumer jobs restored the exact-commit CLI artifact successfully. The remaining run failure is unrelated (Deep Agents Code status assertion).

@sandl99 sandl99 closed this Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 1 warning · 1 suggestion
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 more warning, 1 more suggestion.
3 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • shared runtime at .github/actions/restore-e2e-cli-artifact/action.yaml:175: selected only by the second-opinion lane as conflict.
  • generated shared CLI runtime at test/e2e/support/cli-artifact-workflow-boundary.test.ts:473: selected only by the second-opinion lane as define.
  • generated shared runtime at .github/actions/restore-e2e-cli-artifact/action.yaml:175: selected only by the second-opinion lane as define.
3 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • mcp-bridge: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • hermes-e2e: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • openclaw-tui-chat-correlation: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — shared runtime at test/e2e/README.md:70: Keep `shared runtime` and name `nemoclaw/dist/shared/` where the artifact boundary matters.
  • justified — compiled directory at test/e2e/README.md:62: Keep `compiled directory` in this two-output restore description and name the directories in adjacent text.

E2E guidance

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

Recommended E2E: cloud-inference, cloud-onboard, security-posture

1 optional E2E recommendation
  • e2e-all

Workflow run details

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

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

🧹 Nitpick comments (1)
test/e2e/support/cli-artifact-workflow-boundary.test.ts (1)

88-129: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover each required shared module in the failure and success cases.

writeCliArchive only removes the complete shared runtime. The success assertion checks only sandbox-name.cjs. A regression that stops requiring openshell-policy-boundary.cjs or snapshot-sanitizer-boundary.cjs can pass this suite. Add a fixture that omits each module separately and assert all three modules after a successful restore.

As per path instructions, review tests for behavioral confidence rather than implementation lock-in.

Also applies to: 437-478

🤖 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/cli-artifact-workflow-boundary.test.ts` around lines 88 -
129, Expand the archive fixtures around writeCliArchive to support omitting each
shared module independently, then add failure cases proving restore rejects
archives missing openshell-policy-boundary.cjs, sandbox-name.cjs, or
snapshot-sanitizer-boundary.cjs. Update the successful restore assertion to
verify all three modules are required and available, while keeping the checks
focused on observable behavior rather than implementation details.

Source: Path instructions

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

Nitpick comments:
In `@test/e2e/support/cli-artifact-workflow-boundary.test.ts`:
- Around line 88-129: Expand the archive fixtures around writeCliArchive to
support omitting each shared module independently, then add failure cases
proving restore rejects archives missing openshell-policy-boundary.cjs,
sandbox-name.cjs, or snapshot-sanitizer-boundary.cjs. Update the successful
restore assertion to verify all three modules are required and available, while
keeping the checks focused on observable behavior rather than implementation
details.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 797aacbf-88a3-45b4-b635-6d3e827a376a

📥 Commits

Reviewing files that changed from the base of the PR and between 2b68aa1 and e55060a.

📒 Files selected for processing (5)
  • .github/actions/restore-e2e-cli-artifact/action.yaml
  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/cli-artifact-workflow-boundary.test.ts
  • tools/e2e/cli-artifact-workflow-boundary.mts

@coderabbitai coderabbitai Bot mentioned this pull request Aug 5, 2026
10 of 23 tasks
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance labels Nov 16, 2026
@cv
cv deleted the ci/fix-e2e-cli-artifact-runtime branch November 21, 2026 20:43
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 area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants