Skip to content

fix(plugins): reuse published metadata on hot paths - #127355

Merged
steipete merged 1 commit into
mainfrom
steipete/plugin-metadata-passthroughs
Aug 21, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/plugin-metadata-passthroughs

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Five hot paths still re-scanned plugin manifests from disk on every call instead of reusing the lifecycle-owned published metadata generation: plugin tool resolution re-read the manifest per tool candidate (through a per-call getRuntimeConfig() poll), skills loading and hook-dir resolution did an unconditional cold load before their own memos, channel command defaults passed a stateDir that unconditionally disabled snapshot reuse even when it equaled the process state root, and channel env-var discovery cold-loaded per credential lookup with a minted {} config.

Phase 3 of the plugin-metadata campaign, following #126629 (secrets lanes) and #126630 (gateway generation reuse).

Why This Change Was Made

All five convert to the slot-probing resolvePluginMetadataSnapshot with the original (or absent) config, per the repo rule that gateway plugin metadata is process-stable and hot paths never freshness-poll. Deleting resolveCurrentManifestPlugin also removes a per-tool-call runtime-config poll; the prepared load-context config is the generation-consistent authority for cached tool resolution.

User Impact

Manifest scans per operation drop to zero on every touched path when a published generation exists (tools 1→0 per cached execution, hooks 2→0, channel env vars 2→0, skills 1→0, channel command defaults 1→0). No behavior or config changes; workspace isolation, custom state roots, and tool ownership checks preserved.

Evidence

  • 126 focused tests incl. new regressions per path (tools.optional, plugin-hooks, plugin-skills, channel-env-vars.dynamic, read-only-command-defaults); rerun green post-rebase on current main
  • pnpm check:changed green; autoreview clean (no actionable findings)
  • Production LOC +19/−34 (net −15); tests +148/−7

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added r: skill Auto-close: skills should be published on ClawHub, not added to core. size: M maintainer Maintainer-authored PR labels Aug 21, 2026
@steipete
steipete marked this pull request as ready for review August 21, 2026 18:21
@steipete
steipete requested a review from a team as a code owner August 21, 2026 18:21
@steipete
steipete merged commit cddc1ac into main Aug 21, 2026
295 checks passed
@steipete
steipete deleted the steipete/plugin-metadata-passthroughs branch August 21, 2026 18:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR r: skill Auto-close: skills should be published on ClawHub, not added to core. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant