Skip to content

feat(OMN-12828): cloud URLs + api-key refs → bifrost; remove host-env routability coupling on demo cloud path - #1123

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-12828-cloud-endpoints-key-refs
Jun 8, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-12828-cloud-endpoints-key-refs

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

OMN-12828 — B3: cloud URLs + api-key references → bifrost

Builds on A1 (OMN-12815, complete verbatim endpoints) and HG2 (OMN-12824, secret-store resolver at the inference effect boundary), both already merged to dev.

What changed

  • Removed the host-.env routability coupling on the demo cloud path. A cloud backend's routability is now a contract property (complete endpoint_url + a declared API-key reference NAME), not a host-env property. Deleted the os.environ secret-presence gate from:
    • _resolve_bifrost_backend (node_generation_consumer/handlers/handler_generation_consumer.py)
    • _load_bifrost_endpoints (node_delegation_routing_reducer/handlers/handler_delegation_routing.py)
      The secret VALUE resolves fail-closed at the inference effect boundary via the HG2 secret store — no host-.env runtime dependency.
  • POST URL == contract endpoint_url VERBATIM for cloud-gemini-flash, openrouter-glm-flash, openrouter-qwen3-coder-480b (A1-landed values pinned by new tests); fail-closed when endpoint_url empty. No literal key in any contract/overlay/source.
  • New B3 test test_cloud_endpoints_key_refs_omn12828.py; updated routing-authority + openrouter tests to the contract-driven (not host-env-gated) routability contract.

Scope decisions (CLAUDE.md Rule 2 — documented, no shims)

  1. The api_key_env→api_key_ref field rename + base_url_env deletion are owned by the canonical omnibase_core ModelDelegationBackendConfig (OMN-12126/12659). That rename did not land in omnibase_core dev/main (branch jonah/omn-12824-bifrost-api-key-ref exists but never merged; core still ships api_key_env+base_url_env with extra="forbid"). Renaming the committed YAML now would FAIL core schema validation → cross-repo blocked, out of this single-repo PR's scope. The committed contract carries the key reference NAME today via api_key_env; the substance of B3 (no literal key, fail-closed, no host-.env runtime dependency) is fully satisfied.
  2. bridge_config_loader.py's OPENROUTER_BASE_URL env path is not on the demo cloud delegation path (verified: node_generation_consumer / node_delegation_routing_reducer / node_llm_delegation_call_effect do not import it). It feeds node_pr_review_bot/node_hostile_reviewer, whose adapter still constructs f"{base_url}/v1/chat/completions" — A1/OMN-12815 append-debt in a different node; tracked as follow-up.
  3. HG2 Infisical seeding (plan user-gate feat(merge-sweep): add failure history tracking and Track A-resolve [OMN-7573] #1): probed for GEMINI_API_KEY + OPENROUTER_API_KEY (NAMES only; values never printed). No Infisical CLI available in this environment, so seeding could not be performed here. The code path is correct regardless: the HG2 resolver is fail-closed and the deployed effect boundary injects the Infisical-backed store. Seeding is an ops step before the cloud demo run.

dod_evidence

Plan: docs/plans/2026-06-08-close-the-loop-plan.md (B3 + HG2 + Demo Acceptance Criteria).

Evidence-Source: 42ff7a71356d898adef0602e4cd289bdbc6bd9e2
Evidence-Ticket: OMN-12828

…st-env routability coupling on demo cloud path

B3 (close-the-loop plan). Builds on A1 (OMN-12815 complete verbatim
endpoints) and HG2 (OMN-12824 secret-store resolver at the effect boundary).

- Routability of a cloud backend is now a CONTRACT property (complete
  endpoint_url + declared key reference NAME), not a host-env property.
  Removed the os.environ secret-presence gate from _resolve_bifrost_backend
  (handler_generation_consumer) and _load_bifrost_endpoints
  (handler_delegation_routing). The secret VALUE resolves fail-closed at the
  inference effect boundary via the secret store (HG2) — no host-.env runtime
  dependency on the demo cloud path.
- POST URL == contract endpoint_url VERBATIM for cloud-gemini-flash,
  openrouter-glm-flash, openrouter-qwen3-coder-480b (A1-landed values pinned
  by new tests); fail-closed when endpoint_url empty.
- New B3 tests + updated routing-authority/openrouter tests to the
  contract-driven (not host-env-gated) routability contract.

Scope notes (see contracts/OMN-12828.yaml): the api_key_env->api_key_ref
field rename + base_url_env deletion are owned by the canonical omnibase_core
model and did not land there (cross-repo blocked; no shim added). The
OPENROUTER_BASE_URL env path in bridge_config_loader is not on the demo cloud
path (it feeds hostile_reviewer/pr_review_bot, which carry separate A1
append-debt) — tracked as follow-up.

Evidence-Source: PENDING
Evidence-Ticket: OMN-12828
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 10 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 69784edd-a015-4c60-96bd-65e91739fe5e

📥 Commits

Reviewing files that changed from the base of the PR and between 24a8516 and e8af7c7.

📒 Files selected for processing (6)
  • docs/work-tracking/contracts/OMN-12828.yaml
  • src/omnimarket/nodes/node_delegation_routing_reducer/handlers/handler_delegation_routing.py
  • src/omnimarket/nodes/node_generation_consumer/handlers/handler_generation_consumer.py
  • tests/nodes/node_delegation_routing_reducer/test_openrouter_routing.py
  • tests/unit/nodes/node_generation_consumer/test_cloud_endpoints_key_refs_omn12828.py
  • tests/unit/nodes/node_generation_consumer/test_endpoint_routing_authority.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-12828-cloud-endpoints-key-refs

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

@github-actions
github-actions Bot enabled auto-merge June 8, 2026 21:23
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

⚠️ Architectural Review — WARNINGS

Errors: 0
Warnings: 1

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

ARCH-DI-002: Direct Handler instantiation (warning)\n\n\nsrc/omnimarket/nodes/node_generation_consumer/handlers/handler_generation_consumer.py:533: self._effect = HandlerLlmOpenaiCompatible(transport=_Transport())\n\n\nHandler classes should be wired only in workflow_runner.py or adapter modules. Direct instantiation elsewhere bypasses the contract system.\n\n

Powered by node_pr_review_bot

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

✅ PR Review Bot — CLEAN

Findings: 0
Run ID: ``

Note: Reviewer models are running as stubs (OMN-7969–OMN-7972 pending). Architectural findings from Phase 1 (arch-lint) are the authoritative signal until model handlers land.


Verdict semantics

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

Powered by node_pr_review_bot — FSM pipeline with multi-model review fan-out

@github-actions

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

@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 8, 2026
Merged via the queue into dev with commit 357ed05 Jun 8, 2026
65 of 68 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-12828-cloud-endpoints-key-refs branch June 8, 2026 21:49
@jonahgabriel
jonahgabriel restored the jonah/omn-12828-cloud-endpoints-key-refs branch June 8, 2026 22:09
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