Repository navigation
chore(OMN-12816): normalize infra main promotion conflicts - #1907
Conversation
📝 WalkthroughWalkthroughThis pull request extends the main branch protection workflow to support hotfix PRs and updates the LLM inference contract version used by integration tests. The workflow now validates hotfix branches targeting main by checking for required evidence fields in the PR body, while the test module aligns its contract version with a patch-level specification change. ChangesWorkflow and test updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/integration/runtime/test_llm_inference_contract_runtime_bus.py (1)
65-67: 💤 Low valueConsider using explicit
.parentchaining for consistency.The learning guidance suggests using
.parent.parent.parent.parentrather than.parents[3]for path traversal to the repository root for better readability and consistency with the established project convention.♻️ Proposed refactor
- effective_contract_path = contract_path or ( - Path(__file__).parents[3] - / "src/omnibase_infra/nodes/node_llm_inference_effect/contract.yaml" - ) + effective_contract_path = contract_path or ( + Path(__file__).parent.parent.parent.parent + / "src/omnibase_infra/nodes/node_llm_inference_effect/contract.yaml" + )🤖 Prompt for 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. In `@tests/integration/runtime/test_llm_inference_contract_runtime_bus.py` around lines 65 - 67, Replace the use of Path(__file__).parents[3] with explicit parent chaining to match project convention: update the construction of effective_contract_path (where it currently falls back to Path(__file__).parents[3] / "src/omnibase_infra/nodes/node_llm_inference_effect/contract.yaml") to use Path(__file__).parent.parent.parent.parent joined with the same relative path so it reads explicitly and consistently with other modules.Source: Learnings
🤖 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 `@tests/integration/runtime/test_llm_inference_contract_runtime_bus.py`:
- Line 72: The test fixture in
tests/integration/runtime/test_llm_inference_contract_runtime_bus.py hardcodes
ModelContractVersion(major=1, minor=4, patch=0) which mismatches the runtime
contract.yaml (patch:1); update the fixture so contract_version matches the YAML
(patch=1) or load the contract.yaml and derive contract_version dynamically (use
the same source referenced by contract_path) so contract.contract_version and
the derived consumer-group/version string are consistent with
src/omnibase_infra/nodes/node_llm_inference_effect/contract.yaml.
---
Nitpick comments:
In `@tests/integration/runtime/test_llm_inference_contract_runtime_bus.py`:
- Around line 65-67: Replace the use of Path(__file__).parents[3] with explicit
parent chaining to match project convention: update the construction of
effective_contract_path (where it currently falls back to
Path(__file__).parents[3] /
"src/omnibase_infra/nodes/node_llm_inference_effect/contract.yaml") to use
Path(__file__).parent.parent.parent.parent joined with the same relative path so
it reads explicitly and consistently with other modules.
🪄 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: 76bef0f4-2e52-4541-ae53-f436a7ec03e2
📒 Files selected for processing (2)
.github/workflows/main-target-guard.ymltests/integration/runtime/test_llm_inference_contract_runtime_bus.py
Summary
Normalizes the two add/add conflict points left by the squash-based main backmerge so the authoritative
dev -> mainOMN-12816 promotion can merge through the required guard path.Evidence-Source: OCC#2322
Evidence-Ticket: OMN-12816
Evidence-Refresh: 2026-06-08T07:44:00Z
Details
extra_bodyimplementation and contract version bump intact..github/workflows/main-target-guard.ymlwith currentmainto remove the policy-only add/add conflict.mainto remove the add/add conflict; runtime contractcontract.yamlstill merges to patch1.Verification
uv run pytest tests/integration/runtime/test_llm_inference_contract_runtime_bus.py tests/unit/nodes/node_llm_inference_effect/handlers/test_handler_llm_openai_compatible_class.py -q— 83 passed, 1 skippedgit diff --check— PASSgit merge-tree --write-tree origin/main HEAD— PASSPromotion impact
This PR exists only to make #1905 mergeable after #1906 was squash-merged by the queue. It does not change the runtime payload path proven on stability-test.
Summary by CodeRabbit