Repository navigation
feat(OMN-12006): inject ContainerBackedDelegationDispatchPort at auto-wiring time - #1749
jonahgabriel wants to merge 3 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 2 minutes and 16 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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…ring time Replaces direct RuntimeDelegationDispatchPort injection with ContainerBackedDelegationDispatchPort, which lazy-resolves the in-process DirectBridgeDelegationDispatchPort from the DI container at first dispatch() call (after PluginDelegation.start_consumers() has registered it). Falls back to RuntimeDelegationDispatchPort when no container or bridge port is available.
- Extract _ProtocolDispatchPort to runtime/protocols/protocol_delegation_dispatch_port.py, renamed to ProtocolDelegationDispatchPort (PascalCase, no leading underscore) - Removes mixed models+protocols in service_delegation_dispatch_port.py (architecture gate) - Eliminates redundant # type: ignore[union-attr] — mypy is clean against typed Protocol - Add ProtocolDelegationDispatchPort to KNOWN_INFRA_PROTOCOLS allowlist ([RUNTIME] category) - Run ruff format on handler_wiring.py - Stamp schema fingerprint (69 migration files)
c63d745 to
324a104
Compare
Summary
ContainerBackedDelegationDispatchPorttoservice_delegation_dispatch_port.py— lazy-resolvesDirectBridgeDelegationDispatchPortfrom the DI container at firstdispatch()call; falls back toRuntimeDelegationDispatchPort(Pattern B broker) if the bridge port is not registeredhandler_wiring.pynow injectsContainerBackedDelegationDispatchPort(when container is available) instead ofRuntimeDelegationDispatchPortdirectly, soHandlerDelegateSkillgets the in-process bridge path without needing a Kafka consumer_ProtocolDispatchPortProtocol for type-safe resolution of either port implementationWhy lazy resolution
PluginDelegation.start_consumers()runs AFTERwire_from_manifest(auto-wiring). At handler wiring time the bridge is not yet in the container.ContainerBackedDelegationDispatchPortcaches the resolved port on first call, so by the timeHandlerDelegateSkill.handle()runs (always after all plugins have started),DirectBridgeDelegationDispatchPortis registered and will be used.Test plan
uv run mypy src/omnibase_infra/runtime/service_delegation_dispatch_port.py src/omnibase_infra/runtime/auto_wiring/handler_wiring.py --strict— no issuesuv run ruff check src/omnibase_infra/runtime/service_delegation_dispatch_port.py src/omnibase_infra/runtime/auto_wiring/handler_wiring.py— all checks passedtests/unit/runtime/— 4753 passed, 1 pre-existing flaky performance test (passes onmain)Related
DirectBridgeDelegationDispatchPortimplementation (companion PR, must merge first)Evidence-Source: OCC#1665
Evidence-Ticket: OMN-12006