Skip to content

Feat/4913 workflow mcp inventory - #5054

Merged
mnriem merged 3 commits into
github:mainfrom
n1shanthb:feat/4913-workflow-mcp-inventory
Oct 22, 2026
Merged

mnriem merged 3 commits into
github:mainfrom
n1shanthb:feat/4913-workflow-mcp-inventory

Conversation

@n1shanthb

Copy link
Copy Markdown
Contributor

Description

Adds a foundational workflow MCP inventory covering all 29 registered specify workflow CLI leaves, including nested command groups.

Each command is explicitly classified as unavailable, with a concrete disposition reason and source-audited capability and network-access metadata. No MCP adapters, server registration, or workflow behavior changes are introduced.

Parity tests inspect the actual registered Typer hierarchy and reject missing, stale, duplicate, and invalid inventory records. Additional tests protect execution metadata and verify that existing MCP discovery and the legacy command catalog remain unchanged.

Available records fail closed until operation-specific contract evidence exists. Separate synthetic tests cover MCP tool discovery cardinality and schema shape without claiming contract correspondence.

Refs #4913.

Testing

  • Windows: 156 focused inventory/artifact MCP tests passed, including all 48 workflow inventory tests.
  • Unprivileged Linux: 1,764 passed, 28 skipped across selected workflow, artifact MCP/shared-operation, MCP-server, and legacy workflow suites.
  • Repository-pinned Ruff 0.15.0 lint and formatting checks passed.
  • git diff --check passed.
  • Confirmed 29 registered CLI leaves match 29 inventory records, with no workflow MCP tools registered.
  • Adversarial checks rejected nonavailable contract versions and correctly named synthetic tools without real contract evidence.
  • Actual specify workflow --help output matched the clean baseline.

The full repository test suite was not run.

Repository template checklist:

  • Tested locally with uv run specify --help — equivalent workflow help comparison completed; exact command not run.
  • Ran existing tests with uv sync && uv run pytest — selected regression suites passed using existing environments; exact command not run.
  • Tested with a sample project (if applicable) — not performed; no runtime behavior changes.

AI Disclosure

  • I did not use AI assistance for this contribution.
  • I did use AI assistance.

AI disclosure: OpenAI Codex (GPT-6.1 sol, autonomous within contributor-authorized scope; reasoning-effort medium) performed source inspection, effect auditing, implementation, adversarial checks, test execution, and drafting of this PR description. An independent AI-assisted review identified test gaps that were subsequently addressed. This disclosure does not claim human line-by-line review.

Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
@n1shanthb

Copy link
Copy Markdown
Contributor Author

@mnriem Thanks for the guidance on keeping workflow MCP contributions small and focused!

Just to clarify the scope of #5054: this is a foundational inventory-only PR covering the 29 currently registered workflow CLI commands. The ~924 added lines are primarily explicit per-command metadata and parity/regression tests.

It introduces no MCP adapters or runtime behavior changes. The goal is to establish a single inventory and test baseline so future contributions can be smaller and easier to review.

I'll follow your suggested approach for the next PRs: one workflow command/adapter at a time, with its own typed contract and focused tests.

Happy to adjust the foundational scope if you'd prefer a different split.

@n1shanthb
n1shanthb marked this pull request as ready for review October 21, 2026 17:09
@n1shanthb
n1shanthb requested a review from mnriem as a code owner October 21, 2026 17:09
@mnriem
mnriem requested a max review from Copilot October 21, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The inventory introduces no runtime exposure, and the remaining feedback is non-blocking.

2 open issues
What changed in this PR

Adds hierarchy-owned MCP inventory for all 29 workflow CLI leaves without exposing new tools or changing workflow behavior.

Changes:

  • Records unavailable dispositions, reasons, capabilities, and network metadata.
  • Adds CLI parity checks, invalid-record tests, and discovery/effect coverage.
File Description
tests/​specify_cli/​workflows/​test_mcp.py Validates inventory parity, metadata, and unchanged workflow exposure.
src/​specify_cli/​workflows/​_mcp.py Defines inventory records for every workflow CLI leaf.

Review effort: Max

Comment thread src/specify_cli/workflows/_mcp.py Outdated
Comment thread src/specify_cli/workflows/_mcp.py Outdated
@mnriem mnriem added the triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review label Oct 21, 2026
Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
Signed-off-by: Nishanth <bnishanthtpm06@gmail.com>
@n1shanthb

Copy link
Copy Markdown
Contributor Author

Addressed both Copilot review comments and pushed the corrections.

  • Updated workflow remove metadata to accurately describe staged directory removal and recovery.
  • Updated workflow step remove metadata to reflect direct package deletion and attempted registry restoration.
  • No runtime behavior or MCP exposure changes.

Validation: 73 tests passed on Linux, with Ruff and diff checks passing.

@mnriem, the PR is ready for another look whenever convenient. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The metadata-only changes preserve tool exposure and workflow behavior, with only non-blocking consistency and test-maintenance suggestions remaining.

No open issues 🎉

2 resolved since last review

Review effort: Max

@mnriem
mnriem merged commit 8ab84fc into github:main Oct 22, 2026
16 checks passed
@mnriem

mnriem commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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

Labels

triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants