SP-11: plugins parity — PluginState/Descriptor + per-plugin lifecycle cascade (v26.06.91)#119
Merged
Merged
Conversation
added 6 commits
June 10, 2026 01:43
…PluginError hierarchy - New models.py: PluginState (StrEnum) with LOADED/STARTED/STOPPED/FAILED; PluginDescriptor mutable dataclass tracking per-plugin runtime state - decorators.py: Plugin dataclass gains optional name/author fields; @plugin decorator gains matching kw-args; name defaults to id - exceptions.py + kernel/__init__: PluginException base + PluginLoadError, PluginStartError, PluginStopError, PluginStateError subclasses - resolver.py: PluginResolutionError now extends PluginException
…/get_plugin with cascade - registry.py: get_extension() returns single highest-priority extension; raises ValueError if point not registered or has no extensions - manager.py: track _descriptors dict[str, PluginDescriptor]; _transition() helper for state changes; start_plugin() cascades transitive deps in topo order, skips STARTED; stop_plugin() cascades transitive dependents in reverse order, skips STOPPED/LOADED; get_plugin() returns descriptor or None; start_all/stop_all wire state transitions; remove() drops descriptor - plugins/__init__.py: re-export PluginDescriptor, PluginState
- test_plugin_lifecycle.py: 14 tests covering start_plugin cascade (A←B←C), skip-already-started, stop_plugin reverse cascade, get_extension happy/error paths, FAILED state on hook error, get_plugin none/descriptor, name/author in descriptor, start_all/stop_all state marking - test_plugins_auto_configuration.py: 7 tests verifying PluginsAutoConfiguration markers, on_property condition key, bean factory types and registry identity
…de, PluginError, get_extension) Documents: PluginState/PluginDescriptor fields and transitions; @plugin name/author optional fields with backward-compat note; per-plugin start_plugin/stop_plugin/ get_plugin with cascade semantics; PluginError hierarchy tree; get_extension single-getter; PluginsAutoConfiguration conditional activation and bean table
…-started plugins (review)
…ptor, per-plugin lifecycle cascade, PluginError, get_extension)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eleventh sub-project of the PyFly↔Spring-Boot parity initiative — the plugin system.
PluginState(LOADED/STARTED/STOPPED/FAILED) + per-pluginPluginDescriptor.start_plugin(id)(dependency cascade — deps first),stop_plugin(id)(reverse cascade — dependents first),get_plugin(id); FAILED + typedPluginStartError/PluginStopErroron hook failure.PluginException(PyFlyException)+ Load/Start/Stop/State errors;add()raisesPluginLoadError.ExtensionRegistry.get_extension(point)single-getter;@plugin(name=, author=)(backward-compatible).Test Plan
4523 passed, 7 skipped, 45 deselected.@plugin(id=...)+ tests pass).