Repository navigation
fix(packaging): reject tarballs without the code mode worker - #115178
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 8:14 AM ET / 12:14 UTC. ClawSweeper reviewWhat this changesAdds npm tarball and postinstall-inventory validation that requires the Code Mode worker for package versions released after it was introduced, with regression fixtures covering installation preservation. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep this PR open for normal maintainer review: the packaging guard and regression coverage appear targeted, but the PR body provides claims of live packaging validation rather than inspectable after-fix output or artifacts, so real-behavior proof is still required before merge. Priority: P2 Review scores
Verification
How this fits togetherThe package-integrity script inspects the files and postinstall inventory shipped in OpenClaw npm tarballs before release and Docker packaging proceed. Its result protects installed Code Mode from failing because its dynamically loaded worker was omitted from the published package. flowchart LR
A[Build output] --> B[NPM tarball]
B --> C[Package integrity validator]
C --> D[Version gate]
D --> E[Required Code Mode worker]
E --> F[Postinstall inventory]
F --> G[Release and Docker validation]
G --> H[Installable Code Mode]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +80, Other +12. Total +92 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the version-gated tarball and inventory guard, then attach redacted terminal output or a linked artifact from the real package-build and npm-postinstall run against the refreshed merge head. Do we have a high-confidence way to reproduce the issue? Yes from source: a tarball at or after the stated version boundary can omit the dynamically loaded worker or omit it from postinstall inventory while prior validation does not explicitly require it. The PR adds focused adversarial tests for those paths, but this review did not execute them. Is this the best way to solve the issue? Yes, provisionally: enforcing the worker in both the tarball and postinstall inventory addresses the two distinct package-loss paths without changing Code Mode runtime behavior, and the release-version gate preserves older historical packages. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f0bf74bad477. 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
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where an OpenClaw npm package can pass release and Docker integrity validation even though Code Mode cannot start after installation. The worker is loaded through a dynamically constructed path, so the static import graph does not detect an omitted worker; an uninventoried worker can also be deleted by postinstall.
Why This Change Was Made
Require
dist/agents/code-mode.worker.jsin both the packaged tarball and postinstall inventory starting exactly at2026.5.14-beta.2, the first release tag containing that worker. Use the existingsemverdependency so2026.5.14-beta.1and older valid packages remain accepted. Keep the existing Control UI npm-pack fixtures aligned and verify that real npm postinstall preserves the worker.User Impact
Release and Docker package validation fails before shipping a package with broken installed Code Mode. Historical releases remain inspectable; packaged Control UI and the Code Mode worker both survive real npm installation.
Evidence
Failing-before adversarial reproduction
Passing real tarball and npm-postinstall tests
Actual full production build and npm tarball
Full changed-file gate and independent review
Verified the precise historical boundary directly against release tags:
v2026.5.14-beta.1contains no worker;v2026.5.14-beta.2introduces it. Current main has no subsequent changes in any of the three touched packaging files, so refreshing only for unrelated main drift would discard exact-head green proof without changing the tested packaging behavior.AI-assisted implementation and review.