fix: simplify bundled runtime dependency repair#75183
fix: simplify bundled runtime dependency repair#75183clawsweeper[bot] merged 29 commits intomainfrom
Conversation
|
Codex review: needs maintainer review before merge. What this changes: This PR refactors bundled plugin runtime dependency planning and repair into a package-level flow, hardens materialization/lock/symlink recovery, adjusts Gateway startup and CLI plugin-load policy, and updates related tests, docs, and changelog entries. Maintainer follow-up before merge: No safe fix-PR candidate: this automerge-opted PR has no discrete review finding from this pass, and the remaining action is exact-head CI/merge gating rather than an autonomous repair. Security review: Security review cleared: Security review cleared: the diff touches package-manager repair paths but keeps lifecycle scripts disabled, disables workspace installs, avoids new secrets or permissions, and does not introduce a concrete supply-chain regression. Review detailsBest possible solution: Keep the package-level runtime-deps repair direction, let the exact-head automerge/CI gates finish on the current head, and merge only after the pending checks and maintainer policy gates are satisfied. Do we have a high-confidence way to reproduce the issue? Yes. The linked corrupt staged-tree scenario is reproducible by leaving a generated install manifest plus partial Is this the best way to solve the issue? Yes. The PR’s direction is the narrow maintainable fix: OpenClaw computes the active package-level dependency plan, npm/pnpm converges the install root with scripts/workspaces disabled, and OpenClaw verifies runtime entries before import instead of relying on package sentinels alone. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 9d21df251e50. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d4a7b17ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
540f98f to
a4c6183
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a4c6183 to
4620e66
Compare
This comment has been minimized.
This comment has been minimized.
|
@clawsweeper automerge |
fef2b95 to
04dc566
Compare
|
🦞🦞 Source: I added |
|
@clawsweeper approve automerge |
Summary: - Merged fix: simplify bundled runtime dependency repair after ClawSweeper review. ClawSweeper fixups: - Included follow-up commit: fix: verify cached bundled runtime roots - Included follow-up commit: refactor: simplify plugin runtime startup paths - Included follow-up commit: refactor: trim plugin startup policy helpers - Included follow-up commit: refactor: trust package manager runtime deps materialization - Included follow-up commit: fix: narrow channel runtime deps skip policy - Included follow-up commit: refactor: defer startup plugin runtime deps - Ran the ClawSweeper repair loop before final review. Validation: - ClawSweeper review passed for head 04dc566. - Required merge gates passed before the squash merge. Prepared head SHA: 04dc566 Review: openclaw#75183 (comment) Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: Shakker <shakkerdroid@gmail.com> Co-authored-by: clawsweeper-repair <clawsweeper-repair@users.noreply.github.com>
Summary: - Merged fix: simplify bundled runtime dependency repair after ClawSweeper review. ClawSweeper fixups: - Included follow-up commit: fix: verify cached bundled runtime roots - Included follow-up commit: refactor: simplify plugin runtime startup paths - Included follow-up commit: refactor: trim plugin startup policy helpers - Included follow-up commit: refactor: trust package manager runtime deps materialization - Included follow-up commit: fix: narrow channel runtime deps skip policy - Included follow-up commit: refactor: defer startup plugin runtime deps - Ran the ClawSweeper repair loop before final review. Validation: - ClawSweeper review passed for head 04dc566. - Required merge gates passed before the squash merge. Prepared head SHA: 04dc566 Review: openclaw#75183 (comment) Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: Shakker <shakkerdroid@gmail.com> Co-authored-by: clawsweeper-repair <clawsweeper-repair@users.noreply.github.com>
Summary
This PR unifies bundled plugin runtime-dependency repair around the package-level plan and lets npm/pnpm own dependency convergence once OpenClaw has decided a repair is required.
What changed:
node_modulestree without complete generated materialization as incomplete, even when package sentinels such asnode_modules/<dep>/package.jsonexist.Fixes / related reports
Fixes #75309.
Supersedes the implementation approach in #75310 by keeping the same narrow idea but closing the reviewed hole where a generated manifest plus a no-
mainpackage sentinel could still look materialized.Also hardens the recovery side of the already-addressed reports #75296 and #75304:
Not claimed: #73520, #74948, #74963, #75071, and #75288 are nearby runtime-deps lifecycle issues with different root causes.
Verification
Local:
pnpm docs:listpnpm exec oxfmt --check --threads=1 src/plugins/bundled-runtime-deps-install.ts src/plugins/bundled-runtime-deps.ts src/plugins/bundled-runtime-deps-materialization.ts src/plugins/bundled-runtime-deps.test.ts src/commands/doctor-bundled-plugin-runtime-deps.test.tspnpm exec oxfmt --check --threads=1 CHANGELOG.mdpnpm check:changelog-attributionsgit diff --checkpnpm test src/plugins/bundled-runtime-deps.test.ts src/commands/doctor-bundled-plugin-runtime-deps.test.ts src/gateway/server-startup-plugins.test.ts src/gateway/server.reload.test.ts -- --reporter=verboseBlacksmith/Testbox:
tbx_01kqgsehj3tf33k2dmzy35ds7j:pnpm test src/plugins/bundled-runtime-deps.test.ts src/commands/doctor-bundled-plugin-runtime-deps.test.ts src/gateway/server-startup-plugins.test.ts src/gateway/server.reload.test.ts -- --reporter=verbosepassed, 3 Vitest shards / 177 tests.Broad
pnpm check:changedwas attempted ontbx_01kqgrw1phqcm20c9w06n1w4wx, but the Testbox full-sync omitted the tracked-but-gitignoredpnpm-lock.yaml; the workaround polluted remotenode_modulesinto the changed-file scan andtsgolintwas later SIGKILLed. I do not count that polluted run as product signal.