Repository navigation
fix(package): bound installed worker artifact parsing - #126491
Conversation
Keep canonical self-contained worker bundles above the generic dist-file cap while enforcing an 80 MiB limit before installed-package verification reads or parses them.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 9:21 PM ET / August 20, 2026, 01:21 UTC. ClawSweeper reviewWhat this changesThis PR routes installed root distribution JavaScript reads through a shared size policy, allowing canonical worker bundles up to 80 MiB while retaining the 6 MiB limit for other files. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The follow-up commit addresses the prior unbounded context-engine read, and no new actionable correctness finding was identified; exact-head release/package checks were still running in the supplied state. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe npm postpublish verifier installs an OpenClaw package and examines its built distribution before release acceptance proceeds. It now applies a file-size decision before the legacy-runtime scan and dependency parser consume each root runtime file. flowchart LR
A[Installed npm package] --> B[Root distribution JavaScript files]
B --> C[Shared pre-read size policy]
C --> D[Canonical worker limit]
C --> E[Generic file limit]
D --> F[Legacy runtime scan]
E --> G[Dependency parser]
F --> H[Release verification result]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceTests +64, Other 0. Total +64 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical pre-read policy for every root-runtime verifier pass, with the two manifest-defined worker paths as the only 80 MiB exception. Do we have a high-confidence way to reproduce the issue? Yes in source: an 80 MiB-plus canonical worker reaches current main's context-engine scan and is synchronously read before the later dependency-parser guard; the added public-flow test targets that order. Is this the best way to solve the issue? Yes. Applying the size decision in the shared pre-read helper covers both independent verifier passes and avoids a downstream-only guard. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3bfc9bc80451. 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 (1 earlier review cycle)
|
Route the context-engine and dependency scans through one root-dist pre-read policy, exclude plugin-owned extension assets from the root marker contract, and cover the public verifier flow.
|
Merged via squash.
|
* fix(package): bound worker artifact parsing Keep canonical self-contained worker bundles above the generic dist-file cap while enforcing an 80 MiB limit before installed-package verification reads or parses them. * fix(package): bound every verifier read Route the context-engine and dependency scans through one root-dist pre-read policy, exclude plugin-owned extension assets from the root marker contract, and cover the public verifier flow.
Related: #126448
What Problem This Solves
Fixes a release-verifier resource gap where a malformed canonical worker artifact could bypass the generic 6 MiB file limit and be synchronously read and parsed up to the root package's overall size ceiling. It also closes the earlier context-engine reader that ran before the dependency parser.
Why This Change Was Made
Every installed root-dist JavaScript read now goes through one shared pre-read policy: canonical self-contained worker artifacts use an 80 MiB limit, while all other root files retain the existing 6 MiB limit. The legacy context-engine marker scan now follows its root-runtime ownership boundary and skips plugin-owned extension assets; the public verifier deduplicates identical errors from its independent checks.
User Impact
Release and postpublish verification still accepts the current ~68.8 MB self-contained worker with 21.9% headroom, while rejecting unexpectedly bloated worker artifacts before either verifier pass can read or parse them.
Evidence
pnpm buildpassed.d5acc875b27cf633dbe5f36742c29101b6e3b1f0.source=ref,suite_profile=package).The earlier apparent package overage was traced to stale local
dist/output, not this change. That build-hygiene issue is tracked separately.AI-assisted: yes. The full verifier read graph, resource boundary, sparse-file behavior, package inventory, and review findings were manually inspected.