Repository navigation
test(registration): tighten warning assertion in test_unexpected_error_logged_as_warning (OMN-3574) - #607
Conversation
…r_logged_as_warning (OMN-3574) Replace bare `assert warning_msgs` with keyword-specific assertions that verify the WARNING log actually references schema initialization. Without this, deleting the `else: logger.warning(...)` branch in _initialize_schema would not cause the test to fail if any spurious WARNING fires. Also tightens the same under-constrained pattern in test_advisory_lock_failure_logged_as_warning.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTest validation tightening in plugin schema initialization tests. Warning assertions now require logged messages to explicitly contain "schema" or "initialize" rather than accepting any warning, ensuring validation specificity across two test cases. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
…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.
…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.
…from omnimarket (#1569) * feat(OMN-10865): remove delegation nodes from omnibase_infra, import 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) * fix(OMN-10865): repin omnimarket to main, drop stale delegation allowlist/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. * fix(OMN-10865): lazy-import PluginDelegation in kernel registration block 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. * chore(OMN-10865): re-trigger CI after PR body update (Evidence-Source: OCC#965) * chore(OMN-10865): re-trigger receipt/deploy gates with refreshed PR body * docs(OMN-10865): two-strike diagnosis — delegation removal blocked by incomplete migration * fix(runtime): align pattern b omnimarket test * test(integration): skip unreachable external services * ci(OMN-10865): extend uv timeout for sibling boundary jobs * ci(OMN-10865): extend kafka boundary job timeout * ci(OMN-10865): extend checkout budget for infra gates * fix(OMN-10865): post-rebase cleanup of stray delegation files added on 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 * test(OMN-10865): remove obsolete TestDelegationContractDeclaresPluginManaged 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 * chore(OMN-10865): refresh PR body cache (add skip-test-removal-gate token + rebase note) * test(OMN-10865): replacement integration test for delegation consolidation 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 * chore: retrigger CI after runner recovery * fix(OMN-10958): satisfy PR 1569 lint gate * fix(OMN-10865): fix Split 2+4 CI failures — bump omnimarket pin and drop 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. --------- Co-authored-by: jonahgabriel <jonahgabriel@users.noreply.github.com>
Summary
assert warning_msgswith keyword-specific assertions intest_unexpected_error_logged_as_warning— now verifies the WARNING log actually references "schema" or "initialize", rejecting spurious warnings from unrelated code pathstest_advisory_lock_failure_logged_as_warningwhich had the identical under-constrained patternMutation test verification
Deleting the
else: logger.warning(...)branch in_initialize_schemanow causestest_unexpected_error_logged_as_warningto FAIL (confirmed manually during development).Test plan
test_plugin_schema_init.pypasslogger.warning()branch causestest_unexpected_error_logged_as_warningto failCloses OMN-3574
Summary by CodeRabbit