feat(plugins): implement PluginManager lifecycle state machine and PluginDescriptor compatibility fields #5747

Open
opened 2026-04-09 09:03:20 +00:00 by HAL9000 · 2 comments
Owner

Background

Part of Epic #5711 (Plugin Architecture Extensions). Fixes the incomplete PluginManager lifecycle state machine and adds min_core_version/max_core_version compatibility fields to PluginDescriptor.

Expected Behavior

  • PluginState.EXECUTING state is set by PluginManager when a plugin is actively executing
  • Complete lifecycle: LOADING → LOADED → EXECUTING → ACTIVE → DEACTIVATING → INACTIVE
  • PluginDescriptor has min_core_version: str and max_core_version: str fields
  • PluginManager.load() validates plugin compatibility against current core version
  • Incompatible plugins are rejected with a clear error message

Subtasks

  • Fix PluginManager to set PluginState.EXECUTING during plugin execution (fixes UAT #5691)
  • Add min_core_version and max_core_version to PluginDescriptor (fixes UAT #5699)
  • Implement version compatibility validation in PluginManager.load()
  • Add plugin isolation: catch plugin exceptions to prevent core crashes (fixes UAT #5726)
  • Write Behave unit tests for plugin lifecycle and compatibility

Definition of Done

  • PluginState.EXECUTING set correctly during plugin execution
  • Version compatibility validation works
  • Plugin crashes don't propagate to core
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch: feat/v3.6.0/plugin-architecture
  • Commit Message: feat(plugins): implement PluginManager lifecycle state machine and PluginDescriptor compatibility fields
  • Milestone: v3.6.0
  • Parent Epic: #5711
  • Fixes: #5691, #5699, #5726

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Background Part of Epic #5711 (Plugin Architecture Extensions). Fixes the incomplete `PluginManager` lifecycle state machine and adds `min_core_version`/`max_core_version` compatibility fields to `PluginDescriptor`. ## Expected Behavior - `PluginState.EXECUTING` state is set by `PluginManager` when a plugin is actively executing - Complete lifecycle: LOADING → LOADED → EXECUTING → ACTIVE → DEACTIVATING → INACTIVE - `PluginDescriptor` has `min_core_version: str` and `max_core_version: str` fields - `PluginManager.load()` validates plugin compatibility against current core version - Incompatible plugins are rejected with a clear error message ## Subtasks - [ ] Fix `PluginManager` to set `PluginState.EXECUTING` during plugin execution (fixes UAT #5691) - [ ] Add `min_core_version` and `max_core_version` to `PluginDescriptor` (fixes UAT #5699) - [ ] Implement version compatibility validation in `PluginManager.load()` - [ ] Add plugin isolation: catch plugin exceptions to prevent core crashes (fixes UAT #5726) - [ ] Write Behave unit tests for plugin lifecycle and compatibility ## Definition of Done - [ ] `PluginState.EXECUTING` set correctly during plugin execution - [ ] Version compatibility validation works - [ ] Plugin crashes don't propagate to core - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch**: `feat/v3.6.0/plugin-architecture` - **Commit Message**: `feat(plugins): implement PluginManager lifecycle state machine and PluginDescriptor compatibility fields` - **Milestone**: v3.6.0 - **Parent Epic**: #5711 - **Fixes**: #5691, #5699, #5726 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.6.0 milestone 2026-04-09 09:08:07 +00:00
Author
Owner

MoSCoW classification: MoSCoW/Must have

Rationale: The PluginManager lifecycle state machine is incomplete — PluginState.EXECUTING is never set, version compatibility validation is missing, and plugin crashes can propagate to core. These are foundational correctness issues for the plugin architecture. The spec requires a complete lifecycle state machine and compatibility validation. This is a prerequisite for #5756 (plugin CLI) and must be completed first. Must Have for v3.6.0.

Also adding Points/5 — L — Fixing the lifecycle state machine, adding compatibility fields, implementing version validation, and adding crash isolation requires careful work across multiple files, estimated 1-2 days.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

MoSCoW classification: **MoSCoW/Must have** Rationale: The `PluginManager` lifecycle state machine is incomplete — `PluginState.EXECUTING` is never set, version compatibility validation is missing, and plugin crashes can propagate to core. These are foundational correctness issues for the plugin architecture. The spec requires a complete lifecycle state machine and compatibility validation. This is a prerequisite for #5756 (plugin CLI) and must be completed first. Must Have for v3.6.0. Also adding `Points/5` — L — Fixing the lifecycle state machine, adding compatibility fields, implementing version validation, and adding crash isolation requires careful work across multiple files, estimated 1-2 days. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — This is a foundational feature for the Plugin Architecture epic (#5711). The PluginManager lifecycle state machine is a prerequisite for #5756 (plugin CLI commands). Blocking issues get elevated priority.
  • Milestone: v3.6.0 — Already correctly assigned. Plugin architecture is scoped to M7.
  • Story Points: 3 — M size. Fixing lifecycle state machine and adding compatibility fields is a 4-8 hour task.
  • MoSCoW: Should Have — The PluginManager lifecycle is important for the plugin architecture epic. The EXECUTING state and version compatibility validation are needed for a production-ready plugin system.
  • Parent Epic: #5711 (Plugin Architecture Extensions — Plugin Manager, CLI & Lifecycle)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — This is a foundational feature for the Plugin Architecture epic (#5711). The PluginManager lifecycle state machine is a prerequisite for #5756 (plugin CLI commands). Blocking issues get elevated priority. - **Milestone**: v3.6.0 — Already correctly assigned. Plugin architecture is scoped to M7. - **Story Points**: 3 — M size. Fixing lifecycle state machine and adding compatibility fields is a 4-8 hour task. - **MoSCoW**: Should Have — The PluginManager lifecycle is important for the plugin architecture epic. The `EXECUTING` state and version compatibility validation are needed for a production-ready plugin system. - **Parent Epic**: #5711 (Plugin Architecture Extensions — Plugin Manager, CLI & Lifecycle) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5747
No description provided.