Skip to content

test(OMN-14488): route-coverage gates (payload_type_match + operation_match) for declared-model↔real-payload seams - #2278

Merged
jonahgabriel merged 3 commits into
devfrom
jonah/omn-14488-dispatcher-route-coverage-gate
Jul 13, 2026
Merged

jonahgabriel merged 3 commits into
devfrom
jonah/omn-14488-dispatcher-route-coverage-gate

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 12, 2026 •

Copy link
Copy Markdown
Collaborator

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 a payload_type_matcher (built from the declared event_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_match contracts 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 is validate_runtime_local_ingress_payload, which model_validates the payload against contract.input_model. A stub/mismatched input_model there does NOT DLQ but silently rejects every payload at ingress — the OMN-14489 remote-agent-invoke.v1 HW=19 IN / agent-task-lifecycle.v1 HW=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

  • Both gates green locally; non-vacuity proven for each (RED against the registered-but-unroutable / stub-input_model case).
  • 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

…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.
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e4d527cd-a416-46d2-83b2-7fd566bba6cf

📥 Commits

Reviewing files that changed from the base of the PR and between 132cf77 and fc3c273.

📒 Files selected for processing (2)
  • tests/unit/runtime/auto_wiring/test_dispatcher_route_coverage_omn14488.py
  • tests/unit/runtime/auto_wiring/test_operation_match_ingress_coverage_omn14488.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-14488-dispatcher-route-coverage-gate

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

…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.
@jonahgabriel jonahgabriel changed the title test(OMN-14488): route-coverage gate — registered type-scoped dispatcher must route its event_model test(OMN-14488): route-coverage gates (payload_type_match + operation_match) for declared-model↔real-payload seams Jul 13, 2026
@jonahgabriel
jonahgabriel merged commit fcb37b4 into dev Jul 13, 2026
121 of 122 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14488-dispatcher-route-coverage-gate branch July 13, 2026 01:28
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