Skip to content

fix(release): allow larger npm plugin artifacts - #117745

Merged
vincentkoc merged 1 commit into
mainfrom
fix/npm-artifact-entry-cap
Aug 2, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/npm-artifact-entry-cap

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where the beta publisher rejected a valid bundled npm plugin after packaging because its tarball contained more than 10,000 entries. @openclaw/diagnostics-otel was the only failed package in release run 30728161070.

Why This Change Was Made

The npm publication artifact scanner now accepts up to 20,000 tar headers. The measured diagnostics-otel beta tarball contains 11,646 entries and is 4.7 MB. Existing archive-byte, expanded-byte, per-entry, total-file-byte, path-byte, and separate ClawHub limits remain unchanged.

User Impact

Bundled plugins with large dependency trees can complete verified npm publication without weakening the scanner's byte and path safety bounds. There is no runtime or public API change.

Evidence

  • node scripts/run-vitest.mjs test/scripts/plugin-publication-artifact.test.ts: 48 tests passed.
  • The exact failed @openclaw/[email protected] tarball successfully produced a canonical publication manifest with this change.
  • Exact failed artifact: 11,646 entries, 4.7 MB.
  • Previous failure: run 30728161070, job 91443974907, Plugin tarball exceeds the 10000 entry limit.
  • No changelog entry: this is internal release tooling with no shipped runtime behavior change.

@vincentkoc vincentkoc self-assigned this Aug 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 2, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 2, 2026 02:12
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor 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: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. 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 1, 2026, 10:17 PM ET / August 2, 2026, 02:17 UTC.

ClawSweeper review

What this changes

The PR raises the bundled npm-plugin tar-header cap from 10,000 to 20,000 and updates its boundary test.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for the normal maintainer merge decision: it is a focused member-authored release-tooling repair, current main still rejects tarballs above 10,000 headers, and the branch raises only the npm-publication limit while retaining the scanner’s byte, path, file-size, gzip, and ClawHub-specific bounds.

Priority: P2
Reviewed head: 613210c40d83feeb8895c635011e85d1d3e8f04e

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow owner-boundary repair with direct exact-artifact context, a correctly shifted rejection test, and no correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a member-authored release-tooling PR; the body nevertheless records an after-fix run against the exact rejected tarball, while focused test and CI evidence remain supplemental.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a member-authored release-tooling PR; the body nevertheless records an after-fix run against the exact rejected tarball, while focused test and CI evidence remain supplemental.
Evidence reviewed 5 items Current-main failure boundary: Current main increments the tar-header count and throws as soon as it exceeds MAX_TAR_ENTRIES, which is still 10,000; a bundled npm tarball with 11,646 headers follows this rejected path.
Independent safety limits remain enforced: The scanner retains canonical single-gzip validation, a 512 MiB expanded-byte cap, 4 MiB cumulative path cap, per-entry cap, total-file-byte cap, path normalization, duplicate detection, and the separate 10,000-entry ClawHub policy; the changed constant only raises the npm default ceiling.
Boundary regression coverage: The proposed test constructs 20,002 headers including the package directory and manifest, then asserts rejection at the new 20,000 ceiling; this verifies the count remains enforced after the intended increase.
Findings None None.
Security None None.

How this fits together

The plugin npm release workflow packages each bundled plugin, then passes the generated .tgz through a publication-artifact scanner before it creates immutable evidence for publishing. The scanner emits an inventory and manifest used by later release verification and npm publication steps.

flowchart LR
  A[Bundled plugin package] --> B[Release preflight]
  B --> C[Publication artifact scanner]
  C --> D{Tar safety limits}
  D --> E[Inventory and manifest]
  E --> F[Release verification]
  F --> G[npm publication]
Loading

Before merge

  • Resolve merge risk (P1) - The cap doubles the maximum in-memory inventory size during release preflight; current independent byte, path, and file-size caps bound hostile archive growth, but the remaining in-progress CI should validate the exact head before merge.
  • Complete next step (P2) - The PR author is a repository member and the remaining release checks are still in progress; route it through the normal maintainer merge decision rather than automated repair or cleanup.
Agent review details

Security

None.

PR surface

Tests 0, Other +1. Total +1 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 1 +1
Total 2 4 3 +1

Review metrics

Metric Value Why it matters
Tar-header ceiling 1 changed: 10,000 → 20,000 for npm publication scanning; ClawHub remains 10,000 The distinction preserves the stricter external-package policy while unblocking the measured bundled npm artifact.

Merge-risk options

Maintainer options:

  1. Validate the raised release ceiling (recommended)
    Let the remaining exact-head release checks finish, then merge if the scanner still rejects over-limit archives and the measured npm artifact is accepted.
  2. Keep the prior ceiling
    Pause the repair only if maintainers decide release-preflight memory growth is not acceptable despite the retained byte and path limits.

Technical review

Best possible solution:

Merge the narrow npm-release scanner increase after the exact-head CI completes, preserving the separate ClawHub 10,000-entry policy and existing archive safety caps.

Do we have a high-confidence way to reproduce the issue?

Yes, by source inspection: a .tgz with more than 10,000 valid headers reaches the current-main rejection at scripts/plugin-publication-artifact.mjs:507; the PR body supplies the measured 11,646-header release artifact as the concrete case.

