Skip to content

fix(package): accept audited 2026.8.1 package size - #129758

Closed
RomneyDa wants to merge 1 commit into
mainfrom
fix/npm-pack-budget-210mib
Closed

RomneyDa wants to merge 1 commit into
mainfrom
fix/npm-pack-budget-210mib

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes release validation rejecting the audited 2026.8.1 package because its required runtime grew beyond the previous 204 MiB unpacked-size ceiling.

Why This Change Was Made

Raises only the shared unpacked-size ratchet to 210 MiB. The package contents remain unchanged, and the ceiling remains below the historical 213.6 MiB package associated with low-memory startup and doctor failures.

The exact candidate artifact was 218,962,508 bytes (208.82 MiB), versus 212,736,150 bytes for the last observed below-budget artifact. Direct artifact comparison attributed 6,225,959 of the 6,226,358-byte increase to dist/; bundled plugin output decreased, and no duplicate extension tree, copied dependency tree, stale build output, or other accidental inclusion was found. A separate bundle-size audit can reduce that required runtime independently of this release gate.

User Impact

Release validation accepts the current complete package while continuing to reject growth above 210 MiB. There is no runtime or package-content change.

Evidence

  • Candidate: openclaw-2026.8.1.tgz, 218,962,508 unpacked bytes; accepted by the updated exact-value regression.
  • Historical bloat case: 224,002,564 bytes (213.6 MiB); still rejected.
  • node scripts/run-vitest.mjs test/release-check.test.ts — 60 passed.
  • node scripts/check-changed.mjs -- scripts/lib/npm-pack-budget.mts test/release-check.test.ts — all checks before typecheck passed; typecheck was blocked by the shared checkout's stale dependency tree (unrelated markdown-it, Crabline, Google SDK, pi-tui, and pako errors).
  • .agents/skills/autoreview/scripts/autoreview --mode local — clean, no accepted/actionable findings.

Production/tooling LOC: +5/-4. Tests: +2/-2. No package bytes added or removed.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 10:41 PM ET / August 26, 2026, 02:41 UTC.

ClawSweeper review

What this changes

This PR raises the npm package unpacked-size ceiling from 204 MiB to 210 MiB and updates the release-check boundary test.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for a maintainer release-policy decision. The branch correctly changes the shared release gate, but an open related PR proposes removing the asserted package growth instead; neither package artifact is available locally to establish which policy should be canonical.

Priority: P2
Reviewed head: 8d23bc5f50e3d7f09eda27b4fe1cdd0b7a6fdcab
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is narrow and internally consistent, but the final artifact audit and the competing root-cause path remain unresolved.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored release-tooling PR is exempt from the external-contributor proof gate; final artifact evidence remains required for the release-policy decision.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored release-tooling PR is exempt from the external-contributor proof gate; final artifact evidence remains required for the release-policy decision.
Evidence reviewed 6 items Changed release guard: The branch changes the shared unpacked-size ceiling to 210 MiB; all callers without an override inherit it.
Release-check owner path: The release entry point runs npm pack, then passes its results to the shared size guard alongside required and forbidden package-content checks.
Current-main behavior: Current main still sets the inherited ceiling to 204 MiB, so the requested policy is not already implemented.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/release-check.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs test/release-check.test.ts: previous terminal command was still running after 30 seconds: "node scripts/run-vitest.mjs test/release-check.test.ts"

