Skip to content

feat(OMN-12659): repoint delegation.wire importers from compat to core - #1032

Merged
jonahgabriel merged 5 commits into
devfrom
jonahgabriel/omn-12659-ws-b1-repoint-delegationwire-compat-importers-to-core-delete
Jun 4, 2026
Merged

jonahgabriel merged 5 commits into
devfrom
jonahgabriel/omn-12659-ws-b1-repoint-delegationwire-compat-importers-to-core-delete

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

WS-B1 of the SEA e2e OMN-12588 epic. All 29 omnimarket importers of omnibase_compat.contracts.delegation.wire repointed to omnibase_core.models.delegation.wire (graduation completed in OMN-12126).

Evidence-Ticket: OMN-12659
Evidence-Source: 388ae1dbcc65c04b791829a12e198ef621d35214

Changes

  • Bump omnibase_core pin to git SHA 307e51f9 (dev tip, 0.44.0)
  • Repoint aggregator src/omnimarket/models/delegation/wire/init.py with explicit per-module imports from core
  • Repoint 22 individual node/adapter shim modules
  • Update 5 test files for core module path identity assertions
  • Fix handler_quality_gate.py mypy error: use EnumQualityGateCategory enum members instead of string literals
  • Normalize absolute /private/tmp/ paths in dep-health-sweep evidence artifacts
  • Result: 0 omnibase_compat.contracts.delegation.wire importers in src/ or tests/

Test Results

  • 6025 tests passed, 12 skipped
  • All 18 pre-commit hooks pass
  • mypy --strict: 0 errors

OCC Receipt

OCC PR #2151 (merged): OmniNode-ai/onex_change_control#2151
OCC merge SHA: 388ae1dbcc65c04b791829a12e198ef621d35214

WS-B1: All 29 omnimarket importers of omnibase_compat.contracts.delegation.wire
repointed to omnibase_core.models.delegation.wire (OMN-12126 graduation).

- Bump omnibase_core pin to git SHA 307e51f9 (dev tip, 0.44.0) which includes:
  TopicBase infra delegation topics (OMN-12663), widened tier Literal (OMN-12663),
  and full 12-value task_type Literal (OMN-12663 follow-on)
- Repoint aggregator src/omnimarket/models/delegation/wire/__init__.py to import
  from omnibase_core.models.delegation.wire.* with explicit per-module imports
- Repoint 22 individual shim modules in nodes/ and adapters/
- Update 5 test files to reference core module paths for identity assertions
- Update test_delegation_dto_omnibase_compat_imports.py: canonical_ref paths now
  use core file names (model_delegation_wire_request, model_delegation_wire_envelope)
  and module-origin assertions updated from compat to core

Result: 0 omnibase_compat.contracts.delegation.wire importers in src/ or tests/;
4040 unit tests pass, 0 failures; aggregator __all__ fully bound (38 symbols).
Pre-commit end-of-file-fixer normalized trailing newlines in
dep-health-sweep evidence artifacts.
@jonahgabriel
jonahgabriel enabled auto-merge June 4, 2026 09:14
@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR systematically migrates delegation DTO imports across omnimarket from the omnibase_compat.contracts.delegation.wire compatibility layer to omnibase_core.models.delegation.wire. The PR includes a dependency version bump (0.42.x → 0.44.x), updates all model re-export shims and handlers, adds an enum-based fix for legacy quality gate checks, and updates all test assertions and evidence metadata.

Changes

Delegation DTO Migration to Core

