Skip to content

fix(OMN-13124): repoint routing_decision contract DB target to omnibase_infra - #1213

Closed
jonahgabriel wants to merge 1 commit into
devfrom
jonah/omn-13122-routing-decision-db-repoint
Closed

jonahgabriel wants to merge 1 commit into
devfrom
jonah/omn-13122-routing-decision-db-repoint

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

OMN-13124 — make routing_decision write target durable (capstone Finding #1 residual)

node_projection_routing_decision declared db_io.db_tables[].database: omnidash_analytics, but agent_routing_decisions only exists in omnibase_infra (DDL owner: migration 021; this node is a NON-OWNER WRITER with forbid_cross_repo_create_table). The omnibase_infra runtime auto-wiring (handler_wiring._DB_URL_ENV_MAP) resolves the contract database field to the DSN env var, so the prior value pointed the write at OMNIDASH_ANALYTICS_DB_URL where the table does not exist — the handler logged UndefinedTable (golden-chain sweep run12 Finding).

This change is the companion to the routing-decision projection node (the original projection node landed under a separate ticket) and is grouped with the pattern_learning durability work under OMN-13124.

Change

Repoint database -> omnibase_infra (one field + explanatory comment). The auto-wiring then connects the write to OMNIBASE_INFRA_DB_URL, where the table lives. This makes writer DSN == reader DSN: the registration golden chain already reads agent_routing_decisions from omnibase_infra and passes. Single canonical DB home, no divergent duplicate table (the duplicate-tail-table invariant; the node's own forbid_cross_repo_create_table policy prohibits adding an omnidash_analytics CREATE TABLE). Follows the existing node_projection_overnight precedent (also database: omnibase_infra).

Verification (local)

  • Handler INSERT column set matches the omnibase_infra agent_routing_decisions schema exactly (migration 021 + 028), verified against throwaway postgres 14.
  • ruff clean; mypy --strict clean (6 files); routing node tests 16/16; runtime dogfood + projection materialization validation 9/9.

Contract DB target only — no DDL, no new migration, no live deploy, no .201 mutation.

Evidence-Source: OCC#2618
Evidence-Ticket: OMN-13124

Do NOT merge — reported for the lead to enqueue.

…se_infra

node_projection_routing_decision declared db_io.db_tables[].database:
omnidash_analytics, but agent_routing_decisions only exists in omnibase_infra
(DDL owner: omnibase_infra migration 021; this node is a NON-OWNER WRITER with
metadata duplicate_migration_policy: forbid_cross_repo_create_table). The
omnibase_infra runtime auto-wiring (handler_wiring._DB_URL_ENV_MAP) resolves
the contract database field to the DSN env var, so the prior value pointed the
write at OMNIDASH_ANALYTICS_DB_URL where the table does not exist — the handler
logged UndefinedTable (golden-chain sweep run12 Finding).

Repoint database -> omnibase_infra so the auto-wiring connects the write to
OMNIBASE_INFRA_DB_URL. This makes writer DSN == reader DSN: the registration
golden chain already reads agent_routing_decisions from omnibase_infra and
passes. Single canonical DB home, no divergent duplicate table (the OMN-13127
invariant; the contract's own forbid_cross_repo_create_table policy explicitly
prohibits adding an omnidash_analytics CREATE TABLE). Follows the existing
node_projection_overnight precedent (also database: omnibase_infra).

Handler INSERT column set (id, correlation_id, selected_agent, confidence_score,
created_at, request_type, alternatives, routing_reason, domain, metadata,
project_path, project_name, claude_session_id) matches the omnibase_infra
agent_routing_decisions schema exactly (migration 021 + 028), verified against
a throwaway postgres 14.

Verify: ruff clean; mypy --strict clean (6 files); routing_decision node tests
16/16; runtime dogfood + projection materialization validation 9/9.

Evidence-Source: OCC#<pending>
@coderabbitai

coderabbitai Bot commented Jun 14, 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 55 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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: 2a72e922-8484-4027-836c-4b7c805165c2

📥 Commits

Reviewing files that changed from the base of the PR and between 584259a and a75947a.

📒 Files selected for processing (1)
  • src/omnimarket/nodes/node_projection_routing_decision/contract.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13122-routing-decision-db-repoint

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

@github-actions
github-actions Bot enabled auto-merge June 14, 2026 03:04
@github-actions

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

@github-actions

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

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 changed the title fix(OMN-13122): repoint routing_decision contract DB target to omnibase_infra fix(OMN-13124): repoint routing_decision contract DB target to omnibase_infra (companion OMN-13122) Jun 14, 2026
@jonahgabriel jonahgabriel changed the title fix(OMN-13124): repoint routing_decision contract DB target to omnibase_infra (companion OMN-13122) fix(OMN-13124): repoint routing_decision contract DB target to omnibase_infra Jun 14, 2026
@jonahgabriel

Copy link
Copy Markdown
Contributor Author

Superseded by a re-named branch (jonah/omn-13124-routing-decision-db-repoint) so the receipt-gate identity binding matches Evidence-Ticket: OMN-13124.

auto-merge was automatically disabled June 14, 2026 03:15

Pull request was closed

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