Skip to content

chore(OMN-12816): normalize infra main promotion conflicts - #1907

Merged
jonahgabriel merged 3 commits into
devfrom
jonah/omn-12816-promotion-conflict-normalize
Jun 8, 2026
Merged

jonahgabriel merged 3 commits into
devfrom
jonah/omn-12816-promotion-conflict-normalize

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Normalizes the two add/add conflict points left by the squash-based main backmerge so the authoritative dev -> main OMN-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

  • Keeps the proven OMN-12816 runtime extra_body implementation and contract version bump intact.
  • Aligns .github/workflows/main-target-guard.yml with current main to remove the policy-only add/add conflict.
  • Aligns the synthetic integration test contract-version fixture with current main to remove the add/add conflict; runtime contract contract.yaml still merges to patch 1.

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 skipped
  • git diff --check — PASS
  • git merge-tree --write-tree origin/main HEAD — PASS

Promotion 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

  • Chores
    • Updated branch protection workflow to allow hotfix PRs targeting main with required documentation and backmerge references
    • Updated LLM inference contract version in integration tests

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This 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.

Changes

Workflow and test updates

Layer / File(s) Summary
Main branch guard logic for hotfix PRs
.github/workflows/main-target-guard.yml
Workflow comment and bash guard logic are updated to allow PRs from hotfix/* branches in addition to dev promotions, validating required hotfix-evidence and backmerge fields in the PR body and reporting specific missing fields.
LLM inference contract version update
tests/integration/runtime/test_llm_inference_contract_runtime_bus.py
The _contract() helper updates the declared ModelContractVersion patch value from 1 to 0, changing the contract version used by in-memory and Kafka/Redpanda integration tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hotfix guard now guards the gate,
With evidence and backmerge fate,
While tests align their contracts true,
All versions checked and all things new! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: normalizing infrastructure conflicts related to main branch promotion workflows, which aligns with the PR's core objective of resolving add/add conflicts from a squash-based merge.
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.

✏️ 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-12816-promotion-conflict-normalize

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

@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

🧹 Nitpick comments (1)
tests/integration/runtime/test_llm_inference_contract_runtime_bus.py (1)

65-67: 💤 Low value

Consider using explicit .parent chaining for consistency.

The learning guidance suggests using .parent.parent.parent.parent rather 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

📥 Commits

Reviewing files that changed from the base of the PR and between abb9ea3 and 3349004.

📒 Files selected for processing (2)
  • .github/workflows/main-target-guard.yml
  • tests/integration/runtime/test_llm_inference_contract_runtime_bus.py

@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 8, 2026
Merged via the queue into dev with commit 2793e4f Jun 8, 2026
60 of 62 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-12816-promotion-conflict-normalize branch June 8, 2026 08:38
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