Layer / File(s) Summary
Dependency upgrade and core delegation wire re-export hub
pyproject.toml, src/omnimarket/models/delegation/wire/__init__.py
omnibase_core version constraint updated from 0.42.x to 0.44.x with git pin bump; core delegation wire __init__.py docstring and shared platform-primitive re-exports switched from omnibase_compat to omnibase_core.models.delegation.wire.
Bifrost and events module migration
src/omnimarket/adapters/llm/bifrost/model_bifrost_delegation_config.py, src/omnimarket/events/delegation.py
Module docstrings and import sources updated to indicate canonical models are now in omnibase_core with OMN-12659 reference; imported symbols and re-exports unchanged.
Orchestrator model shim migrations
src/omnimarket/nodes/node_delegation_orchestrator/models/model_*.py (10 files)
All ten orchestrator model re-export shims (BaselineIntent, ComplianceLoopResult, DelegationEvent, DelegationRequest, DelegationResult, InferenceIntent, InferenceResponseData, QualityGateIntent, RoutingIntent, TaskDelegatedEvent) updated to import from omnibase_core.models.delegation.wire.
Quality gate reducer model and handler migration with enum fix
src/omnimarket/nodes/node_delegation_quality_gate_reducer/models/model_*.py, src/omnimarket/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate*.py
Quality gate model re-exports and HandlerQualityGateIntent updated to use omnibase_core sources; legacy fallback check in _run_legacy_checks now uses EnumQualityGateCategory.PASS/FAIL_HEURISTIC enum values instead of string literals.
Routing reducer model and handler migration
src/omnimarket/nodes/node_delegation_routing_reducer/models/model_*.py, src/omnimarket/nodes/node_delegation_routing_reducer/handlers/handler_routing_intent.py
Routing model re-exports (DelegationConfig, RoutingTier, TierModel) and routing handler updated to import from omnibase_core.models.delegation.wire.
LLM delegation handler migration
src/omnimarket/nodes/node_llm_delegation_call_effect/handlers/handler_inference_intent.py
Handler's ModelInferenceIntent and ModelInferenceResponseData imports switched to omnibase_core.models.delegation.wire.
Test validation updates
tests/test_delegation_dto_omnibase_compat_imports.py, tests/unit/delegation/test_*.py, tests/unit/models/delegation/wire/test_public_exports.py
All test files updated to import from omnibase_core sources; main DTO validation test renamed to test_delegation_dto_market_paths_resolve_to_core, DTO_IMPORTS mapping expanded with new core paths, and canonical module prefix assertions changed from omnibase_compat... to omnibase_core.models.delegation.wire....
Evidence and metadata updates
docs/evidence/dep-health-sweep/proof-of-life-001/findings.json, docs/evidence/dep-health-sweep/proof-of-life-001/projection_rows.json, docs/evidence/dep-health-sweep/proof-of-life-001/proof_summary.md, docs/evidence/dep-health-sweep/proof-of-life-001/run_manifest.json
Fixture file paths updated from pytest-13 to pytest-725 and timestamps refreshed to reflect new test run environment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • OmniNode-ai/omnimarket#629: Both PRs touch the same delegation DTO shim modules and advance the import-path migration from compatibility to core sources.
  • OmniNode-ai/omnimarket#737: Both PRs update the delegation-wire public exports test to assert barrel exports resolve to canonical omnibase_core DTOs.
  • OmniNode-ai/omnimarket#664: Both PRs update the model_delegation_event.py module to re-export ModelDelegationEventEnvelope under the new omnibase_core source.

Poem

A rabbit hops through imports with glee,
From compat to core—where models run free!
Delegation DTOs now stand bright and true,
In omnibase_core, the canonical view. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: repointing delegation.wire importers from the compat package to the core package, with the ticket reference (OMN-12659) adding specificity.
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 jonahgabriel/omn-12659-ws-b1-repoint-delegationwire-compat-importers-to-core-delete

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

…-ws-b1-repoint-delegationwire-compat-importers-to-core-delete
@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

✅ PR Review Bot — CLEAN

Findings: 0
Run ID: ``

Required gate: This check blocks merge when verdict is blocking_issue.


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 Jun 4, 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)

@github-actions

github-actions Bot commented Jun 4, 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

…r_quality_gate

mypy --strict rejected string literal assignment to EnumQualityGateCategory variable.
Replace "pass"/"fail_heuristic" string literals with
EnumQualityGateCategory.PASS/FAIL_HEURISTIC enum members.

Pre-existing type error (not introduced by OMN-12659 compat->core repoint),
fixed in this PR to unblock CI typecheck gate.

@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: 2