[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129758-483WuL/target

 ✓  tooling  test/release-check.test.ts (60 tests) 264ms

 Test Files  1 passed (1)
      Tests  60 passed (60)
   Start at  02:41:56
   Duration  2.51s (transform 1.22s, setup 56ms, import 1.84s, tests 264ms, environment 0ms)

[test] passed 1 Vitest shard in 8.97s

Assertions:

  • FAIL expect_output: release-check.test.ts

How this fits together

The release check reads npm pack metadata and rejects oversized published artifacts before release. This ceiling therefore controls which package sizes can reach install and startup validation.

flowchart LR
  A[Package build] --> B[Npm pack metadata]
  B --> C[Release size guard]
  C --> D{Within ceiling?}
  D -->|Yes| E[Release validation continues]
  D -->|No| F[Package bloat investigation]
Loading

Decision needed

Question Recommendation
Should the release accept a 210 MiB package ceiling, or should it require the open packaging-reduction path to restore the 204 MiB guard? Prefer the root-cause reduction: Pause this ratchet and independently validate the packaging-reduction PR; retain the existing guard if its final package proof holds.

Why: This is a release safety-policy choice between a higher ratchet and an unverified alternative root-cause repair; source review cannot choose the intended package-size contract without maintainers accepting the operational tradeoff.

Before merge

  • Resolve merge risk (P1) - Merging expands the accepted package range by 6 MiB despite the guard's documented correlation between historical package bloat and low-memory startup or doctor failures; the candidate tarball and file-level audit are not present for independent verification.
  • Complete next step (P2) - The remaining action is a maintainer release-policy choice between two open package-size approaches, not a mechanical repair.
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 5 4 +1
Total 2 7 6 +1

Review metrics

Metric Value Why it matters
Release guard delta production/tooling net +1; tests net 0; ceiling 204 MiB → 210 MiB The small diff changes the release admission boundary by 6 MiB, so its policy effect is larger than its LOC.

Merge-risk options

Maintainer options:

  1. Validate the root-cause packaging path (recommended)
    Pause this PR while the linked packaging-reduction approach is independently proven against the final package; keep the 204 MiB protection if that proof succeeds.
  2. Accept a documented higher ceiling
    Retain this PR only with maintainer acceptance of the low-memory tradeoff and final artifact evidence showing the 208.8 MiB package is intentional.

Technical review

Best possible solution:

Choose one canonical release path: retain a 210 MiB ceiling only if a fresh final package audit proves it is required, otherwise land an independently verified packaging reduction that preserves the 204 MiB guard.

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

No high-confidence reproduction of the claimed 208.82 MiB artifact is available: source proves how that value is evaluated, but the tarball and audit are absent from the checkout and scratch area.

Is this the best way to solve the issue?

No: the ratchet is mechanically correct, but the open packaging-reduction path may solve the same release problem while preserving the established safety boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded release-validation policy change with no demonstrated active user outage.
  • merge-risk: 🚨 availability: The higher ceiling can admit packages in a range the existing guard associates with low-memory startup and doctor failures.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored release-tooling PR is exempt from the external-contributor proof gate; final artifact evidence remains required for the release-policy decision.

Evidence

What I checked:

  • Changed release guard: The branch changes the shared unpacked-size ceiling to 210 MiB; all callers without an override inherit it. (scripts/lib/npm-pack-budget.mts:11, 8d23bc5f50e3)
  • Release-check owner path: The release entry point runs npm pack, then passes its results to the shared size guard alongside required and forbidden package-content checks. (scripts/release-check.ts:1398, 8d23bc5f50e3)
  • Current-main behavior: Current main still sets the inherited ceiling to 204 MiB, so the requested policy is not already implemented. (scripts/lib/npm-pack-budget.mts:10, a9303f27e982)
  • Boundary coverage: The changed test accepts the stated 218,962,508-byte value and retains rejection of the 224,002,564-byte historical case. (test/release-check.test.ts:901, 8d23bc5f50e3)
  • History and likely ownership: Blame ties the current-main budget baseline to Peter Steinberger's d3c5d8e commit; history also records Dallin Romney's prior package-budget update 579f9b8. (scripts/lib/npm-pack-budget.mts:10, d3c5d8e33aed)
  • Alternative repair remains open: The provided PR context identifies an open related PR that claims to isolate diffs-plugin build output and restore the existing 204 MiB guard; its source and retained artifact were not available in this checkout.

Likely related people:

  • steipete: Current-main blame attributes the budget baseline and its safety rationale to this history line. (role: current baseline author; confidence: medium; commits: d3c5d8e33aed; files: scripts/lib/npm-pack-budget.mts, test/release-check.test.ts)
  • RomneyDa: History records the earlier bundled-documentation budget update, in addition to this proposed ratchet. (role: previous size-budget contributor; confidence: high; commits: 579f9b8a8a5e, 8d23bc5f50e3; files: scripts/lib/npm-pack-budget.mts, test/release-check.test.ts)

Rank-up moves

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

  • Provide a redacted final package manifest or audit plus a release-check transcript, then resolve the linked packaging-reduction alternative.

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 (1 earlier review cycle)
  • reviewed 2026-08-26T01:55:31.239Z sha 798fa4f :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/npm-pack-budget-210mib branch from 798fa4f to 8d23bc5 Compare August 26, 2026 02:35
@RomneyDa

Copy link
Copy Markdown
Member Author

Mechanical refresh onto current fetched main; exact head 8d23bc5f50e3d7f09eda27b4fe1cdd0b7a6fdcab.

The 204 MiB budget remains on current main, so the audited 218,962,508-byte package still requires this 210 MiB cap. test/release-check.test.ts passes 60/60, git diff --check passes, and final branch autoreview is clean. A raw ad-hoc strict-tsgo invocation was not a valid repository gate and failed on unresolved workspace/source imports; it did not identify a patch-specific error. No behavior or diff content changed during rebase; no ClawSweeper re-review requested.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 26, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Superseded by #129782, squash-merged as 2b06180.

The root cause was the diffs plugins' syntax-highlighting chunks entering the unified core package graph. The landed repair externalizes those plugin distributions, preserves viewer-runtime.js for standalone and explicitly Docker-selected builds, and keeps the existing 213,909,504-byte cap. The exact-head candidate was 204,812,560 unpacked bytes, leaving 9,096,944 bytes of headroom, with exact-head CI green.

Thanks @RomneyDa for reporting and investigating the regression. Closing this budget-increase alternative as superseded.

@vincentkoc vincentkoc closed this Aug 26, 2026
@RomneyDa
RomneyDa deleted the fix/npm-pack-budget-210mib branch October 22, 2026 00:21
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants