Repository navigation
test(OMN-14488): route-coverage gates (payload_type_match + operation_match) for declared-model↔real-payload seams - #2278
Conversation
…tcher must route its declared event_model Closes the coverage hole that hid the OMN-14484 arc: the only prior coverage (test_plugin_managed_dispatchers_still_registered) asserted a dispatcher is REGISTERED but never dispatched a payload, so a registered-but-unroutable dispatcher (valid payload dropped by OMN-12416 type-scoping / route misconfig) passed green while the live runtime DLQ'd. New durable unit gate asserts: - a VALID instance of the declared event_model resolves the registered command dispatcher (route coverage) — load-bearing; RED for registered-but-unroutable (proven: dispatcher registered + 0 routes => valid payload yields 0 matches); - a non-conforming payload is type-scoping-dropped (matcher discriminates, so the route-coverage assertion is not vacuous). Self-contained unit gate (child of OMN-14208). Generalizing to iterate every payload_type_match contract is a follow-up; the cross-boundary producer<->consumer register is a separate lane. Drops the OMN-14484 harness-artifact-specific assertion per operator direction — that DLQ was a synthetic-publisher artifact, not a product bug; this gate captures the reusable invariant.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…ared input_model must validate the producer's real payload operation_match dispatch routes by the envelope operation string and SKIPS payload-type validation, so an input_model-vs-producer-payload mismatch never DLQs — it starves the node earlier at validate_runtime_local_ingress_payload (resolves contract.input_model, model_validates the payload). New self-contained gate drives the producer's real canonical ModelInvocationCommand through that real ingress seam: GREEN against the canonical input_model (reconciled), RED against the pre-OMN-14489 stub (exists-but-WRONG: requires agent_id, extra=forbid). Non-vacuity guard proves the seam actually validated+normalized (drops null model_backend), not passthrough.
OMN-14488 — route-coverage gates for declared-model↔real-payload seams (child of OMN-14208)
DO NOT MERGE yet — Codex lands; owes a non-implementer OCC evidence companion.
Two independently-reviewable gates (one per routing strategy) closing the coverage hole that hid the OMN-14484 arc: the only prior coverage (
test_plugin_managed_dispatchers_still_registered) asserted a dispatcher is registered but never drove a real payload — so a registered-but-unroutable / silently-rejected contract passed green while the live runtime DLQ'd or starved.Gate 1 —
payload_type_match(dispatch type-scoping)test_dispatcher_route_coverage_omn14488.py: a dispatcher registered with apayload_type_matcher(built from the declaredevent_model, OMN-12416) MUST resolve for a valid instance of that event_model — registration alone isn't enough, the message must ROUTE. Non-vacuity proven: a registered-but-unroutable variant (dispatcher registered + 0 routes) yields 0 matches for a valid payload → RED.Gate 2 —
operation_match(runtime ingress input_model)test_operation_match_ingress_coverage_omn14488.py:operation_matchcontracts route on the envelope operation and do NOT type-scope the payload at dispatch, so Gate 1 is blind to them. Their load-bearing validation isvalidate_runtime_local_ingress_payload, whichmodel_validates the payload againstcontract.input_model. A stub/mismatched input_model there does NOT DLQ but silently rejects every payload at ingress — the OMN-14489remote-agent-invoke.v1HW=19 IN /agent-task-lifecycle.v1HW=0 OUT starvation. Gate: a valid producer payload MUST pass the declared input_model through the real ingress path with no field drop (GREEN); a stub/mismatched input_model MUST reject it (RED against exists-but-wrong).dod_evidence
env -u PYTHONPATH uv run pytest tests/unit/runtime/auto_wiring/→ 348 passed (additive, no regressions); ruff format/check clean; full pre-commit passed.Scope
Self-contained unit gates. Generalizing to iterate every contract (constructing a valid instance of each declared model) is a follow-up; the cross-boundary producer↔consumer register is a separate seam-reaping lane (deduped).
Closes OMN-14488.
Evidence-Source: OCC#4066
Evidence-Commit: 3c57754b78635b0ed073d51db1991787642068ce
Evidence-Ticket: OMN-14488