Skip to content

feat(OMN-10865): remove delegation nodes from omnibase_infra, import from omnimarket - #1569

Merged
jonahgabriel merged 18 commits into
mainfrom
jonah/omn-10865-remove-delegation-nodes
May 14, 2026
Merged

jonahgabriel merged 18 commits into
mainfrom
jonah/omn-10865-remove-delegation-nodes

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented May 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Removes delegation pipeline (node_delegation_orchestrator, node_delegation_quality_gate_reducer, node_delegation_routing_reducer), adapter_llm_caller_delegation, and bifrost delegation config from omnibase_infra — these now live in omnimarket (PR feat(OMN-10865): migrate delegation nodes from omnibase_infra to omnimarket omnimarket#607)
  • Updates service_kernel.py to import PluginDelegation from omnimarket
  • Updates plugin_llm.py to import LlmCallerDelegation and DelegationIntentBridge from omnimarket
  • Removes all delegation tests that tested the now-deleted infra code (coverage maintained in omnimarket)
  • Cleans up stale ProtocolLlmCaller allowlist entry and validation_exemptions.yaml entries for deleted model files

Why this unblocks runtime boot

omninode-runtime crashes at startup with ValueError: Duplicate local ingress route alias 'node_delegation_orchestrator' because contract.yaml exists in both omnibase_infra/nodes/ and the omnimarket package. Deleting the infra-side copy resolves the duplicate, which is the last known blocker before the runtime boots clean.

Rebase 2026-05-14

Rebased onto current main (was 10 commits behind, DIRTY). Conflict resolution: kept all delegation-module deletions; kept routing_tiers.yaml (preserved by 9987001) using main's evolved version (newer fast_path tokens); deleted 7 post-branch delegation tests (OMN-10941/10940/10949) that imported now-deleted infra modules; deleted node_delegation_routing_reducer/dispatchers/ (OMN-10868 added it on main; its port to omnimarket is the follow-up below); rewrote protocol_delegation_intent_bridge.py to source ProtocolLlmCaller from omnimarket; removed obsolete TestDelegationContractDeclaresPluginManaged (the contract it asserts on lives in omnimarket now).

Other duplicate nodes (separate follow-up)

This PR resolves the delegation duplicate. Five other nodes still have contract.yaml in both repos and will surface the same boot error after delegation lands:

  • node_baseline_capture
  • node_intent_storage_effect
  • node_projection_cost_by_repo
  • node_projection_cost_summary
  • node_projection_cost_token_usage

Each needs an ownership decision and its own PR — out of scope here.

Merge order

omnimarket PR #607 is merged (merge commit a73edb04). pyproject.toml pins omnimarket to branch = "main". omnibase_infra #1574 (OMN-10864) is also merged.

Follow-up: OMN-10868's delegation-routing-dispatcher (DispatcherDelegationRoutingRequest + wire_delegation_routing_dispatcher) is removed from infra by this PR but not yet present in omnimarket — needs a port ticket so the routing dispatcher returns to the runtime.

OMN-10865

Evidence-Ticket: OMN-10865
Evidence-Source: dc4aacef

dod_evidence:

  • type: pr_created
    repo: omnibase_infra
    pr: omnibase_infra/pulls/1569
  • type: tests_passing
    description: pre-commit hooks pass on rebased branch; targeted unit tests pass (runtime/auto_wiring + plugin_llm imports + wire_from_manifest import); remaining failures are pre-existing on main (HttpPortValidation, postgres-dependent)

@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR removes the delegation pipeline from omnibase_infra: three ONEX nodes (orchestrator, quality-gate reducer, routing reducer), their handlers, models, contracts, bifrost delegation config and loader, an LLM delegation adapter, many tests, validation exemptions and allowlist entries, and ONEX entry-points; remaining delegation wiring/imports are switched to omnimarket where referenced.

Changes

Delegation infrastructure and contracts removal

Layer / File(s) Summary
Orchestrator node, handlers, FSM and models
src/omnibase_infra/nodes/node_delegation_orchestrator/..., pyproject.toml
Entire node_delegation_orchestrator removed: contract.yaml, FSM/enums, handler_delegation_workflow.py, handler_compliance_loop.py, delegation_intent_bridge.py, dispatch_resolver.py, dispatchers, lifecycle reactor, and all Pydantic models and re-exports. ONEX entry-point removed from pyproject.toml.
Routing & quality-gate reducer nodes
src/omnibase_infra/nodes/node_delegation_routing_reducer/..., src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/..., pyproject.toml
Entire node_delegation_routing_reducer and node_delegation_quality_gate_reducer removed: contracts, handlers (handler_delegation_routing.py, handler_quality_gate.py), dispatchers, models (ModelRoutingDecision, ModelDelegationConfig, ModelQualityGateInput/Result, etc.), and entry-points removed.
Bifrost delegation config & models
src/omnibase_infra/nodes/node_llm_inference_effect/handlers/bifrost/*, src/omnibase_infra/configs/bifrost_delegation.yaml
Removed bifrost delegation YAML, config loader and Pydantic models used to validate delegation routing config and shadow mode.
LLM delegation adapter
src/omnibase_infra/adapters/llm/adapter_llm_caller_delegation.py, src/omnibase_infra/adapters/llm/plugin_llm.py
Removed LlmCallerDelegation module; plugin_llm.py updated to import delegation bridge/caller from omnimarket module paths instead of omnibase_infra.
Plugin wiring import migration
src/omnibase_infra/runtime/service_kernel.py
PluginDelegation registration changed to a lazy import from omnimarket.nodes.node_delegation_orchestrator.plugin inside the bootstrap try-block; duplicate import removed.
Validation, allowlists and exemptions
arch-handler-contract-compliance-allowlist.yaml, src/omnibase_infra/validation/infra_validators.py, src/omnibase_infra/validation/validation_exemptions.yaml, tests/ci/test_handler_architecture_invariants.py
Removed delegation allowlist entries; replaced Bifrost delegation exemptions with bifrost backend config exemption; cleared certain wiring exemptions; updated INFRA_MAX_UNIONS from 154→152; adjusted runtime utility exclusions.
Tests removed or updated
tests/integration/delegation/*, tests/unit/delegation/*, tests/unit/nodes/node_delegation_*/**, tests/unit/nodes/node_llm_inference_effect/handlers/bifrost/*
Mass deletion of delegation integration and unit tests for orchestrator, routing reducer, quality gate, bifrost loader, LLM caller unit tests, and many supporting fixtures. Some unrelated tests updated to import PluginDelegation from omnimarket and to add connectivity checks (Postgres/Kafka reachability).
Runtime auto-wiring and plugin tests
tests/unit/runtime/auto_wiring/*, tests/unit/runtime/test_event_bus_subscriber_container_resolution.py
Updated tests to assert plugin-managed subscription semantics; changed PluginDelegation imports to omnimarket in subscriber resolution tests.
Docs
docs/diagnosis-omn10865-delegation-removal-incomplete-migration.md
Added diagnostic document describing the incomplete migration, CI failures, root-cause hypotheses and staged remediation plan.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Poem

🐰 I hopped through code, a nimble spree,
Cleared delegation fields from the tree.
Contracts, nodes, and tests set free—
Off to omnimarket they flee. 🥕

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-10865-remove-delegation-nodes

jonahgabriel added a commit that referenced this pull request May 13, 2026
…list/exemption entries

- pyproject.toml: omnimarket source branch jonah/omn-10865-add-delegation-nodes -> main (PR #607 merged)
- arch-handler-contract-compliance-allowlist.yaml: remove 6 entries pointing at deleted
  delegation handler/config files (config_loader_bifrost_delegation.py,
  model_bifrost_delegation_config.py, handler_delegation_workflow.py,
  handler_compliance_loop.py, handler_quality_gate.py, handler_delegation_routing.py)
- tests/ci/test_handler_architecture_invariants.py: drop 3 deleted basenames from
  _RUNTIME_UTILITY_EXCLUSIONS and empty _INV4_WIRING_EXEMPTIONS (contracts deleted)

Fixes CI Tests Gate failures (test_all_exclusions_map_to_existing_files,
test_exemptions_reference_real_contracts_and_handlers) and Build Runtime Image
(ModuleNotFoundError: omnimarket.nodes.node_delegation_orchestrator) on PR #1569.
@jonahgabriel
jonahgabriel enabled auto-merge (squash) May 13, 2026 01:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/omnibase_infra/runtime/service_kernel.py`:
- Around line 70-72: Remove the top-level import of PluginDelegation and instead
import it inside the existing guarded plugin-registration try/except block so a
missing omnimarket dependency raises a caught exception instead of crashing at
module import; specifically, delete the from omnimarket... PluginDelegation
import at module scope and add a local import of PluginDelegation inside the try
block that registers the plugin (where PluginDelegation is
instantiated/registered), and on failure (ModuleNotFoundError or Exception) log
a warning and skip registration as the surrounding block intends.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: efc3d6cb-2f04-415c-94df-fc17f1731125

📥 Commits

Reviewing files that changed from the base of the PR and between d172a71 and 50457e5.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (112)
  • arch-handler-contract-compliance-allowlist.yaml
  • src/omnibase_infra/adapters/llm/adapter_llm_caller_delegation.py
  • src/omnibase_infra/adapters/llm/plugin_llm.py
  • src/omnibase_infra/configs/bifrost_delegation.yaml
  • src/omnibase_infra/configs/routing_tiers.yaml
  • src/omnibase_infra/configs/task_class_contracts.v1.yaml
  • src/omnibase_infra/nodes/node_delegation_orchestrator/__init__.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contract.yaml
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contract_topics.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contracts/delegation_request_v1.yaml
  • src/omnibase_infra/nodes/node_delegation_orchestrator/delegation_intent_bridge.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatch_resolver.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/__init__.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_agent_task_lifecycle.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_delegation_request.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_invocation_command.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_quality_gate_result.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_routing_decision.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/enums.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/__init__.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/handler_compliance_loop.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/handler_delegation_workflow.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/lifecycle_reactor.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/__init__.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_baseline_intent.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_compliance_loop_result.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_event.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_request.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_result.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_inference_intent.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_inference_response_data.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_quality_gate_intent.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_routing_intent.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_task_delegated_event.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/node.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/plugin.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/wiring.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/__init__.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/contract.yaml
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/handlers/__init__.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/__init__.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_input.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_result.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/node.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/__init__.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/contract.yaml
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/dispatchers/__init__.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/dispatchers/dispatcher_delegation_routing_request.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/handlers/__init__.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/handlers/handler_delegation_routing.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/__init__.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_delegation_config.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_routing_decision.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_routing_tier.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_tier_model.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/node.py
  • src/omnibase_infra/nodes/node_llm_inference_effect/handlers/bifrost/config_loader_bifrost_delegation.py
  • src/omnibase_infra/nodes/node_llm_inference_effect/handlers/bifrost/model_bifrost_delegation_config.py
  • src/omnibase_infra/runtime/service_kernel.py
  • src/omnibase_infra/validation/infra_validators.py
  • src/omnibase_infra/validation/validation_exemptions.yaml
  • tests/ci/test_handler_architecture_invariants.py
  • tests/integration/delegation/test_a2a_bridge_wiring.py
  • tests/integration/delegation/test_bifrost_contract_loading.py
  • tests/integration/delegation/test_compliance_fields_wire_compat.py
  • tests/integration/delegation/test_compliance_loop_e2e.py
  • tests/integration/delegation/test_compliance_loop_wiring_integration.py
  • tests/integration/delegation/test_delegation_routing_dispatcher_wiring.py
  • tests/integration/delegation/test_effect_runtime_boot.py
  • tests/integration/delegation/test_handler_compliance_loop_integration.py
  • tests/integration/delegation/test_quality_gate_contract_loading.py
  • tests/integration/delegation/test_routing_reducer_contract_loading.py
  • tests/integration/nodes/test_delegation_pipeline_e2e.py
  • tests/unit/contracts/test_protocol_ownership.py
  • tests/unit/delegation/__init__.py
  • tests/unit/delegation/test_delegation_chain_e2e.py
  • tests/unit/delegation/test_delegation_contracts.py
  • tests/unit/delegation/test_delegation_orchestrator.py
  • tests/unit/delegation/test_delegation_wiring.py
  • tests/unit/delegation/test_llm_caller_delegation.py
  • tests/unit/nodes/node_delegation_orchestrator/__init__.py
  • tests/unit/nodes/node_delegation_orchestrator/handlers/__init__.py
  • tests/unit/nodes/node_delegation_orchestrator/handlers/test_handler_compliance_loop.py
  • tests/unit/nodes/node_delegation_orchestrator/models/__init__.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_compliance_fields.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_model_delegation_request.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_model_delegation_result.py
  • tests/unit/nodes/node_delegation_orchestrator/test_agent_lifecycle_path.py
  • tests/unit/nodes/node_delegation_orchestrator/test_compliance_loop_wiring.py
  • tests/unit/nodes/node_delegation_orchestrator/test_dispatch_resolver.py
  • tests/unit/nodes/node_delegation_orchestrator/test_dispatcher_malformed_envelopes.py
  • tests/unit/nodes/node_delegation_orchestrator/test_lifecycle_reactor.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/__init__.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/handlers/__init__.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/handlers/test_handler_quality_gate.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/models/__init__.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/models/test_quality_gate_models.py
  • tests/unit/nodes/node_delegation_routing_reducer/__init__.py
  • tests/unit/nodes/node_delegation_routing_reducer/dispatchers/__init__.py
  • tests/unit/nodes/node_delegation_routing_reducer/dispatchers/test_dispatcher_delegation_routing_request.py
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/__init__.py
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/test_handler_delegation_routing.py
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/test_handler_delegation_routing_contract.py
  • tests/unit/nodes/node_delegation_routing_reducer/models/__init__.py
  • tests/unit/nodes/node_delegation_routing_reducer/models/test_model_routing_decision.py
  • tests/unit/nodes/node_delegation_routing_reducer/test_invocation_command_emission.py
  • tests/unit/nodes/node_llm_inference_effect/handlers/bifrost/test_bifrost_delegation_config.py
  • tests/unit/nodes/node_llm_inference_effect/handlers/bifrost/test_bifrost_delegation_shadow.py
  • tests/unit/runtime/auto_wiring/test_plugin_managed_subscription.py
  • tests/unit/runtime/test_event_bus_subscriber_container_resolution.py
  • tests/unit/validation/test_validator_defaults.py
💤 Files with no reviewable changes (106)
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/init.py
  • src/omnibase_infra/configs/routing_tiers.yaml
  • tests/unit/nodes/node_delegation_orchestrator/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_event.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_tier_model.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/enums.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contract_topics.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_inference_response_data.py
  • tests/unit/nodes/node_delegation_orchestrator/models/init.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_result.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/node.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_delegation_request.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/node.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/node.py
  • tests/unit/nodes/node_delegation_routing_reducer/dispatchers/init.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contract.yaml
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/handler_compliance_loop.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_routing_intent.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_result.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/handlers/init.py
  • tests/unit/nodes/node_delegation_orchestrator/handlers/init.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/handlers/init.py
  • tests/integration/delegation/test_handler_compliance_loop_integration.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatch_resolver.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/contract.yaml
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/wiring.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_task_delegated_event.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_quality_gate_intent.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/handlers/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_routing_decision.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/models/init.py
  • src/omnibase_infra/nodes/node_llm_inference_effect/handlers/bifrost/config_loader_bifrost_delegation.py
  • src/omnibase_infra/configs/task_class_contracts.v1.yaml
  • src/omnibase_infra/configs/bifrost_delegation.yaml
  • tests/unit/delegation/test_delegation_contracts.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_agent_task_lifecycle.py
  • tests/unit/nodes/node_delegation_orchestrator/test_lifecycle_reactor.py
  • tests/unit/nodes/node_delegation_routing_reducer/test_invocation_command_emission.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/contract.yaml
  • tests/unit/nodes/node_delegation_orchestrator/test_dispatch_resolver.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_routing_decision.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_inference_intent.py
  • tests/unit/delegation/test_delegation_chain_e2e.py
  • tests/unit/nodes/node_delegation_orchestrator/test_dispatcher_malformed_envelopes.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/handlers/handler_delegation_routing.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_routing_tier.py
  • tests/integration/delegation/test_routing_reducer_contract_loading.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_delegation_request.py
  • tests/integration/delegation/test_a2a_bridge_wiring.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/dispatchers/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/init.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/handlers/test_handler_quality_gate.py
  • tests/unit/nodes/node_delegation_routing_reducer/dispatchers/test_dispatcher_delegation_routing_request.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/models/model_delegation_config.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/dispatchers/dispatcher_delegation_routing_request.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_compliance_loop_result.py
  • tests/unit/delegation/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/model_baseline_intent.py
  • tests/unit/contracts/test_protocol_ownership.py
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/test_handler_delegation_routing.py
  • tests/integration/delegation/test_effect_runtime_boot.py
  • tests/unit/delegation/test_delegation_wiring.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/init.py
  • tests/integration/delegation/test_compliance_loop_wiring_integration.py
  • tests/unit/nodes/node_delegation_routing_reducer/models/init.py
  • tests/integration/delegation/test_quality_gate_contract_loading.py
  • tests/unit/nodes/node_delegation_routing_reducer/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/delegation_intent_bridge.py
  • tests/integration/delegation/test_compliance_loop_e2e.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/plugin.py
  • tests/unit/nodes/node_delegation_orchestrator/test_agent_lifecycle_path.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/models/init.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_model_delegation_request.py
  • src/omnibase_infra/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_input.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_model_delegation_result.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/contracts/delegation_request_v1.yaml
  • tests/unit/nodes/node_delegation_orchestrator/test_compliance_loop_wiring.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/init.py
  • src/omnibase_infra/nodes/node_delegation_routing_reducer/init.py
  • tests/unit/nodes/node_delegation_orchestrator/handlers/test_handler_compliance_loop.py
  • tests/integration/delegation/test_compliance_fields_wire_compat.py
  • tests/integration/delegation/test_delegation_routing_dispatcher_wiring.py
  • tests/unit/nodes/node_delegation_routing_reducer/models/test_model_routing_decision.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/handlers/handler_delegation_workflow.py
  • src/omnibase_infra/adapters/llm/adapter_llm_caller_delegation.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/init.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_invocation_command.py
  • tests/integration/delegation/test_bifrost_contract_loading.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/lifecycle_reactor.py
  • tests/unit/nodes/node_llm_inference_effect/handlers/bifrost/test_bifrost_delegation_config.py
  • tests/unit/delegation/test_delegation_orchestrator.py
  • tests/unit/nodes/node_delegation_orchestrator/models/test_compliance_fields.py
  • tests/unit/nodes/node_delegation_quality_gate_reducer/models/test_quality_gate_models.py
  • tests/unit/delegation/test_llm_caller_delegation.py
  • tests/integration/nodes/test_delegation_pipeline_e2e.py
  • arch-handler-contract-compliance-allowlist.yaml
  • tests/unit/nodes/node_llm_inference_effect/handlers/bifrost/test_bifrost_delegation_shadow.py
  • tests/unit/nodes/node_delegation_routing_reducer/handlers/test_handler_delegation_routing_contract.py
  • src/omnibase_infra/nodes/node_llm_inference_effect/handlers/bifrost/model_bifrost_delegation_config.py
  • src/omnibase_infra/nodes/node_delegation_orchestrator/dispatchers/dispatcher_quality_gate_result.py
  • src/omnibase_infra/validation/validation_exemptions.yaml
  • tests/unit/runtime/auto_wiring/test_plugin_managed_subscription.py

Comment thread src/omnibase_infra/runtime/service_kernel.py Outdated
jonahgabriel added a commit that referenced this pull request May 13, 2026
…lock

Addresses CodeRabbit review on PR #1569: the top-level
`from omnimarket.nodes.node_delegation_orchestrator.plugin import PluginDelegation`
in service_kernel.py executes at module load — before the guarded try/except in
bootstrap() — so a missing/unavailable omnimarket dependency would crash kernel
startup instead of degrading gracefully. It also created a module-load circular
import (plugin_llm -> ... -> runtime/__init__ -> service_kernel -> omnimarket
plugin -> omnibase_infra.runtime.*). Moving the import inside the registration
try block fixes both.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/diagnosis-omn10865-delegation-removal-incomplete-migration.md (1)

68-69: ⚡ Quick win

Replace internal “memory” reference with a traceable source.

Per memory reference_occ_receipt_binding is not verifiable for future readers. Point this to an explicit policy/doc/issue link (or summarize the binding rule directly in-doc) so the diagnosis is self-contained and auditable.

Suggested edit
-Per memory `reference_occ_receipt_binding`, this requires a new OCC PR (consumer receipt referencing `#1569` +
+self-binding receipt + contract update), OR re-running OCC `#965`'s receipt generation against `#1569`'s HEAD.
+Per OCC receipt-binding requirements (link the canonical policy/ADR here), this requires a new OCC PR
+(consumer receipt referencing `#1569` + self-binding receipt + contract update), OR re-running OCC `#965`'s
+receipt generation against `#1569`'s HEAD.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/diagnosis-omn10865-delegation-removal-incomplete-migration.md` around
lines 68 - 69, The phrase "Per memory reference_occ_receipt_binding" is
non-actionable and untraceable; replace it with a verifiable source by either
linking to the authoritative policy/issue that defines
reference_occ_receipt_binding or by summarizing the binding rule inline. Update
the sentence mentioning reference_occ_receipt_binding, OCC PR, `#1569` and `#965` to
include a URL or explicit excerpt of the binding rule (or an in-doc summary) so
readers can audit the requirement for a new OCC PR (consumer receipt referencing
`#1569` + self-binding receipt + contract update) or the alternative of re-running
OCC `#965`'s receipt generation against `#1569`'s HEAD.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/diagnosis-omn10865-delegation-removal-incomplete-migration.md`:
- Around line 68-69: The phrase "Per memory reference_occ_receipt_binding" is
non-actionable and untraceable; replace it with a verifiable source by either
linking to the authoritative policy/issue that defines
reference_occ_receipt_binding or by summarizing the binding rule inline. Update
the sentence mentioning reference_occ_receipt_binding, OCC PR, `#1569` and `#965` to
include a URL or explicit excerpt of the binding rule (or an in-doc summary) so
readers can audit the requirement for a new OCC PR (consumer receipt referencing
`#1569` + self-binding receipt + contract update) or the alternative of re-running
OCC `#965`'s receipt generation against `#1569`'s HEAD.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a379b2d-5a69-4fbc-996c-31493fe4b952

📥 Commits

Reviewing files that changed from the base of the PR and between fb25443 and 9ce6497.

📒 Files selected for processing (1)
  • docs/diagnosis-omn10865-delegation-removal-incomplete-migration.md

jonahgabriel and others added 13 commits May 14, 2026 06:47
…from omnimarket

Delegation pipeline (node_delegation_orchestrator, node_delegation_quality_gate_reducer,
node_delegation_routing_reducer), adapter_llm_caller_delegation, and bifrost delegation
config have moved to omnimarket (PR #607). This PR removes the infra copies and wires
service_kernel.py + plugin_llm.py to import PluginDelegation, LlmCallerDelegation, and
DelegationIntentBridge from omnimarket.

- Delete all delegation node source files and tests from omnibase_infra
- Update service_kernel.py PluginDelegation import to omnimarket
- Update plugin_llm.py LlmCallerDelegation + DelegationIntentBridge imports to omnimarket
- Update test_event_bus_subscriber_container_resolution.py PluginDelegation import
- Remove stale ProtocolLlmCaller entry from test_protocol_ownership.py
- Remove stale validation_exemptions.yaml entries for deleted delegation model files
- Pin omnimarket source to feature branch (update to main after PR #607 merges)
…list/exemption entries

- pyproject.toml: omnimarket source branch jonah/omn-10865-add-delegation-nodes -> main (PR #607 merged)
- arch-handler-contract-compliance-allowlist.yaml: remove 6 entries pointing at deleted
  delegation handler/config files (config_loader_bifrost_delegation.py,
  model_bifrost_delegation_config.py, handler_delegation_workflow.py,
  handler_compliance_loop.py, handler_quality_gate.py, handler_delegation_routing.py)
- tests/ci/test_handler_architecture_invariants.py: drop 3 deleted basenames from
  _RUNTIME_UTILITY_EXCLUSIONS and empty _INV4_WIRING_EXEMPTIONS (contracts deleted)

Fixes CI Tests Gate failures (test_all_exclusions_map_to_existing_files,
test_exemptions_reference_real_contracts_and_handlers) and Build Runtime Image
(ModuleNotFoundError: omnimarket.nodes.node_delegation_orchestrator) on PR #1569.
…lock

Addresses CodeRabbit review on PR #1569: the top-level
`from omnimarket.nodes.node_delegation_orchestrator.plugin import PluginDelegation`
in service_kernel.py executes at module load — before the guarded try/except in
bootstrap() — so a missing/unavailable omnimarket dependency would crash kernel
startup instead of degrading gracefully. It also created a module-load circular
import (plugin_llm -> ... -> runtime/__init__ -> service_kernel -> omnimarket
plugin -> omnibase_infra.runtime.*). Moving the import inside the registration
try block fixes both.
…n main

Rebase onto current main brought back files that were added post-branch
and reference now-deleted delegation modules:

- node_delegation_routing_reducer/dispatchers/ (OMN-10868 added it; depends
  on deleted node_delegation_orchestrator.models.model_delegation_request).
  Port to omnimarket is an explicit follow-up per #1569's PR body.
- protocol_delegation_intent_bridge.py: rewrite import to source
  ProtocolLlmCaller from omnimarket where the impl now lives.
- 7 delegation tests that import deleted infra modules (OMN-10941, OMN-10940,
  OMN-10949) — equivalent coverage lives in omnimarket.

Evidence-Ticket: OMN-10865
Evidence-Source: dc4aacef
…Managed

The class asserted that src/omnibase_infra/nodes/node_delegation_orchestrator/contract.yaml
declares plugin_managed=true. That contract now lives in omnimarket, so the test asserts
against a path that no longer exists in infra. Equivalent coverage belongs in omnimarket.

Evidence-Ticket: OMN-10865
Evidence-Source: dc4aacef
@jonahgabriel
jonahgabriel force-pushed the jonah/omn-10865-remove-delegation-nodes branch from 4f71c02 to 3d082bc Compare May 14, 2026 11:06
…ation

The PR previously deleted tests/integration/test_delegation_event_chain.py
which counted as 1 unmatched deletion in the Integration Test Removal Gate.
The deleted test exercised the infra-side delegation chain which now lives
in omnimarket.

Adds tests/integration/test_delegation_consolidation.py with 4 assertions:
1. omnimarket.nodes.node_delegation_orchestrator.plugin.PluginDelegation
   resolves (consumed by service_kernel bootstrap).
2. omnimarket DelegationIntentBridge / LlmCallerDelegation / ProtocolLlmCaller
   resolve (consumed by plugin_llm DI registration).
3. infra-side protocol_delegation_intent_bridge.py sources ProtocolLlmCaller
   from omnimarket — not a stale infra import.
4. No delegation contract.yaml exists in infra (the duplicate-ingress crash
   the runtime hit before this PR).

This restores deletion/addition parity for the gate and exercises the
exact consolidated wiring that prevented runtime boot.

Evidence-Ticket: OMN-10865
Evidence-Source: dc4aacef
auto-merge was automatically disabled May 14, 2026 13:42

Pull request was closed

@jonahgabriel jonahgabriel reopened this May 14, 2026
@jonahgabriel
jonahgabriel enabled auto-merge (squash) May 14, 2026 13:42
jonahgabriel added a commit that referenced this pull request May 14, 2026
…storage + cost projections) (#1591)

* feat(OMN-10865): remove duplicate node contracts that crash runtime boot

After delegation removal (#1569) lands, omninode-runtime still crashes
at boot with `ValueError: Duplicate local ingress route alias '<name>'`
on 4 additional node contracts that exist in both omnibase_infra and
omnimarket with identical `name:` fields.

Per omninode-runtime canonical wiring, omnimarket is the authoritative
home for these projection/effect nodes. Deletes the infra-side copies:

- node_intent_storage_effect
- node_projection_cost_by_repo
- node_projection_cost_summary
- node_projection_cost_token_usage
- nodes/cost_projection_models/ (only used by the 3 deleted projections)

Plus orphaned tests:
- tests/integration/nodes/test_node_projection_cost_snapshots.py
- tests/unit/nodes/node_intent_storage_effect/ (registry tests)

Adds tests/integration/test_no_duplicate_node_contracts.py as a
regression: scans every infra contract.yaml against omnimarket's and
fails if any `name:` collides — prevents future re-introduction of the
boot-crash pattern.

## KNOWN IMPACT — cost_api dashboard endpoints

The deleted infra projection handlers were the only writers to
`omnibase_infra.services.cost_api.snapshot_cache`, which backs the cost
API endpoints mounted in `services/registry_api/main.py`. The omnimarket
counterpart handlers (REDUCER_GENERIC) do NOT populate this cache. After
this PR:

- cost_api endpoints will respond HTTP 200 with stale (frozen) data, or
  empty data on a fresh process, until either:
  (a) the omnimarket handlers gain `store_latest_snapshot` calls (would
      require omnimarket→omnibase_infra import, a layering inversion), or
  (b) cost_api migrates to read snapshots from the omnimarket publish
      pipeline directly (correct long-term fix), or
  (c) cost_api is retired in favor of an omnimarket-side query path.

The snapshot_cache module itself is left in place so `cost_api/handlers.py`
and `tests/integration/api/test_cost_api_routes.py` continue to import
cleanly. test_cost_api_routes.py still passes (verified locally, 11/11).

This trade-off is the explicit authorization given to unblock runtime
boot — clean boot now is worth temporarily stale cost dashboards.

## node_baseline_capture (NOT in this PR)

Verified NOT a duplicate: `name:` and `node_type:` both differ between
infra (`node_baseline_capture`/`EFFECT_GENERIC`) and omnimarket
(`baseline_capture`/`compute`). Left untouched.

Evidence-Ticket: OMN-10865
Evidence-Source: dc4aacef

* chore(OMN-10865): refresh PR body cache — OMN-10957 follow-up linkage

* chore(OMN-10865): regenerate topic enums after duplicate node removal

Removing node_intent_storage_effect, node_projection_cost_by_repo,
node_projection_cost_summary, and node_projection_cost_token_usage
left their topic enum entries stale. Regenerated via
generate_topic_enums.py --generate to pass Topic Enum Drift CI check.

---------

Co-authored-by: jonahgabriel <jonahgabriel@users.noreply.github.com>
…rop stale parity test

Split 4 failure: test_topic_constants_contract_parity.py asserts every
TOPIC_DELEGATION_* constant appears in node_delegation_orchestrator/contract.yaml,
which this PR removed. The test was staged for deletion but never committed.
Commit the deletion — parity now lives in omnimarket.

Split 2 failure: HandlerOutputSchemaRegistry (omnimarket) imported
ModelDelegationResult from omnibase_infra.nodes.node_delegation_orchestrator.models
at the pinned omnimarket commit (a73edb04). Bump the lock to 1cdba823 which
uses omnimarket.events.delegation instead — no omnibase_infra cross-module
import.
@sonarqubecloud

Copy link
Copy Markdown

@jonahgabriel
jonahgabriel merged commit 54bb15a into main May 14, 2026
68 of 71 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-10865-remove-delegation-nodes branch May 14, 2026 14:37
jonahgabriel added a commit that referenced this pull request May 14, 2026
…10865)

Main deleted all delegation nodes in #1569. Merge conflicts are all
modify/delete pairs — accept the deletions everywhere, keep only the
service_dispatch_result_applier.py changes that belong to this PR.
jonahgabriel added a commit that referenced this pull request May 14, 2026
…ation

The dispatcher_inference_response.py was added by this branch but depends
on node_delegation_orchestrator/models/ and /handlers/ which were deleted
when #1569 merged the delegation nodes to omnimarket. The dispatcher is
unused (nothing imports it) and belongs in omnimarket with the rest of
the delegation nodes. Removed along with empty parent directories.
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