Conversation
…de, requires validation (#84) Add structural tests verifying: - Engine rejects unknown module types with clear errors - Workflow dependency validation fails for missing capabilities - Workflow dependency validation fails for missing plugins - Selective plugin loading: only loaded plugin types are available - All plugins have valid metadata (name, version, manifest) - Factory map populated correctly by plugins - Schema registry tracks all plugin module types Create docs/PLUGIN_DEVELOPMENT.md: - Comprehensive guide for creating internal EnginePlugin plugins - Covers ModuleFactories, StepFactories, TriggerFactories, WiringHooks - Documents capability contracts and workflow dependency validation - Includes example plugin structure and testing patterns Add requires section to license-validator example config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements Phase 4 of the Engine Decomposition Plan, adding structural tests to verify the plugin-based architecture, creating a comprehensive plugin development guide, and updating the license-validator example config with the missing requires section.
Changes:
- Added 9 structural tests verifying that the core engine properly rejects unknown module types, validates workflow requirements (capabilities and plugins), supports selective plugin loading, and ensures all 17 plugins are properly registered
- Created a comprehensive plugin development guide documenting the EnginePlugin interface, plugin structure, capabilities system, wiring hooks, and testing patterns
- Added
requiressection to license-validator.yaml example to align it with all other example configs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| engine_structural_test.go | New file with 9 tests validating core engine behavior: unknown type rejection, capability/plugin requirement validation, selective plugin loading, and plugin factory registration |
| docs/PLUGIN_DEVELOPMENT.md | New comprehensive guide for developing internal engine plugins, including interface documentation, step-by-step creation guide, code examples, and a reference table of all 17 existing plugins |
| example/license-validator.yaml | Added requires.plugins section declaring dependency on the "license" plugin, bringing this example in line with all other configs |
Comment on lines
+359
to
+362
| func TestPluginLoads(t *testing.T) { | ||
| app := modular.NewStdApplication(modular.NewStdConfigProvider(nil), nil) | ||
| engine := workflow.NewStdEngine(app, slog.Default()) | ||
|
|
There was a problem hiding this comment.
The test example uses slog.Default() but the imports section doesn't include "log/slog". Add "log/slog" to the imports, or consider using a mock logger from the test helpers as done in the actual structural tests.
Contributor
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Contributor
…141) * Initial plan * docs: fix PipelineStep signature, add slog import, and handle LoadPlugin error in PLUGIN_DEVELOPMENT.md Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
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.
Engine Decomposition Phase 4 — Clean Core
Implements key Phase 4 tasks from the Engine Decomposition Plan.
Changes
Structural Tests (
engine_structural_test.go)9 new tests verifying engine decomposition integrity:
TestCoreRejectsUnknownModuleType— engine with no plugins loaded returns clear "unknown module type" errorTestCoreRejectsMultipleUnknownTypes— error message includes the specific unknown typeTestRequiresValidation_MissingCapability—requires.capabilitiesfails when a capability has no providerTestRequiresValidation_SatisfiedCapabilities— succeeds when all required capabilities are providedTestRequiresValidation_MissingPlugin—requires.pluginsfails when a named plugin isn't loadedTestSelectivePluginLoading_HTTPOnly— loading only HTTP plugin makes HTTP types available, messaging types remain unknownTestAllPluginsProvideFactories— all 17 plugins have valid name, version, and manifestTestEngineFactoryMapPopulatedByPlugins— factory map contains expected types from all pluginsTestSchemaKnowsPluginModuleTypes— every factory type is registered in schema.KnownModuleTypes()Plugin Development Guide (
docs/PLUGIN_DEVELOPMENT.md)Comprehensive guide for creating internal
EnginePluginplugins:requires:section)Example Config
requiressection toexample/license-validator.yaml(the only example missing it)Related