mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:50:43 +00:00
Fail invalid plugin registration gates loudly (#72577)
* fix plugin registration gate failures
This commit is contained in:
@@ -81,6 +81,19 @@ describe("my-channel target resolution", () => {
|
||||
|
||||
## Testing patterns
|
||||
|
||||
### Testing registration contracts
|
||||
|
||||
Unit tests that pass a hand-written `api` mock to `register(api)` do not exercise
|
||||
OpenClaw's loader acceptance gates. Add at least one loader-backed smoke test
|
||||
for each registration surface your plugin depends on, especially hooks and
|
||||
exclusive capabilities such as memory.
|
||||
|
||||
The real loader fails plugin registration when required metadata is missing or a
|
||||
plugin calls a capability API it does not own. For example,
|
||||
`api.registerHook(...)` requires a hook name, and
|
||||
`api.registerMemoryCapability(...)` requires the plugin manifest or exported
|
||||
entry to declare `kind: "memory"`.
|
||||
|
||||
### Unit testing a channel plugin
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user