Repository navigation
fix(OMN-10409): skip Bifrost render for projection API - #1780
Conversation
📝 WalkthroughWalkthroughRendering now supports disabling when BIFROST_CONTRACT_PATH is empty: the renderer returns None and the entrypoint logs "disabled" and exits 0. Docker Compose sets ChangesRuntime rendering and wiring
CI UV cache configuration and validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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
🤖 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 `@docker/docker-compose.infra.yml`:
- Around line 777-779: The code that constructs the target path in
render_bifrost_delegation_contract.py currently uses
Path(env.get("BIFROST_CONTRACT_PATH", ...)) which treats an empty string as
Path("") (cwd) and causes unwanted validation; change the logic to explicitly
treat empty or whitespace-only BIFROST_CONTRACT_PATH as "disabled" (e.g., set
target to None or a sentinel) and short-circuit the render/verification path
accordingly, and/or respect BIFROST_VERIFY_ENDPOINTS by skipping endpoint
verification when the contract path is intentionally empty so no
ProtocolConfigurationError is raised; locate the target construction and the
verification gate in render_bifrost_delegation_contract.py and add the
empty-string check before any Path(...) conversion or endpoint validation.
🪄 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: 37781b05-9f78-4cc9-a4f3-4758962bef04
📒 Files selected for processing (1)
docker/docker-compose.infra.yml
843650d to
f1c9fd5
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/runtime/test_render_bifrost_delegation_contract.py (1)
360-371: ⚡ Quick winAssert the probe is never invoked in the disabled path.
This test currently proves
Nonereturn, but not the "no endpoint probe call" contract. Use a mock probe and assert it was not called.Suggested patch
`@pytest.mark.unit` def test_empty_bifrost_contract_path_disables_render(tmp_path: Path) -> None: source = _source_contract(tmp_path / "source.yaml", required=True) + probe = mock.Mock(return_value="should not run") rendered = render_bifrost_delegation_contract( source_path=source, environ={ "BIFROST_CONTRACT_PATH": "", "BIFROST_VERIFY_ENDPOINTS": "1", }, - endpoint_probe=lambda _url, _model, _timeout: "should not run", + endpoint_probe=probe, ) assert rendered is None + probe.assert_not_called()🤖 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/unit/runtime/test_render_bifrost_delegation_contract.py` around lines 360 - 371, Update the test_empty_bifrost_contract_path_disables_render test to also verify the probe is never invoked: replace the lambda probe with a mock (e.g., a MagicMock or Mock) and pass it as the endpoint_probe to render_bifrost_delegation_contract, then after calling render_bifrost_delegation_contract assert the mock probe.was_not_called (or assert probe.assert_not_called()) in addition to asserting rendered is None; reference the test function name and the render_bifrost_delegation_contract call to locate where to inject and assert the mock.
🤖 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.
Nitpick comments:
In `@tests/unit/runtime/test_render_bifrost_delegation_contract.py`:
- Around line 360-371: Update the
test_empty_bifrost_contract_path_disables_render test to also verify the probe
is never invoked: replace the lambda probe with a mock (e.g., a MagicMock or
Mock) and pass it as the endpoint_probe to render_bifrost_delegation_contract,
then after calling render_bifrost_delegation_contract assert the mock
probe.was_not_called (or assert probe.assert_not_called()) in addition to
asserting rendered is None; reference the test function name and the
render_bifrost_delegation_contract call to locate where to inject and assert the
mock.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 60366d0e-8fcb-4f3c-88cb-a9ab0440246e
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
docker/docker-compose.infra.ymlsrc/omnibase_infra/runtime/render_bifrost_delegation_contract.pytests/integration/projectors/test_registry_api_projection_tail_integration.pytests/integration/test_omnibase_spi_runtime_protocol_floor.pytests/unit/runtime/test_render_bifrost_delegation_contract.py
🚧 Files skipped from review as they are similar to previous changes (1)
- docker/docker-compose.infra.yml
Summary
BIFROST_CONTRACT_PATHfor the projection API serviceBIFROST_CONTRACT_PATHas an explicit renderer disable path beforePath(...)conversion or endpoint validationVerification
uv run pytest tests/unit/runtime/test_render_bifrost_delegation_contract.py -quv run ruff check src/omnibase_infra/runtime/render_bifrost_delegation_contract.py tests/unit/runtime/test_render_bifrost_delegation_contract.pyuv run pre-commit run --files docker/docker-compose.infra.yml src/omnibase_infra/runtime/render_bifrost_delegation_contract.py tests/unit/runtime/test_render_bifrost_delegation_contract.pydocker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.stability-test.yml --profile runtime config --quietdocker compose ... config | uv run python -c '... assert projection-api BIFROST_CONTRACT_PATH == "" ...'.201stability runtime rebuilt from merged heads and projection health recovered with the same override:main=healthy,effects=healthy,projection=ok okEvidence-Ticket: OMN-10409
Evidence-Source: c06b8855d3d0280f1d8f5db06a00db94034ee052
Additional CI alignment after final CI sweep:
onex-change-controllock fromc3d38e71to2741a409to consume the current entry-point manifest without deleted dependency-node stubs.0.22.0.Additional verification:
uv run pytest tests/unit/services/registry_api/test_registry_discovery_semantics.py tests/integration/test_auto_wiring_real_manifest.py::test_real_manifest_discovery_has_no_errors tests/integration/test_omnibase_spi_runtime_protocol_floor.py::test_omnibase_spi_runtime_protocols_match_0220_floor -quv run ruff check tests/integration/projectors/test_registry_api_projection_tail_integration.py tests/integration/test_omnibase_spi_runtime_protocol_floor.pyuv run pre-commit run --files uv.lock tests/integration/projectors/test_registry_api_projection_tail_integration.py tests/integration/test_omnibase_spi_runtime_protocol_floor.pyLocal note: the container-backed projection-tail integration setup is blocked locally by Docker/testcontainers failing to create the Ryuk container; GitHub CI owns that container-backed confirmation.
Summary by CodeRabbit
New Features
Tests
Chores
Additional CI resilience update on 2026-05-29:
Additional CI resilience update on 2026-05-29:
Additional CI resilience update on 2026-05-29: