Problem
plugins/api/plugin.go module factories call module.NewQueryHandler(), module.NewCommandHandler() etc. directly. Swapping implementations requires modifying the plugin source code.
Fix Direction
Factories should accept constructor functions injected at plugin registration time, or use a secondary registry, so the concrete type can be substituted without touching the plugin. This makes the plugin truly open for extension.
Context
See docs/DEFERRED_ISSUES.md — Architecture section.
Problem
plugins/api/plugin.gomodule factories callmodule.NewQueryHandler(),module.NewCommandHandler()etc. directly. Swapping implementations requires modifying the plugin source code.Fix Direction
Factories should accept constructor functions injected at plugin registration time, or use a secondary registry, so the concrete type can be substituted without touching the plugin. This makes the plugin truly open for extension.
Context
See
docs/DEFERRED_ISSUES.md— Architecture section.