Repository navigation
fix(release): publish plugins with scoped dependency forks - #159124
Conversation
|
Land-ready evidence for exact head
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 26, 2026, 6:25 PM ET / 22:25 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch changes OpenClaw’s release lock generator to retain workspace dependency defaults alongside scoped forks, validate npm’s resolved graph, and repair conflicting dependency shrinkwraps, with regression tests. Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open. Current main still has the reported override-merging behavior, and the revised branch now tests the final generated lock through the generator entry point. The remaining merge requirement is to record the expanded test file’s measured cost. Priority: P2 Review scores
Verification
How this fits togetherRelease preflight feeds plugin manifests, workspace override policy, and the pnpm lock into the npm lock generator. The generated npm-format locks validate publishable packages and feed release dependency evidence. flowchart LR
A[Plugin manifest] --> D[Npm lock generator]
B[Workspace overrides] --> D
C[Pnpm lock] --> D
D --> E[Resolved graph validation]
E --> F[Package lock]
F --> G[Release dependency evidence]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +671, Other +365. Total +1036 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the release generator as the owner of scoped lock policy and resolved-graph validation, with a measured CI cost for its npm-backed regression coverage. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main can combine a derived global pin with a different workspace root default, and the PR describes a frozen plugin-publication reproduction. This read-only review did not execute it. Is this the best way to solve the issue? Yes. Repairing the release generator and asserting its final npm lock addresses the owning boundary; current main has no equivalent resolved-graph check. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 547bb312f409. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
|
@clawsweeper re-review The head has moved to |
|
🦞👀 Re-review progress:
|
…159124) * fix(release): preserve scoped npm lock policy * fix(release): retain scoped shrinkwrap checks * fix(release): verify repaired npm lock graphs
What Problem This Solves
Fixes official plugin publication stopping before registry mutation when a package combines a parent-scoped dependency fork with a different workspace default, or when dependency-owned shrinkwrap data bypasses the workspace's intended runtime graph.
User Impact
Release tooling can generate and verify plugin package locks with legitimate scoped dependency forks while rejecting or repairing dependency shrinkwrap graphs that violate workspace policy. The repair is generic: it contains no Zalouser,
tough-cookie, or release-version special case.Why This Change Was Made
The runtime-only planner previously promoted a scoped fork to a global npm override, conflicting with the workspace's explicit root default. It also treated a successfully generated lockfile as sufficient even when dependency-owned shrinkwrap metadata caused npm to place versions outside the effective workspace policy.
The canonical fix keeps explicit workspace defaults authoritative, derives exact runtime selections for transitive workspace ranges, and validates the resolved package-lock graph with npm Arborist-compatible override selection and Node placement resolution. Offending dependency shrinkwraps are disabled and npm is rerun to a fixed point, including when one repair exposes another violation. Validation covers dependency, optional-dependency, and peer edges; npm aliases; exact and range constraints; scoped and wildcard selectors; and Git, hosted-Git, file, directory, tag, and remote specs.
Production delta is +417/-52 lines (net +365) in
scripts/generate-npm-package-lock.mts; tests are +672/-1 (net +671). The production growth implements the previously missing owner boundary for npm placement, scoped override selection, shrinkwrap attribution, and fixed-point repair rather than adding a consumer guard or package-specific workaround. No user path was removed.Evidence
2026.8.33reproduction failed withoverrides.tough-cookie conflicts with pnpm lock policy; the same Zalouser generation command passes at this head.node scripts/run-vitest.mjs test/scripts/generate-npm-package-lock.test.ts test/package-manager-config.test.ts— 82/82 passed (67 + 15).node scripts/check-changed.mjs -- scripts/generate-npm-package-lock.mts test/scripts/generate-npm-package-lock.test.ts— all selected gates passed, including generation and verification of all 102 npm package-lock surfaces, formatting, tsgo, lint, dead-export scans, and repository guards.OverrideSetselection and dependency edge precedence, plushosted-git-infoURL classification, were inspected directly before implementing the contract.git diff --check— passed.No user-visible UI change; screenshot proof is not applicable.