Repository navigation
fix(release): keep npm 12 pack checks working - #118209
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 5:42 PM ET / 21:42 UTC. ClawSweeper reviewWhat this changesThis PR adds a shared release-tooling normalizer for npm 10/11 array or entry output and npm 12 name-keyed Merge readinessKeep this PR open for maintainer review. It fixes a source-proven npm 12 regression across release-only tooling, and the prior shared-helper finding is addressed: the plugin-publish workflow now overlays and imports the same dependency-free normalizer instead of maintaining a second parser. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s release and packaging scripts invoke npm or pnpm to create tarballs, then use the returned JSON to validate package identity, contents, and size before publishing or installer testing. This change converts package-manager-specific JSON shapes into one entry list before those downstream checks consume it. flowchart LR
A[npm or pnpm pack output] --> B[JSON parser]
B --> C[Shared pack-result normalizer]
C --> D[Release and package checks]
C --> E[Installer smoke metadata]
C --> F[Plugin publish preflight]
D --> G[Validated tarball artifacts]
E --> G
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +77, Config +10, Other +64. Total +151 across 20 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the dependency-free script helper as the sole release-tooling JSON-shape boundary, preserve canonical array artifacts for downstream historical readers, and merge once the remaining current-head release-path checks confirm the npm 10–12 compatibility contract. Do we have a high-confidence way to reproduce the issue? Yes—source reproducibly shows the current array-only parser rejecting npm 12’s name-keyed package result, and the PR supplies the focused current-main command and observed failure. This review did not execute it because the target checkout is read-only. Is this the best way to solve the issue? Yes—the dependency-free shared helper is the narrowest maintainable solution for standalone release tooling, while caller-specific checks still enforce package identity, safe filenames, and size requirements. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9b6bda696eab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
3966a20 to
a0cb9b6
Compare
|
Exact-head landing proof for
Repository-native review artifacts and |
|
Merged via squash.
|
* fix(release): accept npm 12 pack json * fix(release): share npm pack normalizer in plugin workflow
Closes #118208
What Problem This Solves
Fixes an issue where maintainers running OpenClaw release, plugin-security, package-candidate, installer-update, or cross-OS packaging checks under npm 12 would see valid
npm pack --jsonoutput rejected or silently bypassed because those paths still expected npm 10/11 arrays.The first current-main failure was the publishable-plugin security scan aborting on
@openclaw/arcee-providerbefore any of its 95 package checks ran.Why This Change Was Made
The release and packaging toolchain now normalizes npm 10/11 arrays or bare entries and npm 12 name-keyed objects at one tooling boundary. All downstream checks consume the same canonical entry list, while persisted pack metadata remains an array for deterministic historical evidence.
The existing production plugin-install normalizer remains the runtime owner for install metadata. This change covers the independent standalone release/tooling boundary and removes its scattered array-only parsing.
User Impact
Maintainers can run supported Node 26/npm 12 release and packaging workflows without false failures, skipped package-identity validation, or installer smoke breakage. Product runtime behavior is unchanged.
Evidence
Exact candidate head:
a0cb9b692b9756f6128742f0f56596f768758e2bnode scripts/run-vitest.mjs src/plugins/npm-install-security-scan.release.test.tsfailed withnpm pack --dry-run did not return one package result; 95 package checks were skipped.npm pack --dry-run --json --ignore-scriptsfor@openclaw/arcee-providerreturned one name-keyed result with 10 files; the candidate normalized it to one entry and preserved all 10 files.tbx_01kz23c60jkm52hsmfjdksf101(run).tbx_01kz23hrrx6rwcvd9x4kkmjr9b(run).tbx_01kz26630zcsta8kz09csadg69(run).Scope: 20 files,
+205/-54; zero product-runtime LOC. Risk is medium because release workflows are affected, bounded by one dependency-shape contract and broad focused/changed-gate coverage.