fix(plugins): clear _plugin_platform_names on force-rediscover
discover_and_load(force=True) cleared every per-plugin registry except _plugin_platform_names, which register_platform() populates. A platform plugin disabled between force-rediscovers left a stale name behind, so the set diverged from the real platform_registry / _plugins state and never shrank across repeated force passes. Add the missing clear() and a regression test that seeds every per-plugin registry, forces a rediscover, and asserts they all empty (so a future registry addition can't silently leak across a force pass either).
This commit is contained in:
@@ -1129,6 +1129,7 @@ class PluginManager:
|
||||
self._hooks.clear()
|
||||
self._middleware.clear()
|
||||
self._plugin_tool_names.clear()
|
||||
self._plugin_platform_names.clear()
|
||||
self._cli_commands.clear()
|
||||
self._plugin_commands.clear()
|
||||
self._plugin_skills.clear()
|
||||
|
||||
Reference in New Issue
Block a user