Skip to content

fix(ci): repair npm 12 packaging and advisor gate - #11804

Merged
cv merged 2 commits into
mainfrom
codex/repair-npm12-advisor-ci
Sep 15, 2026
Merged

cv merged 2 commits into
mainfrom
codex/repair-npm12-advisor-ci

Conversation

@kaofelix

@kaofelix kaofelix commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

OpenShell SDK E2E fixture packaging now works with npm 11 and npm 12 output formats without losing duplicate package names. The Advisor blocker gate now uses the repository-reviewed Node and npm identities.

Reason

npm 12 returns keyed metadata for multi-package npm pack --json calls and can collapse duplicate package names. Separately, the Advisor blocker job used a Node 22 range and omitted the reviewed npm setup required by the repository invariant.

Changes

  • Parse npm pack array, single-record, and keyed-object output. Split duplicate package names across pack calls so each archive remains available. The E2E support tests protect both output formats, invalid metadata, and duplicate package handling.
  • Set the Advisor blocker job to Node 24.18.1. Install the immutable reviewed-npm action immediately after the existing pinned setup-node action. The repository Node/npm invariant protects the sequence.

Verification

  • Focused openshell-sdk-install E2E support suite with npm 11.19.0 — 17 tests passed.
  • Focused openshell-sdk-install E2E support suite with npm 12.0.2 — 17 tests passed.
  • npm run test:changed — passed.
  • node_modules/.bin/vitest run --project integration test/repository/github-actions-node-npm-invariant.test.ts test/automation/pull-requests/pr-workflow-contract.test.ts test/automation/pull-requests/pr-review-advisor-blocker-gate.test.ts — 87 tests passed.
  • Normal pre-push publication validation — passed, including repository checks, secret scanning, YAML validation, and CLI typechecking.
  • git diff --check origin/main...HEAD and manual diff inspection — passed; the diff contains no secrets, API keys, or credentials.

Review notes

.github/workflows/pr-review-advisor.yaml is a contributor-sensitive path. An agent self-review compared NVIDIA/NemoClaw commit 9b3c37e78be60d6792fdaec6ca2cce956063ef5e with canonical base be46805b51b0d626466538e9f8fe56c8ad157549. The review confirmed that workflow permissions and trusted checkout boundaries are unchanged, the existing setup-node identity remains pinned, and the added reviewed-npm action uses the repository pin. No independent pre-publication review was observed; this draft awaits review.


Signed-off-by: Kao Félix [email protected]

Summary by CodeRabbit

  • Tests

    • Improved end-to-end installation test coverage for package archive metadata and invalid packaging output.
    • Enhanced validation of generated package archives and local installation setups.
    • Improved reliability when installing packages from locally generated archives.
  • Chores

    • Updated automated review tooling to use a current supported runtime and a pinned action revision.

@kaofelix kaofelix self-assigned this Sep 15, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 15, 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 15, 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: 0dee8311-21c6-4ca2-9e72-e8d31d4b84fc

📥 Commits

Reviewing files that changed from the base of the PR and between be46805 and 9b3c37e.

📒 Files selected for processing (3)
  • .github/workflows/pr-review-advisor.yaml
  • test/e2e/support/openshell-sdk-install.test.ts
  • test/e2e/support/openshell-sdk-pack-archives.ts

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


📝 Walkthrough

Walkthrough

The pull request updates the review workflow runtime and adds shared helpers for parsing, batching, and packing npm archives. End-to-end installation tests use local archive URLs, support multiple npm metadata formats, and use prefer-offline.

Changes

npm archive installation

Layer / File(s) Summary
Archive parsing and batching
test/e2e/support/openshell-sdk-pack-archives.ts
Adds validated npm archive metadata parsing, unique-name source batching, and sequential batch packing.
Archive-based installation flow
test/e2e/support/openshell-sdk-install.test.ts
Uses the shared helpers, validates npm 11 and npm 12 metadata, selects archives by SDK version, writes local file: URLs, and changes npm to prefer-offline.
Review workflow runtime
.github/workflows/pr-review-advisor.yaml
Updates the blocker gate to Node.js 24.18.1 and adds a pinned reviewed npm action.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: cjagwani, cv

Merge Risk: ⚪ Minimal · up to 9b3c3

The updated fixture can complete its initial install without the optional SDK archive, then materializes the archives before the installation path that needs them. No actionable merge risk remains.

🚥 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 5 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the npm packaging repair and Advisor gate update. It omits npm 11, but it still identifies the primary changes clearly and concisely.
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.
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 5 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/repair-npm12-advisor-ci

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

@github-code-quality

github-code-quality Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 9b3c37e in the codex/repair-npm12-a... branch remains at 96%, unchanged from commit be46805 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 9b3c37e in the codex/repair-npm12-a... branch remains at 83%, unchanged from commit 02dedab in the main branch.

Show a line coverage summary of the most impacted files.
File main 02dedab codex/repair-npm12-a... 9b3c37e +/-
src/lib/core/bo...e-transcript.ts 99% 79% -20%
src/lib/messagi...flow-planner.ts 87% 83% -4%
src/lib/trace.ts 94% 91% -3%
src/lib/onboard...on-bootstrap.ts 85% 84% -1%
src/lib/sandbox...uild-context.ts 51% 50% -1%
src/lib/onboard...ma-authority.ts 80% 80% 0%
src/lib/onboard...ponent/index.ts 78% 78% 0%
src/lib/onboard...uild-context.ts 74% 75% +1%
src/lib/onboard...hine/runtime.ts 93% 94% +1%
src/lib/messagi...tate-applier.ts 77% 84% +7%

Updated September 15, 2026 11:05 UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 9b3c37e. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@kaofelix
kaofelix marked this pull request as ready for review September 15, 2026 11:12
@cv
cv merged commit f47724f into main Sep 15, 2026
114 of 120 checks passed
@cv
cv deleted the codex/repair-npm12-advisor-ci branch September 15, 2026 12:10
@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 labels Oct 14, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants