fix(docker): package selected external plugins in source-built images#103629
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63f959f164
ℹ️ 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".
7369115 to
bb60f3b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb60f3b885
ℹ️ 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".
bb60f3b to
59d449b
Compare
|
Land-ready proof for exact head
Issue: #103626. |
|
Merged via squash.
|
…openclaw#103629) * build(docker): package selected external plugins * test(docker): auto-clean plugin fixture * fix(docker): preserve selected image provenance * fix(docker): accept manifest-only plugin selections * fix(docker): resolve selected plugin manifest ids * fix(docker): isolate resolved plugin selection
Closes #103626
What Problem This Solves
Fixes an issue where operators building a source-based OpenClaw OCI image with
OPENCLAW_EXTENSIONScould successfully stage a selected official plugin's dependencies while the final image still lacked a runnable/app/dist/extensions/<id>runtime for plugins excluded from the root bundled distribution.Why This Change Was Made
The Docker build now validates and canonicalizes selected plugin ids, passes the selection only to the in-container unified build, and compiles selected plugins whose package metadata keeps them outside the ordinary root distribution. Known dependency/source-only selections retain their existing staging behavior, unknown ids fail closed, and ordinary npm/release artifact selection remains unchanged.
The final-image lane verifies manifests, rewritten package entries, production dependencies, runtime capabilities, implicit ClawRouter availability, unselected-plugin absence, no-browser defaults, and caller-supplied build provenance. Release guards reject accidental external-plugin trees from the core package.
This is intentionally an OCI-image packaging change for standalone gateways and generic Docker users. Crabhelm-managed gateways consume a separate private x86_64 appliance archive containing an OpenClaw npm tarball; they do not consume these custom OCI images.
User Impact
Operators can build digest-pinned amd64 or arm64 OpenClaw images with selected ClickClack, Slack, or Microsoft Teams runtimes and receive an image that actually loads the selected channel after configuration. Existing ClawRouter, Teams, internal-plugin, dependency-only selection, pruning, and npm/release behavior remain intact.
Risk is medium because the Docker build and final runtime artifact layout change. The risk is bounded to source-built images and covered on native amd64 and arm64 Docker hosts; no registry image, deployment, credential, release, version, tag, or npm publication is part of this PR.
Evidence
63f959f1648dbfac4b240cda879142c8e7f71fc9: 131 focused assertions passed (src/dockerfile.test.ts, build-entry/release guards, and Docker packaging E2E), plus Docker E2E boundary and generated docs-map checks on Testbox run 29085883120.git diff --checkpassed on the exact PR head.sha256:8e415c4f9bc7f85a7a960a2292903baff52f7ff01d9bd344d47449818498ddf3(Testbox host run 29083946067).sha256:dc7e3c1bb2f5bd7a421477f4c54233e434366d1cc59b41a21d0c879abd96f975(Crabbox run).git range-diffreports all three commits patch-identical across the final rebase; upstream drift did not touch Docker/plugin packaging or selected plugin inputs, so native images were not rebuilt solely for commit-id drift.check:changedall lanes and final autoreview passed on the same patch before the patch-identical rebase; autoreview reported no accepted/actionable findings.No
CHANGELOG.mdedit: normal OpenClaw PRs leave changelog generation to the release process.AI-assisted implementation; no agent transcript is included by explicit request.