Repository navigation
refactor(OMN-10872,OMN-10873): add protocol injection seams to NavigationHistoryReducer and OverseerBenchmarker - #693
Conversation
…tionHistoryReducer and OverseerBenchmarker OMN-10872: introduce ProtocolNavigationHistoryWriter with record()/close() methods; HandlerNavigationHistoryReducer.__init__ now accepts ProtocolNavigationHistoryWriter | None instead of the concrete class. Concrete HandlerNavigationHistoryWriter satisfies the protocol structurally. OMN-10873: introduce ProtocolLlmEvalHarness with handle() method; NodeOverseerBenchmarker.__init__ now accepts ProtocolLlmEvalHarness | None instead of NodeLlmEvalHarness. Default construction still works unchanged. Both follow the optional-di-fallback pattern established in OMN-10751/10752. New DI injection tests verify protocol satisfaction, injection routing, shutdown propagation, and default-construction fallback. 4087 tests pass.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR implements protocol-based dependency injection refactoring for two handlers: ChangesProtocol-Based Dependency Injection Refactor
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 unit tests (beta)
Comment |
|
| 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_navigation_history_reducer/handlers/handler_navigation_history_reducer.py:500: handler = HandlerNavigationHistoryReducer()
src/omnimarket/nodes/node_navigation_history_reducer/handlers/handler_navigation_history_reducer.py:535: self._writer = HandlerNavigationHistoryWriter(\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
✅ PR Review Bot — CLEANFindings: 0
Verdict semantics
Powered by node_pr_review_bot — FSM pipeline with multi-model review fan-out |
|
| 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)
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 `@docs/plans/2026-05-17-omn-10872-di-refactor-nav-history-benchmarker.md`:
- Around line 1-14: The document and filename contain internal ticket
identifiers; remove all occurrences of "OMN-10872" and "OMN-10873" from the
title, the "Tickets" section, and section headers in the file
(docs/plans/...-omn-10872-di-refactor-nav-history-benchmarker.md) and replace
them with a concise descriptive feature name (e.g., "DI Refactor —
NavigationHistoryWriter & LlmEvalHarness"); also either move the file out of
docs/ to an internal plan location or rename the file to remove ticket IDs while
keeping the date and a descriptive slug, and update any mentions of
ProtocolNavigationHistoryWriter, HandlerNavigationHistoryReducer, and
HandlerNavigationHistoryWriter to ensure they remain correct after renaming.
🪄 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: 9a4fe877-f3a1-42d5-add4-7f8c26bac778
📒 Files selected for processing (8)
docs/plans/2026-05-17-omn-10872-di-refactor-nav-history-benchmarker.mdsrc/omnimarket/nodes/node_llm_eval_harness/handlers/handler_llm_eval_harness.pysrc/omnimarket/nodes/node_navigation_history_reducer/__init__.pysrc/omnimarket/nodes/node_navigation_history_reducer/handlers/__init__.pysrc/omnimarket/nodes/node_navigation_history_reducer/handlers/handler_navigation_history_reducer.pysrc/omnimarket/nodes/node_overseer_benchmarker/handlers/handler_overseer_benchmarker.pytests/test_di_injection_navigation_history_reducer.pytests/test_di_injection_overseer_benchmarker.py
…Wave 2 Contracts for HandlerNavigationHistoryReducer protocol injection seam (OMN-10872) and NodeOverseerBenchmarker harness injection seam (OMN-10873). Both are seam tickets with unit-test and PR-merge evidence. omnimarket PR: OmniNode-ai/omnimarket#693
|
… 2 (#1113) * feat(OMN-10872,OMN-10873): add OCC contracts and dod receipts for DI Wave 2 Contracts for HandlerNavigationHistoryReducer protocol injection seam (OMN-10872) and NodeOverseerBenchmarker harness injection seam (OMN-10873). Both are seam tickets with unit-test and PR-merge evidence. omnimarket PR: OmniNode-ai/omnimarket#693 * fix(OMN-10872,OMN-10873): add dod-deploy receipts, pin commit SHA in all receipts * fix(OMN-10872,OMN-10873): fix receipts — accurate PR state, add commit_sha, add repo fields * fix(OMN-10872,OMN-10873): rewrite receipts to canonical ModelDodReceipt schema Receipts previously used a custom flat schema with fields like evidence_id, description, repo, command, output, recorded_at which fail ModelDodReceipt Pydantic validation (15 errors per receipt). Rewrites all 6 receipts to use the canonical schema with schema_version, evidence_item_id, check_type, check_value, run_timestamp, runner, verifier, probe_command, probe_stdout. Updates commit_sha from stale 723e68ce to live omnimarket #693 head eed1dc53 (verified live via gh pr view) and propagates to contract grep patterns. Adds dod-occ-pr-1113 self-binding receipts for both tickets so receipt-gate pr_ticket_mismatch resolves. * chore: retrigger CI with updated PR body (Evidence-Ticket lines) * chore: reset stale CodeRabbit Thread Check rollup * fix(OMN-10872): clarify cross-repo provenance in dod-unit-tests-pass receipt CodeRabbit flagged that actual_output claimed tests ran in omnimarket but working_dir pointed to onex_change_control. Added pr_repo field and clarified that OCC is the canonical evidence registry while execution happened in the omnimarket worktree. * fix(OMN-10872): restore schema-compliant receipt fields Previous fix added pr_repo (rejected by ModelDodReceipt as extra field) and made working_dir a free-text string (schema requires absolute path). Restore schema compliance: working_dir back to absolute omnimarket worktree path, cross-repo provenance documented in actual_output instead.



Summary
ProtocolNavigationHistoryWriter(record/close) tohandler_navigation_history_reducer.py;HandlerNavigationHistoryReducer.__init__now acceptsProtocolNavigationHistoryWriter | Noneinstead of the concrete class. Default construction still buildsHandlerNavigationHistoryWriterunchanged.ProtocolLlmEvalHarness(handle) tohandler_llm_eval_harness.py;NodeOverseerBenchmarker.__init__now acceptsProtocolLlmEvalHarness | Noneinstead ofNodeLlmEvalHarness. Default construction still buildsNodeLlmEvalHarnessunchanged.test_di_injection_navigation_history_reducer.py(6 tests) andtest_di_injection_overseer_benchmarker.py(6 tests) verify protocol satisfaction, injection routing, shutdown propagation, and default-construction fallback.Verification
uv run pytest tests/ -v --tb=short -m "not kafka")uv run mypy src/omnimarket/nodes/node_navigation_history_reducer/ src/omnimarket/nodes/node_llm_eval_harness/ src/omnimarket/nodes/node_overseer_benchmarker/ --strict→ success, no issuesuv run ruff check src/ tests/→ all checks passedEvidence-Ticket
OMN-10872, OMN-10873
Summary by CodeRabbit
New Features
Tests
Documentation
Evidence-Source: OCC#1113
Evidence-Ticket: OMN-10872