Skip to content

fix(OMN-11003): reexport delegation event envelope - #664

Merged
jonahgabriel merged 2 commits into
mainfrom
jonah/omn-11003-model-collision-burndown
May 17, 2026
Merged

jonahgabriel merged 2 commits into
mainfrom
jonah/omn-11003-model-collision-burndown

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Evidence-Source: OCC#1065
Evidence-Ticket: OMN-11003

Summary

  • Classifies high-risk D4 model-name collisions for delegation, routing, task-contract, and dispatch-record families.
  • Removes omnimarket's local ModelDelegationEvent class definition by re-exporting canonical omnibase_compat.contracts.delegation.wire.ModelDelegationEventEnvelope from the existing omnimarket import path.
  • Updates focused compatibility and dispatcher tests for the canonical envelope runtime type.

Verification

  • uv run pytest tests/test_delegation_dto_omnibase_compat_imports.py tests/unit/delegation/test_delegation_orchestrator.py tests/unit/delegation/test_dispatcher_event_bus.py tests/unit/nodes/node_delegate_skill_orchestrator/test_runtime_dispatch_port.py -q
  • uv run ruff check src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_event.py tests/test_delegation_dto_omnibase_compat_imports.py tests/unit/delegation/test_dispatcher_event_bus.py
  • uv run python - <<'PY' ... docs/work-tracking/contracts/OMN-11003.yaml parses and evidence file contains target families ... PY
  • D4 overlay targeted check: ModelDelegationEvent absent=True finding_count=182

Deploy Gate

No live deploy, runtime restart, .201 mutation, or event-bus write required. This is DTO import compatibility plus documentation evidence only.

@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR resolves OMN-11003 by replacing the local ModelDelegationEvent Pydantic model with a re-export of the canonical ModelDelegationEventEnvelope from omnibase_compat, eliminating a model name collision. The change is validated through test assertions and compatibility mappings, with supporting work-tracking and evidence documentation.

Changes

Model Delegation Event Collision Resolution

Layer / File(s) Summary
Model re-export and test validation
src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_event.py, tests/unit/delegation/test_dispatcher_event_bus.py, tests/test_delegation_dto_omnibase_compat_imports.py
Local ModelDelegationEvent class definition removed and replaced with import alias of ModelDelegationEventEnvelope. Event-bus publish assertion updated to expect the canonical envelope type name. DTO import compatibility test extended to map both direct and module-qualified references to the canonical type.
Change documentation and work tracking
docs/evidence/OMN-11003-model-collision-classification.md, docs/work-tracking/contracts/OMN-11003.yaml
Evidence document records the collision-family classification and documents the ModelDelegationEvent re-export change with baseline and overlay D4 scan results. Work-tracking contract captures OMN-11003 metadata, DoD checks for repo/evidence file presence, targeted test runs, ruff validation, D4 overlay assertions, and deploy-gate status.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • OmniNode-ai/omnimarket#624: Updates ModelDelegationEvent to alias ModelDelegationEventEnvelope and adjusts test_envelope_payload_matches_expected_topic assertions in the same test file, directly relating to this PR's model re-export and event-bus validation changes.

Poem

🐰 A model's name once caused a fray,
Two places claimed the same display,
But now it's one, and clear to see—
One source of truth flows wild and free!
The collision melts like morning dew,
And documentation marks it true. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: re-exporting the delegation event envelope from omnibase_compat to remove the local ModelDelegationEvent class.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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-11003-model-collision-burndown

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

@github-actions
github-actions Bot enabled auto-merge May 16, 2026 19:24
@github-actions

github-actions Bot commented May 16, 2026 •

Copy link
Copy Markdown

✅ Architectural Review — PASSED

Errors: 0
Warnings: 0

What this checks

Rule Description
ARCH-TOPIC-001 No hardcoded Kafka topic strings in handler code
ARCH-DI-001 No event_bus=None bypass
ARCH-DI-002 No direct Handler instantiation outside workflow_runner/adapters
ARCH-DI-003 No reinvented DI containers
ARCH-TOPIC-002 contract.yaml topics follow `onex.{cmd

No architectural violations found.

Powered by node_pr_review_bot

@github-actions

github-actions Bot commented May 16, 2026 •

Copy link
Copy Markdown

✅ PR Review Bot — CLEAN

Findings: 0
Run ID: ``

Phase 1 (informational): Does not block merge. Required-check gate follows once a few runs confirm the bot completes successfully. See OMN-8890.


Verdict semantics

Verdict Meaning
clean No blocking findings
risks_noted Findings noted; threads passed judge verification
blocking_issue MAJOR/CRITICAL findings not resolved — do not merge

Powered by node_pr_review_bot — Qwen3-Coder-30B reviewer + DeepSeek-R1 judge (OMN-7963)

@github-actions

github-actions Bot commented May 16, 2026 •

Copy link
Copy Markdown

⚠️ Hostile Reviewer — DEGRADED (informational)

Blocking findings (critical/error): 0
Total findings: 0
Models succeeded: none

Note: All reviewer models failed or were unavailable. Degraded results are informational during the pilot phase (OMN-8524) and do not block merge. Error: cli_review exited non-zero (all models failed or binary error)


Gate semantics (pilot phase)

Verdict Meaning Blocks merge?
passed No critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded All models unavailable (infra) No (pilot)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@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 `@docs/evidence/OMN-11003-model-collision-classification.md`:
- Around line 31-32: The evidence doc
OMN-11003-model-collision-classification.md contains a private local filesystem
path in the baseline scan line; remove or redact that private workspace path and
replace it with a neutral placeholder (e.g. <repo_root> or /path/to/repo) or a
relative/canonical reference so no user-specific paths appear, and ensure the
updated line preserves the meaning of "baseline scan against canonical
<repo_root> before applying the worktree overlay" while eliminating the
sensitive path.
🪄 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: 9d07e9fa-d6c0-4e35-8a19-32bab1c6fecd

📥 Commits

Reviewing files that changed from the base of the PR and between 2a2be49 and 4d04988.

📒 Files selected for processing (5)
  • docs/evidence/OMN-11003-model-collision-classification.md
  • docs/work-tracking/contracts/OMN-11003.yaml
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_event.py
  • tests/test_delegation_dto_omnibase_compat_imports.py
  • tests/unit/delegation/test_dispatcher_event_bus.py

Comment thread docs/evidence/OMN-11003-model-collision-classification.md Outdated
@sonarqubecloud

Copy link
Copy Markdown

@jonahgabriel
jonahgabriel added this pull request to the merge queue May 17, 2026
Merged via the queue into main with commit 85ce61b May 17, 2026
43 of 44 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-11003-model-collision-burndown branch May 17, 2026 03:16
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