Repository navigation
fix: stop rejecting plugin-owned build dependencies in release checks - #138935
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 3:24 AM ET / 07:24 UTC. ClawSweeper reviewWhat this changesThe PR makes release dependency checks distinguish root-package imports from plugin-owned build tools, while retaining strict JavaScript parsing and adding ownership regression coverage. Merge readiness⛔ Blocked before merge - 1 item remains This repair remains useful: current main still rejects caller-owned build tools. No blocking patch defect was established, and the protected maintainer-owned PR should remain open. Priority: P2 Review scores
Verification
How this fits togetherPrepublish and postpublish verification scan packaged JavaScript and compare its dependencies with package manifests. This scanner determines which imports belong to OpenClaw’s root package before reporting missing dependencies. flowchart TD
A[Packaged JavaScript] --> B[Strict syntax validation]
B --> C[Loader ownership analysis]
C --> D{Resolution owner}
D -->|Root or unproven require| E[Root manifest check]
D -->|Proven caller| F[Exclude caller-owned dependency]
E --> G[Release verification result]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +447, Other +599. Total +1046 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep dependency ownership analysis in the shared release scanner; lexical classification requires additional tooling beyond the old name-only walk, without adding root dependencies or package-specific exemptions. Do we have a high-confidence way to reproduce the issue? Yes: current main classifies the plugin builder’s literal require("esbuild") as a root dependency despite its plugin-relative anchor. The supplied artifact comparison corroborates this; no reproduction was executed here. Is this the best way to solve the issue? Yes for the reported failure: the shared scanner owns this classification, and its existing relative-import helper cannot determine loader ownership. Adding esbuild to the root package would contradict the documented plugin build contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 54af8f1b839f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Follow-up verification closes both reviewer-coverage gaps. The complete Testbox owner-suite, changed-gate, baseline/fixed scanner logs and minimal scanner runner were read directly and checked against the recorded source/artifact hashes. The full 146-test owner suite and package scan used the pinned dependencies; exact-head CI 33951976541 also passed. The installed TypeScript 6.0.3 implementation (package gitHead |
|
Merged via squash.
|
The pre/postpublish root dependency check rejects a correctly packaged plugin builder because it treats every call named
requireas a core import. The Control UI builder anchors Node'screateRequireto the caller plugin'spackage.json; its build tool belongs to that plugin. The existing checker limitation became visible when that builder was added in #134943.Replace the name-only walk with lexical loader ownership using the existing TypeScript dependency, retaining strict Acorn syntax validation. Module-relative loaders and their known aliases count as root imports. Caller ownership is admitted only through a closed entry declaration prefix with plain parameters and supported Node normalization/factory calls; only immutable path and loader snapshots survive subsequent effects. Unsupported bindings, raw coercion, unknown calls and other unproved shapes retain the conservative literal-
requirecheck. This does not evaluate arbitrary paths or helper implementations.The source change is release tooling only: +599 net tooling lines, +447 test lines, and no product runtime or dependency changes. The growth supplies the lexical owner boundary absent from the old walker, replacing its 66 lines; it handles aliases and unknown states without plugin-specific exemptions or an object mutation graph. Public collector tests cover both emitted builder orderings, root aliases, shadowing/reassignment/defaults, unknown loaders, and conservative effects. Existing manifest, syntax, comments/strings, bounds and package-exclusion coverage remains.
The full 146-test owner suite and complete changed-file gates passed on the main-derived candidate based on
805c6fb9cf2d4ec921603b95418ee5e21dbc9fde, using this Testbox run. Against identical extracted bytes from the failed release validation, the old checker rejects only esbuild and the new checker passes. Core artifact SHA-256:57417cd2fced0ab19c6d4802184559a2ed47122bbd9859283f49c69850f607bb; sourced3ebbd01d60ed316f2cefd7734f911039969ceb6, tooling2329399cf6a9a2ca0c19d6c620b713a2768f9125.The dependency comparison removes only
esbuildfromplugins-authoring-command-D5654nve.jsand adds seven recognized root-loader importer edges: roots 46 → 47 and importer edges 370 → 376. Paired extracted-tree scans took 14.075 s / 2,029,188 KB peak RSS before and 29.656 s / 2,877,400 KB after; existing scan limits remain unchanged.Separately, the previously completed installed compiled-plugin flow used the exact matching root + AI tarballs, with no root esbuild: init, build, validate, build --check, and pack all passed with plugin-owned build tools. Those runtime artifacts are unchanged by this scanner repair. Fresh managed review found no actionable P0–P2 findings.