Is this the best way to solve the issue?

Yes. The scanner’s default npm limit is the producer-side owner of the failure, and the patch changes that one ceiling without weakening the separate ClawHub policy or the archive-size, expansion, path, duplicate, and file-payload checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b0345272ce1a.

Labels

Label changes:

  • add P2: This is a bounded release-publication regression affecting large bundled plugin artifacts, without evidence of a live runtime outage.
  • add merge-risk: 🚨 availability: The raised header ceiling affects release-preflight resource consumption and should land only after the current exact-head checks complete.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored release-tooling PR; the body nevertheless records an after-fix run against the exact rejected tarball, while focused test and CI evidence remain supplemental.

Label justifications:

  • P2: This is a bounded release-publication regression affecting large bundled plugin artifacts, without evidence of a live runtime outage.
  • merge-risk: 🚨 availability: The raised header ceiling affects release-preflight resource consumption and should land only after the current exact-head checks complete.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored release-tooling PR; the body nevertheless records an after-fix run against the exact rejected tarball, while focused test and CI evidence remain supplemental.

Evidence

What I checked:

  • Current-main failure boundary: Current main increments the tar-header count and throws as soon as it exceeds MAX_TAR_ENTRIES, which is still 10,000; a bundled npm tarball with 11,646 headers follows this rejected path. (scripts/plugin-publication-artifact.mjs:42, b0345272ce1a)
  • Independent safety limits remain enforced: The scanner retains canonical single-gzip validation, a 512 MiB expanded-byte cap, 4 MiB cumulative path cap, per-entry cap, total-file-byte cap, path normalization, duplicate detection, and the separate 10,000-entry ClawHub policy; the changed constant only raises the npm default ceiling. (scripts/plugin-publication-artifact.mjs:440, b0345272ce1a)
  • Boundary regression coverage: The proposed test constructs 20,002 headers including the package directory and manifest, then asserts rejection at the new 20,000 ceiling; this verifies the count remains enforced after the intended increase. (test/scripts/plugin-publication-artifact.test.ts:1151, 613210c40d83)
  • Release integration owner boundary: The release workflow invokes this scanner while creating immutable npm publication evidence, before later verification; the changed script is the correct producer-side owner for the rejected artifact. (.github/workflows/plugin-npm-release.yml:945, b0345272ce1a)
  • Feature-history provenance: Local file history identifies Vincent Koc as author of prior publication-artifact limit and npm/ClawHub bootstrap fixes, while current scanner lines blame to Peter Steinberger’s release-workflow consolidation; the local partial clone could not fetch older missing objects, so ownership is shared with medium confidence. (scripts/plugin-publication-artifact.mjs:42, e9bd45d38d4f)

Likely related people:

  • vincentkoc: Authored prior merged publication-artifact limit and npm/ClawHub bootstrap fixes and authored this focused repair. (role: recent area contributor; confidence: high; commits: 5c49055293fe, 022dd9dc27a5, 613210c40d83; files: scripts/plugin-publication-artifact.mjs, test/scripts/plugin-publication-artifact.test.ts)
  • Peter Steinberger: Current scanner and limit declaration lines trace to the release-workflow consolidation commit in the local blame history. (role: recent area contributor; confidence: medium; commits: e9bd45d38d4f, bf99e43ee7d3; files: scripts/plugin-publication-artifact.mjs, .github/workflows/plugin-npm-release.yml)

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.

@vincentkoc
vincentkoc merged commit 10a390e into main Aug 2, 2026
154 of 161 checks passed
@vincentkoc
vincentkoc deleted the fix/npm-artifact-entry-cap branch August 2, 2026 02:27
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
llwijvbw123 pushed a commit to llwijvbw123/openclaw that referenced this pull request Aug 28, 2026
…elf-release

* commit '10a390ed7fa88d09da0d4523c3ed1e3550ece5c6': (4646 commits)
  fix(release): allow larger npm plugin artifacts (openclaw#117745)
  refactor(macos): consolidate gateway process fixtures (openclaw#117740)
  fix(ui): preserve complete persisted log messages (openclaw#117666)
  fix(ui): decode artifact previews as UTF-8 (openclaw#117657)
  fix(control-ui): restore sandbox media previews (openclaw#117689)
  fix(plugins): link host declared as direct dependency (openclaw#117738)
  fix(macos): avoid self-named defaults suite (openclaw#117690)
  fix(inference): preserve run ownership and completion delivery (openclaw#117731)
  test(talk): align browser E2E tool completion
  test: consolidate OpenClaw E2E fixtures (openclaw#117701)
  fix(release): ignore bundle fields in npm locks (openclaw#117730)
  fix(meeting-bot): keep configured host options internal
  refactor(line): remove dead card helpers (openclaw#117729)
  perf(cli): attribute command startup stages (openclaw#117720)
  refactor(whatsapp): deduplicate reply delivery test fixtures (openclaw#117710)
  docs(changelog): note bounded WebRTC tool calls
  docs(changelog): note meeting audio bounds
  fix(meeting-bot): preserve node host SDK surface
  test(talk): split WebRTC tool lifecycle coverage
  fix(meeting-bot): break node host import cycle
  ...

# Conflicts:
#	package.json
#	src/agents/model-auth.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XS 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.

1 participant