Skip to content

feat(utils): split MCP and plugin requirements, add plugin integration tests#458

Open
omid-aignostics wants to merge 22 commits intomainfrom
feat/split-utils-requirements
Open

feat(utils): split MCP and plugin requirements, add plugin integration tests#458
omid-aignostics wants to merge 22 commits intomainfrom
feat/split-utils-requirements

Conversation

@omid-aignostics
Copy link
Collaborator

@omid-aignostics omid-aignostics commented Mar 4, 2026

Summary

  • Introduces SHR-UTILS-2 ("SDK Plugin System") as a new umbrella stakeholder
    requirement 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, formerly SWR-UTILS-1-1)
  • Removes SHR-UTILS-1 and SWR-UTILS-1-1 (content absorbed into the above)
  • Updates SPEC-UTILS-SERVICE to fulfil the new SWRs and adds FR-10/11/12/13
  • Adds feature test cases TC-UTILS-PLUGIN-02 and TC-UTILS-PLUGIN-03
  • Adds integration tests for plugin CLI and GUI registration backed by an
    extended mcp_dummy_plugin test resource (new _cli.py and _nav.py)
  • Fixes 13 record_property references in di_test.py pointing to
    non-existent SPEC-UTILS-DI — corrected to SPEC-UTILS-SERVICE
  • Excludes tests/resources/ from the name-tests-test pre-commit hook
    (non-test source files live there as plugin fixtures)

Test plan

  • Unit tests in di_test.py and gui_test.py cover FR-11/12/13 and pass
  • New integration tests test_plugin_cli_registered and
    test_plugin_nav_builder_registered pass
  • Pre-commit hooks pass on push

Copilot AI review requested due to automatic review settings March 4, 2026 16:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 updated SPEC-UTILS-SERVICE to include FR-11/12/13.
  • Extended the mcp_dummy_plugin test 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_property IDs in di_test.py; updated pre-commit exclusions for tests/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
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.
see 3 files with indirect coverage changes

Copilot AI review requested due to automatic review settings March 5, 2026 08:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings March 5, 2026 09:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.

@omid-aignostics omid-aignostics force-pushed the feat/split-utils-requirements branch 2 times, most recently from 9bc02fe to 86fa744 Compare March 5, 2026 11:00
Copilot AI review requested due to automatic review settings March 5, 2026 11:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings March 5, 2026 12:32
@omid-aignostics omid-aignostics force-pushed the feat/split-utils-requirements branch from f704a09 to 51291f6 Compare March 5, 2026 12:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings March 5, 2026 13:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated no new comments.

omid-aignostics and others added 4 commits March 5, 2026 15:38
…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>
omid-aignostics and others added 18 commits March 5, 2026 15:38
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]
@omid-aignostics omid-aignostics force-pushed the feat/split-utils-requirements branch from 83b84e6 to 1504e1d Compare March 5, 2026 14:39
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants