docs: update testing strategy and plugin development workflows#53
Open
msureshkumar88 wants to merge 7 commits intomainfrom
Open
docs: update testing strategy and plugin development workflows#53msureshkumar88 wants to merge 7 commits intomainfrom
msureshkumar88 wants to merge 7 commits intomainfrom
Conversation
added 7 commits
April 24, 2026 11:54
Implements an interactive plugin scaffold generator that creates complete plugin structures from Jinja2 templates. Features: - Interactive CLI with prompts for plugin metadata - Non-interactive mode for automation - Generates all required files (Cargo.toml, pyproject.toml, Makefile, etc.) - Creates Python package with type stubs - Creates Rust source with PyO3 bindings - Includes test scaffolding and optional benchmarks - Automatically updates workspace Cargo.toml - Validates plugin name and configuration Usage: make plugin-scaffold # Interactive mode python3 tools/scaffold_plugin.py --help # See all options Components: - tools/scaffold_plugin.py: Main generator script - tools/templates/plugin/: Jinja2 templates for all plugin files - Makefile: Added plugin-scaffold and plugin-scaffold-help targets The generator follows patterns from existing plugins (url_reputation, pii_filter, etc.) and ensures consistency across the codebase. Tested with make plugins-validate - all checks pass. Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Add agent hooks (agent_pre_invoke, agent_post_invoke) - Add HTTP hooks (http_pre_request, http_post_request, http_auth_resolve_user, http_auth_check_permission) - Organize hooks by category with comments - Total of 12 hooks across 5 categories now available for plugin scaffolding Signed-off-by: Suresh <suresh@example.com> Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Remove TODO placeholders for integration and performance tests - Add unit tests for config deserialization and immutability - Add unit tests for None value handling - Add edge case tests for empty strings and special characters - Add config roundtrip serialization test - Focus on unit-level testing within plugin directory scope Signed-off-by: Suresh <suresh@example.com> Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Add test_engine_creation_with_defaults test - Add test_engine_creation_with_custom_config test - Remove TODO placeholder and provide concrete test implementations - Tests verify engine initialization and configuration handling Signed-off-by: Suresh <suresh@example.com> Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Add 'Creating a New Plugin' section with scaffold usage - Document all 12 available hooks across 5 categories - Include interactive and non-interactive mode examples - Update helper commands section with plugin-scaffold target - Provide clear guidance for new plugin development Signed-off-by: Suresh <suresh@example.com> Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Add 'Using the Plugin Scaffold Generator' section - Document recommended workflow for creating new plugins - Include interactive and non-interactive mode examples - Clarify manual creation as alternative approach - Update plugin creation workflow with scaffold-first approach Signed-off-by: Suresh <suresh@example.com> Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
- Add comprehensive testing strategy section to AGENTS.md - Document unit tests in cpex-plugins - Document integration/E2E tests in mcp-context-forge - Add cross-repository coordination guidelines - Expand DEVELOPING.md with detailed workflows - Current workflow: Rust + Python hybrid - Future workflow: Pure Rust (post-framework migration) - Add integration testing coordination - Document migration path - Rewrite TESTING.md with testing architecture - Add cross-repository testing workflow - Add testing coordination guidelines - Add future pure Rust testing approach - Add debugging and best practices sections - Update README.md with testing strategy summary - Add current/future architecture overview - Add proper cross-references to detailed docs Closes #20 Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
Collaborator
|
@msureshkumar88 this needs to be rebased so that I can review and merge |
Collaborator
Author
|
Reviewing python side implementation documentation at the movement will update bock docs together |
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
Updates cpex-plugins documentation to reflect the latest agreement on testing strategy and plugin development workflows.
Changes
Testing Strategy
Test Locations:
cpex-plugins/tests/- Test plugin logic in isolationmcp-context-forge/tests/integration/- Test plugin integration with gatewaymcp-context-forge/tests/e2e/- Test complete workflows with pluginsThis separation ensures:
Plugin Development Workflow
Where to Develop:
cpex-pluginsrepositoryplugins/rust/python-package/<slug>/cpex-plugins/tests/Current Workflow (Rust + Python Hybrid):
make plugin-scaffoldincpex-pluginscpex-plugins/tests/make install && make test-allcpex-pluginswith unit testsmcp-context-forgeteammcp-context-forge/tests/<slug>-v<version>(triggers PyPI publish)Future Workflow (Pure Rust - Post Framework Migration):
cargo new --libincpex-pluginscpex-plugins/tests/cargo build && cargo testcpex-pluginswith unit testsmcp-context-forgeteammcp-context-forge/tests/Key Points:
cpex-pluginsmcp-context-forgeCross-Repository Coordination
Development Flow:
cpex-plugins→ Write unit tests → Create PRcpex-pluginsPR merged → Coordinate withmcp-context-forgemcp-context-forge→ Create PRFiles Updated
AGENTS.md
DEVELOPING.md
TESTING.md
README.md
Documentation Consistency
All documentation uses consistent:
Related Issue
Closes #20