-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
Published 2026.3.7 build splits context-engine registry across bundle chunks #40096
Description
Description
Published [email protected] appears to split context-engine registration across multiple bundled registry chunks.
This causes a failure mode where a plugin logs as loaded and calls api.registerContextEngine(...), but later context-engine resolution still reports only the built-in engine set.
Reproduction
Reproduced on March 8, 2026 against:
[email protected]@martian-engineering/[email protected]
Using the published release bundle in a temp install:
- Install
[email protected] - Install
[email protected]under~/.openclaw/extensions/lossless-claw - Load plugins via the published host bundle entry that exports
loadOpenClawPluginsfromdist/reply-C5LKjXcC.js - Resolve the context engine via different published registry chunks
Observed:
- plugin load succeeds
lossless-clawlogs as loaded- resolving via one registry chunk succeeds
- resolving via another registry chunk fails with:
Context engine "lossless-claw" is not registered. Available engines: (none)
Root Cause
The published bundle contains at least two distinct context-engine registry chunks:
dist/registry-DGVIIthr.jsdist/registry-DoLLbW4m.js
Each chunk has its own module-level context-engine map.
Direct repro in the same process:
loadOpenClawPlugins(...)throughdist/reply-C5LKjXcC.jsregisterslossless-clawregistry-DGVIIthr.jscan resolve itregistry-DoLLbW4m.jscannot
That means plugin registration and later resolution can end up talking to different singleton instances.
Expected
All plugin registration and context-engine resolution paths in the published build should share a single registry/context-engine singleton.
Notes
This does not appear to be a lossless-claw registration bug.
Its register() path still calls:
api.registerContextEngine("lossless-claw", () => lcm)before logging plugin load success.
Suggested Fix
- Deduplicate the registry/context-engine module in the published bundle
- Add a release-bundle regression test that loads a plugin context engine and then resolves it from the agent/gateway runtime path
- Verify gateway/plugin-loader and agent runner import the same registry module in
dist