feat(utils): split MCP and plugin requirements, add plugin integration tests#458
Open
omid-aignostics wants to merge 22 commits intomainfrom
Open
feat(utils): split MCP and plugin requirements, add plugin integration tests#458omid-aignostics wants to merge 22 commits intomainfrom
omid-aignostics wants to merge 22 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refines the utils requirements/specs to separate MCP-server concerns from a new plugin system requirement set, and adds integration test coverage that validates plugin-provided CLI and GUI navigation registration via a dummy plugin fixture.
Changes:
- Split requirements into MCP server (
SHR-UTILS-1) vs plugin system (SHR-UTILS-2+SWR-UTILS-2-*) and updatedSPEC-UTILS-SERVICEto include FR-11/12/13. - Extended the
mcp_dummy_plugintest resource with a Typer CLI and GUI nav builder exports to support plugin integration testing. - Added plugin integration tests plus corresponding BDD feature files; corrected
record_propertyIDs indi_test.py; updated pre-commit exclusions fortests/resources/.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/resources/mcp_dummy_plugin/src/mcp_dummy_plugin/_nav.py | Adds dummy BaseNavBuilder implementation for GUI plugin registration tests. |
| tests/resources/mcp_dummy_plugin/src/mcp_dummy_plugin/_cli.py | Adds dummy Typer CLI for CLI plugin registration tests. |
| tests/resources/mcp_dummy_plugin/src/mcp_dummy_plugin/init.py | Exports dummy CLI/nav builder alongside MCP entrypoint module. |
| tests/resources/mcp_dummy_plugin/pyproject.toml | Adds deps needed by the dummy plugin’s new CLI/nav modules. |
| tests/aignostics/utils/plugin_test.py | New integration tests verifying plugin discovery for CLI + GUI navigation. |
| tests/aignostics/utils/di_test.py | Fixes record_property tested-item-id references to SPEC-UTILS-SERVICE. |
| tests/aignostics/utils/TC-UTILS-PLUGIN-02.feature | BDD spec for plugin CLI command registration. |
| tests/aignostics/utils/TC-UTILS-PLUGIN-03.feature | BDD spec for plugin GUI page/nav registration. |
| specifications/SPEC-UTILS-SERVICE.md | Adds FR-11/12/13 and links spec fulfillment to new SWRs. |
| requirements/SHR-UTILS-1.md | Narrows MCP requirement scope to SDK tool access and “Developers”. |
| requirements/SHR-UTILS-2.md | New top-level plugin-system requirement. |
| requirements/SWR-UTILS-2-1.md | New SWR for plugin discovery/loading. |
| requirements/SWR-UTILS-2-2.md | New SWR for plugin CLI command integration. |
| requirements/SWR-UTILS-2-3.md | New SWR for plugin GUI page integration. |
| .pre-commit-config.yaml | Excludes tests/resources/ from name-tests-test hook. |
Codecov Report✅ All modified and coverable lines are covered by tests. |
olivermeyer
reviewed
Mar 5, 2026
9bc02fe to
86fa744
Compare
olivermeyer
reviewed
Mar 5, 2026
olivermeyer
approved these changes
Mar 5, 2026
f704a09 to
51291f6
Compare
…n tests - Refine SHR-UTILS-1: remove plugin references, use Developers actor - Add SHR-UTILS-2 (Plugin System for SDK Extension) with SWR-UTILS-2-1/2/3 - Update SPEC-UTILS-SERVICE with new SWRs and FR-11/12/13 - Add TC-UTILS-PLUGIN-02/03 feature files linked to SWR-UTILS-2-2/3 - Add plugin integration tests for CLI and GUI plugin registration - Extend mcp_dummy_plugin with Typer CLI and BaseNavBuilder artifacts - Fix di_test.py: replace non-existent SPEC-UTILS-DI refs with SPEC-UTILS-SERVICE Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Non-test source files (e.g. dummy plugin modules) live under tests/resources/ and should not be required to follow the *_test.py naming convention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Escape dot in main\.py and group alternation for correctness and clarity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ftest Move the session-scoped install_dummy_plugin fixture from plugin_test.py and mcp_test.py into a shared tests/aignostics/utils/conftest.py so the package is only installed/uninstalled once per session regardless of how many test files use it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backslash must be doubled in YAML double-quoted strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix audit pipeline failures by upgrading vulnerable packages: - lxml-html-clean 0.4.3 → 0.4.4 (fixes CVE-2026-28348, CVE-2026-28350) - authlib 1.6.6 → 1.6.9 (fixes CVE-2026-28802) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update TC-UTILS-PLUGIN-02 feature to describe observable behavior without leaking prepare_cli() implementation detail - Document cache pairing requirement in install_dummy_plugin docstring - Use public aignostics.utils API for BaseNavBuilder, NavItem and gui_get_nav_groups imports instead of private _nav module Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n list Plugins can contribute MCP servers in addition to CLI commands and UI pages, which is already implemented via mcp_discover_servers(). skip:ci, skip:test:long-running, skip:test:matrix-runner, skip:test:very-long-running Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidate SHR-UTILS-1 and SHR-UTILS-2 under a single umbrella stakeholder requirement. SHR-UTILS-1 deleted, SWR-UTILS-1-1 renamed to SWR-UTILS-2-4 with parent updated to SHR-UTILS-2, and SPEC-UTILS-SERVICE itemFulfills updated accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove implementation details (CLI command names, namespace isolation, stdio transport) from the requirement body and align title and wording with the established SWR-UTILS-2-x pattern. [skip:ci, skip:test:long-running, skip:test:matrix-runner, skip:test:very-long-running]
Update FR-10 to match the simplified SWR-UTILS-2-4 wording, removing implementation details (CLI command names, namespace isolation) from the functional requirement to restore traceability consistency. [skip:ci, skip:test:long-running, skip:test:matrix-runner, skip:test:very-long-running]
Replace pip with uv in the install_dummy_plugin fixture so editable installs run without build isolation or network access, keeping the integration test suite fully offline as required. [skip:ci, skip:test:long-running, skip:test:matrix-runner, skip:test:very-long-running]
…havior Renames the requirement title and updates the body to use "navigation entries" instead of "GUI pages", matching the BaseNavBuilder / gui_get_nav_groups() implementation exercised by TC-UTILS-PLUGIN-03. [skip:test:long-running, skip:test:matrix-runner]
uv pip uninstall exits with code 2 when the package is not found, causing the fixture teardown to raise even though the test itself passed. Using check=False makes cleanup best-effort, matching the intent: if the package is already absent, the goal is achieved. [skip:test:long-running, skip:test:matrix-runner]
…1 to SWR-UTILS-2-4 Keeps traceability consistent after SWR-UTILS-1-1 was removed and its content moved to SWR-UTILS-2-4. [skip:test:long-running, skip:test:matrix-runner]
Detect uv via shutil.which and fall back to sys.executable -m pip so the integration tests remain runnable in non-uv environments. [skip:test:long-running, skip:test:matrix-runner]
…sent Ignore teardown failures only for the expected "not installed" case; re-raise on any other error to prevent silently leaving the editable install behind in reused nox virtualenvs. [skip:test:long-running, skip:test:matrix-runner]
…3 rename Updates the Gherkin feature title from "Plugin GUI Page Integration" to "Plugin GUI Navigation Integration" to match the updated requirement title. [skip:test:long-running, skip:test:matrix-runner]
Replace implementation-specific function calls (mcp_create_server(), client.list_tools(), gui_get_nav_groups()) with observable behavior descriptions to keep feature files implementation-agnostic. [skip:test:long-running, skip:test:matrix-runner]
uv pip uninstall exits with code 2 for editable installs whose dist-info was not created by uv, even when the package is present. pip handles these reliably regardless of how the package was installed. [skip:test:long-running]
83b84e6 to
1504e1d
Compare
|
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
SHR-UTILS-2("SDK Plugin System") as a new umbrella stakeholderrequirement covering all plugin extension capabilities, with four child SWRs:
SWR-UTILS-2-1(plugin module discovery and loading)SWR-UTILS-2-2(plugin CLI command integration)SWR-UTILS-2-3(plugin GUI page integration)SWR-UTILS-2-4(plugin MCP server integration, formerlySWR-UTILS-1-1)SHR-UTILS-1andSWR-UTILS-1-1(content absorbed into the above)SPEC-UTILS-SERVICEto fulfil the new SWRs and adds FR-10/11/12/13TC-UTILS-PLUGIN-02andTC-UTILS-PLUGIN-03extended
mcp_dummy_plugintest resource (new_cli.pyand_nav.py)record_propertyreferences indi_test.pypointing tonon-existent
SPEC-UTILS-DI— corrected toSPEC-UTILS-SERVICEtests/resources/from thename-tests-testpre-commit hook(non-test source files live there as plugin fixtures)
Test plan
di_test.pyandgui_test.pycover FR-11/12/13 and passtest_plugin_cli_registeredandtest_plugin_nav_builder_registeredpass