Skip to content

fix(OMN-14000): migrate 6 nodes' handler_routing to the nested contract schema - #1631

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-14000-ratchet-canary
Jul 7, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-14000-ratchet-canary

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Ratchet burn-down batch #1 (missing_handler_routing, the ratchet-canary's #1 target, epic OMN-13976 WS-M). The arch_handler_contract_compliance gate only recognizes the nested handler_routing.handlers[].handler.{name,module} schema; these nodes were still on the legacy flat handler_class/handler_module string schema and false-flagged as missing_handler_routing.

Adds the nested handler: block (and routing_strategy: operation_match where absent) as a purely additive sibling to each existing handlers[] entry — every existing key/value/comment is preserved unchanged, nothing removed or reordered.

Nodes (final scope, see note below): node_kb_adr_publisher, node_kreuzberg_parse_effect.

Scope note — 4 nodes deferred (state-coverage-gate coupling)

This batch originally also fixed node_adr_canary_orchestrator, node_adr_document_ingestion_effect, node_memory_lifecycle_orchestrator, and node_persona_lifecycle_orchestrator. All 4 are pre-listed in scripts/validation/state_coverage_baseline.txt with genuinely uncovered declared output topics (unrelated to handler_routing) — state-coverage-gate's --strict mode un-grandfathers that debt for any node directly touched by a diff, so touching their contract.yaml for the handler_routing fix failed CI on an unrelated, pre-existing gap. Reverted those 4 out of this PR to keep it small/single-ratchet-type; filed OMN-14009 to track the deferred fix (needs real test-coverage work, not mechanical) + the general coupling risk for future missing_handler_routing batches.

Local-first dogfood proof

Both fixes in this PR were generated by the local delegate tier (Qwen3.6-35B-A3B via .201, onex delegate --task-type document) — 2/2 first-try, gate-verified, no cloud escalation. This is a flagship proof for the local-first ratchet burn-down lane (OMN-14000): mechanical, self-grading-oracle tech debt reduced by a local model, not a frontier one. Each generated YAML block was verified byte-for-byte correct (preserved every existing field, comment, and value) before being applied.

Verification

  • Gate before (pre-existing baseline, no fixes): python -m onex_change_control.validators.arch_handler_contract_compliance --repo-root omnimarket -> Total handlers: 431 / Compliant: 336 / New violations: 95
  • Gate after (this PR, final 2-node scope): Total handlers: 431 / Compliant: 338 / New violations: 93 — +2 compliant, -2 violations, zero new violations introduced.
  • Focused tests: tests/nodes/node_kreuzberg_parse_effect/, tests/integration/node_kb_adr_publisher/ — 15 passed.
  • Full local gates: ruff format --check clean, ruff check clean, mypy --strict clean (2693 files), full pytest tests/ -v (no -k): 12116 passed, 5 failed + 1 error — pre-existing, infra-dependent (Postgres/Kafka unavailable locally), same as origin/dev baseline.

OMN-14000
Evidence-Source: OCC#3643
Evidence-Ticket: OMN-14000

…ct schema

Ratchet burn-down batch #1 (missing_handler_routing, the ratchet-canary's #1
target). The arch_handler_contract_compliance gate
(onex_change_control/src/onex_change_control/scanners/handler_contract_compliance.py)
only recognizes the nested `handler_routing.handlers[].handler.{name,module}`
schema; these 6 nodes were still on the legacy flat `handler_class`/
`handler_module` string schema and false-flagged as missing_handler_routing.

Adds the nested `handler:` block (and `routing_strategy: operation_match`
where absent) as a purely additive sibling to each existing handlers[] entry
— every existing key/value/comment is preserved unchanged, nothing removed.

Nodes: node_adr_canary_orchestrator, node_adr_document_ingestion_effect,
node_kb_adr_publisher, node_kreuzberg_parse_effect,
node_memory_lifecycle_orchestrator (3 handler entries),
node_persona_lifecycle_orchestrator (2 handler entries).

4 of these 6 fixes (kb_adr_publisher, kreuzberg_parse_effect,
memory_lifecycle_orchestrator, persona_lifecycle_orchestrator) were generated
by the LOCAL delegate tier (Qwen3.6-35B-A3B via `.201`, `onex delegate
--task-type document`) — 4/4 first-try, gate-verified, no cloud escalation.
This is the flagship local-first proof for the ratchet burn-down lane
(OMN-14000): mechanical, self-grading-oracle tech debt reduced by a local
model, not a frontier one.

Gate-verified: `python -m
onex_change_control.validators.arch_handler_contract_compliance --repo-root
omnimarket` — Compliant 336 -> 344 (+8 handler files), New violations 95 -> 87
(-8), Total handlers unchanged at 431. No new violations introduced.

OMN-14000
@jonahgabriel
jonahgabriel enabled auto-merge July 6, 2026 06:38
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dd47a5dc-0902-4ad2-aae3-855bc760d331

📥 Commits

Reviewing files that changed from the base of the PR and between 85241ce and 60c1020.

📒 Files selected for processing (2)
  • src/omnimarket/nodes/node_kb_adr_publisher/contract.yaml
  • src/omnimarket/nodes/node_kreuzberg_parse_effect/contract.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-14000-ratchet-canary

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

@github-actions

github-actions Bot commented Jul 6, 2026

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 Jul 6, 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)

…baseline gate

state-coverage-gate (scripts/validate_state_coverage.py, OMN-13781) grandfathers
pre-existing uncovered declared-event-topic debt via
scripts/validation/state_coverage_baseline.txt, but revokes the grandfather
clause in --strict mode for any node DIRECTLY TOUCHED by a diff. All 4 of
node_adr_canary_orchestrator, node_adr_document_ingestion_effect,
node_memory_lifecycle_orchestrator, and node_persona_lifecycle_orchestrator
are pre-listed in that baseline with genuinely uncovered output topics
(unrelated to handler_routing) — touching their contract.yaml for the
missing_handler_routing fix un-grandfathers that separate debt and fails CI.

Fixing that properly means adding real test coverage for those declared
topics — out of scope for a small, revertible ratchet-type batch (touches a
DIFFERENT ratchet: declared-state test coverage, not handler_routing). Revert
these 4 back to the legacy flat handler_routing schema for this PR; keep only
node_kb_adr_publisher and node_kreuzberg_parse_effect, which have no
state-coverage-baseline coupling and gate-verify clean on their own.

Filed OMN-14009 to track the 4 deferred nodes + the general coupling risk for
future missing_handler_routing batches.
@github-actions

github-actions Bot commented Jul 6, 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 Jul 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 7, 2026
@jonahgabriel
jonahgabriel merged commit d598fd3 into dev Jul 7, 2026
92 of 105 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14000-ratchet-canary branch July 7, 2026 17:53
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