Skip to content

fix(plugins): restore cached memory capability on cache hits#65240

Merged
vincentkoc merged 2 commits into
openclaw:mainfrom
sercada:fix/63157-cached-memory-capability
Apr 12, 2026
Merged

fix(plugins): restore cached memory capability on cache hits#65240
vincentkoc merged 2 commits into
openclaw:mainfrom
sercada:fix/63157-cached-memory-capability

Conversation

@sercada

@sercada sercada commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • persist the registered memory capability in the plugin registry cache
  • restore the cached capability on cache hits so memory publicArtifacts stay available
  • add a regression test covering cached restores for memory capability public artifacts

Testing

  • pnpm exec vitest run --config vitest.config.ts src/plugins/loader.test.ts src/plugins/memory-state.test.ts --maxWorkers=1

Fixes #63157

@greptile-apps

greptile-apps Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where the registered memoryCapability was not being persisted to or restored from the plugin registry cache. On a cache hit, listActiveMemoryPublicArtifacts would return empty because memoryPluginState.capability was never repopulated. The fix adds memoryCapability to CachedPluginState, saves it via getMemoryCapabilityRegistration() when caching, and passes it through restoreMemoryPluginState on a cache hit — consistent with how all other memory state fields (corpusSupplements, memoryRuntime, etc.) are already handled.

Confidence Score: 5/5

Safe to merge — targeted one-field fix consistent with existing cache patterns, backed by a direct regression test.

The change is a minimal, well-scoped addition of one previously omitted field to the plugin registry cache save/restore cycle. It mirrors exactly how every other memory state field is handled. The afterEach hook calls clearPluginLoaderCache() → clearMemoryPluginState(), so test isolation is preserved. No P0 or P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(plugins): restore cached memory capa..." | Re-trigger Greptile

@sercada

sercada commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

I checked the current CI on April 12, 2026 and the failures here appear to match failures already showing up on recent main runs as well (for example CI runs 24302117102 and 24302181980).

The red jobs I inspected are failing in areas outside this diff, including:

  • existing extension boundary failures around extensions/memory-core/src/dreaming-narrative.ts
  • an existing web-fetch boundary failure in src/secrets/runtime.test-support.ts
  • generated schema drift in src/config/schema.base.generated.test.ts
  • unrelated msteams logging expectation failures
  • unrelated provider-family contract coverage failures for opencode / opencode-go

This PR only changes src/plugins/loader.ts and src/plugins/loader.test.ts to persist/restore cached memoryCapability, and I do not see a CI failure pointing at that path.

Focused validation for this change passed locally:

  • pnpm exec vitest run --config vitest.config.ts src/plugins/loader.test.ts src/plugins/memory-state.test.ts --maxWorkers=1

Happy to rebase/rerun once main is green again, or adjust if anyone sees a direct coupling I missed.

@vincentkoc vincentkoc self-assigned this Apr 12, 2026
@vincentkoc
vincentkoc force-pushed the fix/63157-cached-memory-capability branch from d6f123c to 4209f05 Compare April 12, 2026 10:26
@vincentkoc
vincentkoc merged commit 8f156df into openclaw:main Apr 12, 2026
39 of 41 checks passed
TOMUIV pushed a commit to TOMUIV/openclaw that referenced this pull request Apr 14, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
…w#65240)

Merged via squash.

Prepared head SHA: 4209f05
Co-authored-by: sercada <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: cached plugin restore drops memory capability and breaks memory-wiki bridge imports

2 participants