🤖 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/dep-health-sweep/proof-of-life-001/findings.json`:
- Line 6: The committed findings.json contains absolute private workspace paths
in the "file_path" field; update the code that populates findings entries (the
serializer that creates findings.json / the function that sets "file_path") to
convert absolute paths to repository-relative ones before writing (use
os.path.relpath against the repo root or replace the fixture tmp prefix with
"<fixture>/..."), and apply the same normalization for all occurrences
(including the other reported index) so no /private/tmp/... paths are written to
the JSON.

In `@docs/evidence/dep-health-sweep/proof-of-life-001/projection_rows.json`:
- Line 7: Projection evidence currently stores absolute temp paths in the
"file_path" field (see projection_rows.json) which leaks private workspace info;
update the serialization logic that populates the "file_path" key to
normalize/redact these values (for example convert to repo-relative paths or
replace temp prefixes with a fixture token) before persisting. Locate the code
that writes projection rows (the routine that sets "file_path" when building
projection_rows.json) and replace the direct absolute path assignment with a
normalization function (e.g., normalizeFilePath or sanitizePath) that strips
/private/tmp or converts to repo-relative or tokenizes fixture names, and add a
unit test ensuring an input absolute temp path becomes a normalized/tokenized
value in the stored JSON. Ensure all places that emit "file_path" use the same
sanitizer to cover the other affected rows.
🪄 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: b43c619b-b04e-4f06-b4be-ff15ea47fe23

📥 Commits

Reviewing files that changed from the base of the PR and between 077b983 and db2828f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (35)
  • docs/evidence/dep-health-sweep/proof-of-life-001/findings.json
  • docs/evidence/dep-health-sweep/proof-of-life-001/projection_rows.json
  • docs/evidence/dep-health-sweep/proof-of-life-001/proof_summary.md
  • docs/evidence/dep-health-sweep/proof-of-life-001/run_manifest.json
  • pyproject.toml
  • src/omnimarket/adapters/llm/bifrost/model_bifrost_delegation_config.py
  • src/omnimarket/events/delegation.py
  • src/omnimarket/models/delegation/wire/__init__.py
  • src/omnimarket/nodes/node_budget_policy_compute/models/model_budget_limits.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_baseline_intent.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_compliance_loop_result.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_event.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_request.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_delegation_result.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_inference_intent.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_inference_response_data.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_quality_gate_intent.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_routing_intent.py
  • src/omnimarket/nodes/node_delegation_orchestrator/models/model_task_delegated_event.py
  • src/omnimarket/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate.py
  • src/omnimarket/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate_intent.py
  • src/omnimarket/nodes/node_delegation_quality_gate_reducer/models/model_quality_contract.py
  • src/omnimarket/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_input.py
  • src/omnimarket/nodes/node_delegation_quality_gate_reducer/models/model_quality_gate_result.py
  • src/omnimarket/nodes/node_delegation_routing_reducer/handlers/handler_routing_intent.py
  • src/omnimarket/nodes/node_delegation_routing_reducer/models/model_delegation_config.py
  • src/omnimarket/nodes/node_delegation_routing_reducer/models/model_routing_tier.py
  • src/omnimarket/nodes/node_delegation_routing_reducer/models/model_tier_model.py
  • src/omnimarket/nodes/node_llm_delegation_call_effect/handlers/handler_inference_intent.py
  • tests/test_delegation_dto_omnibase_compat_imports.py
  • tests/unit/delegation/test_delegation_chain_e2e.py
  • tests/unit/delegation/test_handler_inference_intent.py
  • tests/unit/delegation/test_handler_quality_gate_intent.py
  • tests/unit/delegation/test_handler_routing_intent.py
  • tests/unit/models/delegation/wire/test_public_exports.py

Comment thread docs/evidence/dep-health-sweep/proof-of-life-001/findings.json Outdated
Comment thread docs/evidence/dep-health-sweep/proof-of-life-001/projection_rows.json Outdated
…ON artifacts

CodeRabbit flagged private workspace absolute paths in dep-health-sweep
proof-of-life evidence. Replace /private/tmp/.../src/ with src/ in
findings.json and projection_rows.json.
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 4, 2026
Merged via the queue into dev with commit 7a36acb Jun 4, 2026
64 of 65 checks passed
@jonahgabriel
jonahgabriel deleted the jonahgabriel/omn-12659-ws-b1-repoint-delegationwire-compat-importers-to-core-delete branch June 4, 2026 09:55
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