Skip to content

feat(OMN-12827): expose generated COMPUTE nodes as MCP tools (close-loop B2) - #1914

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-12827-mcp-expose-generated-compute
Jun 8, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-12827-mcp-expose-generated-compute

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Implements Plan B2 (docs/plans/2026-06-08-close-the-loop-plan.md, §Phase B) — MCP exposure of the generated COMPUTE node from the SEA self-extension loop.

ServiceMCPToolSync previously exposed an MCP tool only for events tagged mcp-enabled + node-type:orchestrator (_is_mcp_orchestrator), so generated COMPUTE nodes could never surface as MCP tools. This PR relaxes the rule via a renamed predicate _is_mcp_exposable(tags):

  • mcp-enabled + node-type:orchestrator → exposed (unchanged)
  • mcp-enabled + node-type:compute + generated → exposed (new)
  • mcp-enabled + node-type:compute WITHOUT generated → NOT exposed
  • missing mcp-enabled → NOT exposed (any type)

Generated compute nodes are NOT relabeled as orchestrators: tool description and metadata.node_kind distinguish 'generated compute node' from 'orchestrator', and only generated compute nodes surface (hand-authored compute nodes do not leak into the registry).

This is the infra-side classification change only (off the critical path per the plan). The live-runtime 'MCP tool appears' assertion is Phase D (D1/D2), not claimed here.

Changes

  • src/omnibase_infra/services/mcp/service_mcp_tool_sync.py — predicate relaxed; TAG_NODE_TYPE_COMPUTE + TAG_GENERATED constants; type-aware tool description + node_kind metadata.
  • tests/unit/services/mcp/test_service_mcp_tool_sync_exposure.py — new TDD unit tests (orchestrator + generated compute exposed; non-generated compute, non-mcp, empty excluded).
  • contracts/OMN-12827.yaml — evidence contract.

dod_evidence (OMN-12827)

  • TDD red→green observed (red: AttributeError: ... _is_mcp_exposable).
  • uv run pytest tests/unit/services/mcp/test_service_mcp_tool_sync_exposure.py -v → 6 passed.
  • uv run pytest tests/unit/services/mcp/ tests/integration/services/mcp/ -q → 132 passed, 25 skipped (kafka-gated).
  • uv run mypy src/omnibase_infra/services/mcp/service_mcp_tool_sync.py --strict → clean.
  • uv run ruff check src/ tests/ → All checks passed; pre-commit run --files <changed> → clean.
  • Full tests/unit/ → 20160 passed, 1 pre-existing unrelated failure (migration vendor-sync; reproduces on pristine main, caused by uncommitted sibling omnimarket migrations in the shared local clone; not touched by B2).

Paired OCC receipt: OmniNode-ai/onex_change_control#2352

Evidence-Source: OCC#2352
Evidence-Ticket: OMN-12827

…oop B2)

Relax ServiceMCPToolSync exposure rule so generated COMPUTE nodes
(mcp-enabled + node-type:compute + generated) surface as MCP tools
alongside orchestrators, without relabeling them as orchestrators.
Non-generated compute nodes and non-mcp nodes remain excluded.

Implements Plan B2 of docs/plans/2026-06-08-close-the-loop-plan.md.

Evidence-Source: 352dbc1e64c802fd3c942ec01fac0d6c719e4742
Evidence-Ticket: OMN-12827
@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 51 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0d9e9b9a-dbeb-4a56-b911-c2d9a2a6490f

📥 Commits

Reviewing files that changed from the base of the PR and between abf092d and 000087f.

📒 Files selected for processing (5)
  • contracts/OMN-12827.yaml
  • scripts/ci/detect_test_paths.py
  • src/omnibase_infra/services/mcp/service_mcp_tool_sync.py
  • tests/unit/scripts/ci/test_detect_test_paths.py
  • tests/unit/services/mcp/test_service_mcp_tool_sync_exposure.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-12827-mcp-expose-generated-compute

Comment @coderabbitai help to get the list of available commands and usage tips.

detect_test_paths emitted tests/unit/dlq/ (a reverse-dep of the services
zone) which has no test directory; pytest aborts collection with exit 5
('no tests ran') and blocks every services-zone PR. Filter selected paths
to directories that exist on disk; the empty-result fallback to tests/unit/
already covers the all-missing case.

Evidence-Source: OCC#2352
Evidence-Ticket: OMN-12827
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 8, 2026
Merged via the queue into dev with commit 43e7fa4 Jun 8, 2026
61 of 63 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-12827-mcp-expose-generated-compute branch June 8, 2026 21:08
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.

1 participant