Skip to content

fix(release): keep npm 12 pack checks working - #118209

Merged
steipete merged 2 commits into
mainfrom
codex/qa-npm12-pack-json
Aug 2, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa-npm12-pack-json

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

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 --json output 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-provider before 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: a0cb9b692b9756f6128742f0f56596f768758e2b

  • Current-main repro on npm 12.0.2: node scripts/run-vitest.mjs src/plugins/npm-install-security-scan.release.test.ts failed with npm pack --dry-run did not return one package result; 95 package checks were skipped.
  • Real npm 12 contract probe: npm pack --dry-run --json --ignore-scripts for @openclaw/arcee-provider returned one name-keyed result with 10 files; the candidate normalized it to one entry and preserved all 10 files.
  • Compatibility probe: npm 10/11 array and bare-entry fixtures plus npm 12 name-keyed fixtures all normalize to the same entry.
  • Focused Testbox proof: 403 assertions passed across the publishable-plugin scan, release checks, package builder, package candidate, installer smoke, and workflow guards on Blacksmith Testbox tbx_01kz23c60jkm52hsmfjdksf101 (run).
  • The first focused Testbox run exposed a real missing dependency-free harness copy for the new helper; that owner boundary was repaired before the successful rerun.
  • Full changed gate: formatting, declarations, deadcode, dependency and plugin boundaries, three typecheck lanes, and complete core/script lint passed on Blacksmith Testbox tbx_01kz23hrrx6rwcvd9x4kkmjr9b (run).
  • ClawSweeper's P2 was applied: the plugin publish workflow now overlays and imports the canonical helper for historical publication targets instead of carrying a second parser. The repaired workflow/release checks passed 143/143 assertions on Testbox tbx_01kz26630zcsta8kz09csadg69 (run).
  • Final full-branch Codex autoreview completed cleanly with no accepted/actionable findings; confidence 0.97.
  • Public model-identifier gate: PASS. The diff, fixtures, proof, and workflows add no model identifiers.

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.

@steipete
steipete requested a review from a team as a code owner August 2, 2026 21:11
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: M maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 5:42 PM ET / 21:42 UTC.

ClawSweeper review

What this changes

This PR adds a shared release-tooling normalizer for npm 10/11 array or entry output and npm 12 name-keyed npm pack --json output, then applies it to release checks, packaging, installer smoke, and publishing workflows.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep 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
Reviewed head: a0cb9b692b9756f6128742f0f56596f768758e2b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real npm 12 and Testbox evidence supports a focused compatibility repair whose earlier workflow-normalizer finding has been fixed.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body provides an after-fix real npm 12 package-manager probe, reports the normalized package/files result, and links focused Testbox runs spanning the affected release and workflow paths.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body provides an after-fix real npm 12 package-manager probe, reports the normalized package/files result, and links focused Testbox runs spanning the affected release and workflow paths.
Evidence reviewed 6 items Current-main defect boundary: Current main parses the publishable-plugin scan result as an array and throws before scanning when npm 12 returns a name-keyed object; the same current-main release helpers assume array or bare-entry results.
Canonical release-tooling boundary: The candidate adds a dependency-free helper that recognizes prior arrays, bare entries, and npm 12 name-keyed result objects; it deliberately leaves package-specific validation to each caller.
Runtime contract comparison: Current runtime install metadata already uses the same normalization semantics for npm pack and view output; the candidate test checks the release helper against that runtime behavior for a name-keyed result.
Findings None None.
Security None None.

How this fits together

OpenClaw’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
Loading

Before merge

  • Resolve merge risk (P1) - This changes release and publishing automation that runs against both current and historical source checkouts; merge after the remaining current-head cross-platform/build checks finish, because those jobs are the practical guard against a missed helper-import or package-output path.
Agent review details

Security

None.

PR surface

Tests +77, Config +10, Other +64. Total +151 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 86 9 +77
Docs 0 0 0 0
Config 2 24 14 +10
Generated 0 0 0 0
Other 10 95 31 +64
Total 20 205 54 +151

Review metrics

Metric Value Why it matters
Shared npm output contract 1 canonical normalizer used by 9 release/workflow consumers Release, installer, package, and publish paths now share one npm 10–12 shape boundary instead of separately deciding how to parse pack output.

Stored data model

Persistent data-model change detected: serialized state: scripts/release-check.ts, serialized state: scripts/test-install-sh-docker.sh, serialized state: test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts, serialized state: test/scripts/resolve-openclaw-package-candidate.test.ts, vector/embedding metadata: test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118208
Summary: This PR is the concrete candidate repair for the npm 12 pack-output regression described by the linked issue; the issue should remain open until this PR lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Finish release-path verification (recommended)
    Let the remaining current-head build and cross-platform jobs complete, then repair only a concrete missed release-tooling import or parser path before merge.
  2. Accept the bounded workflow risk
    Merge based on the focused Testbox evidence and existing successful guards, accepting that release automation still needs its normal post-merge monitoring.

Technical review

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides an after-fix real npm 12 package-manager probe, reports the normalized package/files result, and links focused Testbox runs spanning the affected release and workflow paths.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The fix prevents release and packaging validation failures for maintainers, with no product-runtime behavior change.
  • merge-risk: 🚨 automation: The diff alters release, publishing, installer-smoke, and cross-platform workflow parsing, so a missed execution context could break automation after merge.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides an after-fix real npm 12 package-manager probe, reports the normalized package/files result, and links focused Testbox runs spanning the affected release and workflow paths.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides an after-fix real npm 12 package-manager probe, reports the normalized package/files result, and links focused Testbox runs spanning the affected release and workflow paths.

Evidence

What I checked:

  • Current-main defect boundary: Current main parses the publishable-plugin scan result as an array and throws before scanning when npm 12 returns a name-keyed object; the same current-main release helpers assume array or bare-entry results. (src/plugins/npm-install-security-scan.release.test.ts:56, 1e10c444748a)
  • Canonical release-tooling boundary: The candidate adds a dependency-free helper that recognizes prior arrays, bare entries, and npm 12 name-keyed result objects; it deliberately leaves package-specific validation to each caller. (scripts/lib/npm-json-output.mjs:6, a0cb9b692b97)
  • Runtime contract comparison: Current runtime install metadata already uses the same normalization semantics for npm pack and view output; the candidate test checks the release helper against that runtime behavior for a name-keyed result. (src/infra/npm-registry-spec.ts:17, 9b6bda696eab)
  • Previous review repair is present: The publish workflow now obtains the normalizer from the workflow revision’s trusted sparse checkout, overlays it into the historical publication checkout, and imports it in its ESM parser. This resolves the prior duplicate-parser finding. (.github/workflows/plugin-npm-release.yml:333, a0cb9b692b97)
  • Focused regression coverage: Candidate tests cover name-keyed pack output for release parsing, Docker packaging, package candidate selection, installer-smoke normalization, workflow helper import, and pack-size checks; the PR body also reports a real npm 12.0.2 command probe plus successful Testbox release-path runs. (test/release-check.test.ts:909, a0cb9b692b97)
  • Patch integrity and release state: The candidate has no whitespace errors, is not contained by any local release tag or branch, and therefore remains an unmerged fix rather than an already-shipped resolution. (scripts/lib/npm-json-output.mjs:1, a0cb9b692b97)

Likely related people:

  • steipete: Peter Steinberger authored both candidate commits, and current array-only pack handling traces to a same-day Peter Steinberger main commit across the affected release surfaces. (role: feature owner and recent area contributor; confidence: high; commits: 1e10c444748a, d4220564f7b4, a0cb9b692b97; files: src/plugins/npm-install-security-scan.release.test.ts, scripts/release-check.ts, scripts/openclaw-npm-release-check.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the remaining current-head build and cross-platform checks to conclude before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-02T21:20:23.232Z sha 3966a202af175cc397e8203990f33d85c8daf286 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T21:26:32.036Z sha 3966a202af175cc397e8203990f33d85c8daf286 :: needs changes before merge. :: [P2] Reuse the shared npm JSON normalizer in this workflow

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 2, 2026
@steipete
steipete force-pushed the codex/qa-npm12-pack-json branch from 3966a20 to a0cb9b6 Compare August 2, 2026 21:36
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 2, 2026
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head landing proof for a0cb9b692b9756f6128742f0f56596f768758e2b.

  • Symptom: with npm 12.0.2, current main's publishable-plugin security scan rejected a valid name-keyed npm pack --json result and skipped all 95 package scans; sibling release/package paths retained the same array-only assumption or silently fell back past the reported identity.
  • Dependency contract: npm 12's installed pack.js emits JSON keyed by package name. The real Arcee pack returned one package with 10 files; this head normalizes all 10. npm 10/11 arrays and bare entries remain supported.
  • Canonical fix: one dependency-free release-tooling normalizer is consumed by nine release, installer, package, cross-OS, Parallels, security-scan, and plugin-publication paths. Historical plugin publication checkouts receive the trusted helper through the existing workflow overlay. Persisted pack evidence remains a canonical array.
  • Scope: 20 files, +205/-54; zero product-runtime LOC. No docs, config, protocol, storage, or runtime behavior change.
  • Focused proof: 403 assertions passed on Testbox tbx_01kz23c60jkm52hsmfjdksf101 (run).
  • Broad proof: full check:changed passed on Testbox tbx_01kz23hrrx6rwcvd9x4kkmjr9b (run).
  • Post-review proof: after removing the workflow-local duplicate, 143/143 focused release/workflow assertions passed on Testbox tbx_01kz26630zcsta8kz09csadg69 (run).
  • Exact-head hosted CI: all selected checks, Windows, and openclaw/ci-gate passed (run).
  • Final full-branch autoreview: clean, no accepted/actionable findings, confidence 0.97. Repair-only autoreview was clean at 0.99.
  • ClawSweeper: latest exact-head review is 4/6 with no findings. Its P2 was applied and the remaining rank-up move—waiting for current-head cross-platform/build checks—has completed. No move was skipped.
  • Public model-identifier gate: PASS; the diff, fixtures, workflows, and proof add no model identifiers.
  • External live boundary: none. This is release tooling; the real npm 12 command plus exact workflow/package harnesses are the direct behavior proof. No release or publish was dispatched.

Repository-native review artifacts and prepare-run are complete. Ready to land.

@steipete
steipete merged commit 7866eca into main Aug 2, 2026
135 of 141 checks passed
@steipete
steipete deleted the codex/qa-npm12-pack-json branch August 2, 2026 21:57
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* fix(release): accept npm 12 pack json

* fix(release): share npm pack normalizer in plugin workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release: npm 12 pack JSON breaks security and packaging gates

1 participant