Skip to content

contract(OMN-10846,OMN-10847,OMN-10848): add OCC contracts and DoD evidence for canary→routing feedback loop - #942

Merged
jonahgabriel merged 6 commits into
mainfrom
jonah/omn-10846-10847-10848-dod-contracts
May 12, 2026
Merged

jonahgabriel merged 6 commits into
mainfrom
jonah/omn-10846-10847-10848-dod-contracts

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • OMN-10846: contract + evidence for build_available_models_from_scores() capability_scores bridge
  • OMN-10847: contract + evidence for ModelMaterializeResult + routing_outcomes.quality_score population
  • OMN-10848: contract + evidence for proof-of-life integration test (canary → scores → routing)

All three tickets delivered via PR #606 on OmniNode-ai/omnimarket (merge commit 1af2f16a1c7d10a1f9392288f6cd63a8a1473957). PRs #604 and #605 were closed as superseded after cherry-pick into #606.

DoD Evidence

All checks run against PR #606 diff and verified PASS:

OMN-10846 — bridge function build_available_models_from_scores() confirmed in diff, caller-side only (no handler modification)

OMN-10847 — ModelMaterializeResult type and quality_score column population confirmed in diff

OMN-10848 — test_integration_feedback_loop.py confirmed in diff; qwen3-coder-30b selected as champion (0.94 vs 0.70 recall); quality_score > 0.0 assertion present

Test plan

Summary by CodeRabbit

  • Chores
    • Added verification contracts and evidence records for three routing improvements: converting capability scores into available models for routing, populating routing outcome quality scores from canary grading, and an end-to-end canary→scores→routing feedback-loop proof-of-life.

Review Change Stack

…idence for canary→routing feedback loop tickets

All three tickets delivered via PR #606 on OmniNode-ai/omnimarket (merge commit 1af2f16a1c7d10a1f9392288f6cd63a8a1473957).
PRs #604 and #605 were closed as superseded after cherry-pick into #606.

- OMN-10846: build_available_models_from_scores() bridge (capability_scores → routing policy)
- OMN-10847: ModelMaterializeResult + routing_outcomes.quality_score population
- OMN-10848: Proof-of-life integration test (canary → scores → routing, pure in-memory)
@coderabbitai

coderabbitai Bot commented May 11, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ca0c241a-cc0b-44ac-b8a3-32231d3b3556

📥 Commits

Reviewing files that changed from the base of the PR and between e3986be and d31a2b1.

📒 Files selected for processing (16)
  • contracts/OMN-10846.yaml
  • contracts/OMN-10847.yaml
  • contracts/OMN-10848.yaml
  • drift/dod_receipts/OMN-10846/dod-bridge-function-exists/command.yaml
  • drift/dod_receipts/OMN-10846/dod-no-handler-modification/command.yaml
  • drift/dod_receipts/OMN-10846/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10846/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-materialize-result-type/command.yaml
  • drift/dod_receipts/OMN-10847/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10847/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-quality-score-populated/command.yaml
  • drift/dod_receipts/OMN-10848/dod-champion-selection/command.yaml
  • drift/dod_receipts/OMN-10848/dod-full-chain-test/command.yaml
  • drift/dod_receipts/OMN-10848/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10848/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml
✅ Files skipped from review due to trivial changes (12)
  • drift/dod_receipts/OMN-10846/dod-bridge-function-exists/command.yaml
  • drift/dod_receipts/OMN-10846/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10847/dod-materialize-result-type/command.yaml
  • drift/dod_receipts/OMN-10848/dod-full-chain-test/command.yaml
  • drift/dod_receipts/OMN-10846/dod-no-handler-modification/command.yaml
  • drift/dod_receipts/OMN-10846/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml
  • drift/dod_receipts/OMN-10847/dod-quality-score-populated/command.yaml
  • drift/dod_receipts/OMN-10848/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10847/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-champion-selection/command.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • drift/dod_receipts/OMN-10847/dod-occ-pr/command.yaml
  • contracts/OMN-10846.yaml
  • contracts/OMN-10847.yaml
  • contracts/OMN-10848.yaml

📝 Walkthrough

Walkthrough

Adds three ticket contracts (OMN-10846/10847/10848) plus JSON evidence reports and YAML DOD/drift receipts that verify PR #606 implements a caller-side bridge, materialize() quality-score emission, and an end-to-end canary→scores→routing proof-of-life.

Changes

Canary Feedback Loop Tickets & Evidence

Layer / File(s) Summary
OMN-10846: Builder Function Contract
contracts/OMN-10846.yaml
Contract for a caller-side build_available_models_from_scores() bridge converting capability_scores rows to ModelAvailableModel instances; marks interface_change: false, lists evidence commands and DOD checks.
OMN-10847: Quality Score Population Contract
contracts/OMN-10847.yaml
Contract requiring materialize() to emit capability_scores and routing_outcomes rows with routing_outcomes.quality_score populated (via ModelMaterializeResult), plus evidence commands and DOD checks.
OMN-10848: Integration Proof of Life Contract
contracts/OMN-10848.yaml
Contract specifying end-to-end proof-of-life checks for canary→scores→routing: PR merge/commit verification, in-memory chain test, champion selection expectations, and non-zero quality_score assertions.
Evidence Reports
evidence/OMN-10846/dod_report.json, evidence/OMN-10847/dod_report.json, evidence/OMN-10848/dod_report.json
Three JSON evidence files recording PASS verification metadata and captured outputs tied to PR #606 for the respective tickets.
Drift / DOD Receipts (command.yaml)
drift/dod_receipts/OMN-10846/*, drift/dod_receipts/OMN-10847/*, drift/dod_receipts/OMN-10848/*
Multiple YAML command receipts capturing gh/pytest probe commands, probe_stdout, run timestamps, commit SHAs, verifiers, PASS statuses, and referenced PR numbers for the DOD checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through contracts, neat and bright,
A bridge, a score, and tests in sight.
Receipts stamped PASS, the loop confirmed,
PRs and reports all duly affirmed. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main changeset: adding OCC contracts and DoD evidence for three specific tickets (OMN-10846, OMN-10847, OMN-10848) that implement a canary-to-routing feedback loop. It is concise, clear, and specific to the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-10846-10847-10848-dod-contracts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@contracts/OMN-10846.yaml`:
- Around line 42-48: The DoD claim and the command check are mismatched: the
policy asserts "HandlerRoutingPolicy" is not modified but the check only
verifies existence of build_available_models_from_scores; update the command
under the check (or replace it) to explicitly verify no handler files or the
symbol HandlerRoutingPolicy were changed (e.g., run a git diff/name-only against
the PR and grep for files or symbols containing "HandlerRoutingPolicy" or
handler directory names) so the check fails if any handler-related files or the
HandlerRoutingPolicy symbol are modified; keep the existing
build_available_models_from_scores check only if needed and ensure the
id/description reflect the actual check.

In `@contracts/OMN-10848.yaml`:
- Around line 49-54: The check with id "dod-quality-score-nonzero" only greps
for the token "quality_score" and does not validate the numeric value; update
the check_value (under check_type "command") to run a command that extracts the
quality_score occurrences from the PR diff (the current check_value string) and
asserts the numeric value is greater than 0.0 (for example by parsing the diff
with awk/jq/grep -P and numeric comparison), so the contract actually verifies
quality_score > 0.0 rather than merely the presence of the token.
🪄 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: 49985dd4-dbd7-4d99-a973-6bcfd9742d34

📥 Commits

Reviewing files that changed from the base of the PR and between 3a69e1d and cfe9a90.

📒 Files selected for processing (6)
  • contracts/OMN-10846.yaml
  • contracts/OMN-10847.yaml
  • contracts/OMN-10848.yaml
  • evidence/OMN-10846/dod_report.json
  • evidence/OMN-10847/dod_report.json
  • evidence/OMN-10848/dod_report.json

Comment thread contracts/OMN-10846.yaml Outdated
Comment thread contracts/OMN-10848.yaml Outdated
@jonahgabriel
jonahgabriel enabled auto-merge (squash) May 12, 2026 15:45
…vidence receipts for verify gate

- Add dod-occ-pr evidence item to OMN-10846, OMN-10847, OMN-10848 contracts
- Create drift/dod_receipts YAML for all dod_evidence items across all three tickets
- Fix dod-no-handler-modification check_value to use grep '^+.*def' prefix
- Fix dod-quality-score-nonzero check_value to assert quality_score > 0.0
- Address CodeRabbit threads on evidence description mismatches

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml`:
- Around line 6-7: The probe's regex allows any "assert.*quality_score" to pass
without requiring a >0.0 check; update the check_value regex (and the other
identical occurrences around Lines 13-19) so the pattern requires an explicit
greater-than comparison. Replace the alternation with a pattern that enforces ">
0.0" in both raw and assert forms, e.g. use a single grep -E pattern like
(quality_score.*>\s*0\.0|assert.*quality_score.*>\s*0\.0) so PASS only occurs
when quality_score > 0.0 is actually asserted.
- Line 10: The receipt's commit_sha field in command.yaml is incorrect
(currently set to cfe9a908); update the commit_sha value to the actual head SHA
of the external PR (5a3dd07bf18cea9554bb71f9bcaa684bacdacdc7). Locate the
commit_sha key in the dod-quality-score-nonzero/command.yaml and replace the old
SHA with the new one so the provenance points to the correct
OmniNode-ai/omnimarket PR head.
🪄 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: e996ed06-356c-49c9-860d-0530f521b829

📥 Commits

Reviewing files that changed from the base of the PR and between cfe9a90 and e3986be.

📒 Files selected for processing (16)
  • contracts/OMN-10846.yaml
  • contracts/OMN-10847.yaml
  • contracts/OMN-10848.yaml
  • drift/dod_receipts/OMN-10846/dod-bridge-function-exists/command.yaml
  • drift/dod_receipts/OMN-10846/dod-no-handler-modification/command.yaml
  • drift/dod_receipts/OMN-10846/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10846/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-materialize-result-type/command.yaml
  • drift/dod_receipts/OMN-10847/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10847/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-quality-score-populated/command.yaml
  • drift/dod_receipts/OMN-10848/dod-champion-selection/command.yaml
  • drift/dod_receipts/OMN-10848/dod-full-chain-test/command.yaml
  • drift/dod_receipts/OMN-10848/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-10848/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml
✅ Files skipped from review due to trivial changes (11)
  • drift/dod_receipts/OMN-10848/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10848/dod-full-chain-test/command.yaml
  • drift/dod_receipts/OMN-10846/dod-pr-merged/command.yaml
  • drift/dod_receipts/OMN-10847/dod-quality-score-populated/command.yaml
  • drift/dod_receipts/OMN-10847/dod-materialize-result-type/command.yaml
  • drift/dod_receipts/OMN-10846/dod-no-handler-modification/command.yaml
  • drift/dod_receipts/OMN-10846/dod-bridge-function-exists/command.yaml
  • drift/dod_receipts/OMN-10848/dod-champion-selection/command.yaml
  • contracts/OMN-10848.yaml
  • contracts/OMN-10846.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • contracts/OMN-10847.yaml

Comment thread drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml Outdated
Comment thread drift/dod_receipts/OMN-10848/dod-quality-score-nonzero/command.yaml Outdated
…with receipt-check pattern

Switch dod_evidence check_values from inline `gh pr diff 606 -R omnimarket`
commands to `grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/...`
to comply with the legacy-gh-pr lint rule (OMN-9350) that forbids hardcoded
PR numbers in gh pr commands.
…upstream PR receipts

Set commit_sha to 5a3dd07b (omnimarket PR #606 head SHA) in all receipts
that document omnimarket evidence. Previously had the OCC branch SHA
which misrepresents the provenance of the upstream evidence.
Remove the loose |assert.*quality_score fallback from the probe regex.
The actual diff output confirms quality_score.*>.*0.0 matches directly,
so the tighter form is both accurate and avoids false-positive via None-check.
…ceipt-check approach

The description previously said "diff shows only X added" but the check
reads a receipt file — mismatched claim/verification. Updated to say
"verified via receipt" to match the actual check pattern.
@jonahgabriel
jonahgabriel merged commit 71c7319 into main May 12, 2026
29 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-10846-10847-10848-dod-contracts branch May 12, 2026 17:56
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