Skip to content
Merged
69 changes: 69 additions & 0 deletions contracts/OMN-14001.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14001"
title: "feat(OMN-14001): close first platform learning loop via delegation ROI routing"
summary: >-
omnimarket PR #1629 closes the first platform learning loop by making stored context ROI outcomes influence
live delegation routing. The implementation keeps the routing reducer pure by resolving the ROI overlay
at the I/O boundary, then passing that in-memory overlay through initial resolution and escalation hops.
The change is fail-open when projection reads are unavailable and falls back to statically routable
tiers when ROI suppression would otherwise dead-end routing.
is_seam_ticket: false
interface_change: false
interfaces_touched: []
evidence_requirements:
- kind: "tests"
description: >-
Focused omnimarket unit coverage proves ROI overlay aggregation, fail-open behavior, reducer tier
flips, dispatch-port wiring, and the capture-to-read-to-decision capstone.
command: "uv run pytest tests/unit/delegation/test_roi_overlay_routing_omn14001.py -v"
- kind: "docs"
description: "Evidence document records the closed learning loop proof and live-lane caveat."
command: "test -f docs/evidence/M5-capstone-dogfood/2026-07-06-learning-loop-closed-OMN-14001.md"
- kind: "manual"
description: "Deploy-scope proof is bound by the stored PASS receipt, not by live SSH from CI."
command: "grep -q '^status: PASS$' drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml"
emergency_bypass:
enabled: false
justification: ""
follow_up_ticket_id: ""
dod_evidence:
- id: "dod-omnimarket-pr-1629"
description: >-
Consuming-PR binding: omnimarket PR #1629 at head 2a7e3c19c905d79c0517a6f004cd290a77a3bd11 carries
the ROI overlay reader, pure reducer threading, dispatch-port integration, and focused unit tests
for OMN-14001.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: "grep -q '^status: PASS$' \"$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-14001/dod-omnimarket-pr-1629/command.yaml\""
- id: "dod-learning-loop-proof"
description: >-
Proof binding: the omnimarket PR body and evidence doc record the canonical capture-to-read-to-decision
test, while explicitly noting that no live .201 readback was performed because context_roi_scores
is absent on live dev/stability lanes.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: "grep -q '^status: PASS$' \"$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-14001/dod-learning-loop-proof/command.yaml\""
- id: "dod-deploy-scope"
description: >-
Deploy-scope binding: this runtime-path delegation routing change rides the normal post-merge dev
and stability redeploy cadence; no out-of-band production deploy is in scope. The .201 dev-lane
runtime containers were observed healthy for post-merge validation.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: "grep -q '^status: PASS$' \"$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml\""
- id: "dod-occ-self"
description: >-
Self-binding OCC receipt: this onex_change_control PR carries the OMN-14001 central contract and
PASS receipts consumed by omnimarket PR #1629 via its Evidence-Source line.
source: "generated"
status: "verified"
checks:
- check_type: "command"
check_value: "grep -q '^status: PASS$' \"$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-14001/dod-occ-self/command.yaml\""
22 changes: 22 additions & 0 deletions drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
schema_version: "1.0.0"
ticket_id: OMN-14001
evidence_item_id: dod-deploy-scope
check_type: command
check_value: "grep -q '^status: PASS$' \"$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml\""
status: PASS
run_timestamp: "2026-07-06T09:50:00Z"
commit_sha: "2a7e3c19c905d79c0517a6f004cd290a77a3bd11"
runner: "codex-gpt-5"
verifier: "codex-gpt-5-verify-omn-14001"
probe_command: "ssh jonah@100.109.203.94 'docker ps --filter name=omninode-runtime'"
exit_code: 0
contract_sha256: "0f8fa157918e6e5ce751fed120a463171612ed5ee597b0f97c8d8a59835fb315"
branch: "jonah/omn-14001-roi-overlay-routing"
working_dir: "/Users/jonah/Code/omni_home/omni_worktrees/OMN-14001/omnimarket" # local-path-ok: receipt evidence for OMN-14001
probe_stdout: "omninode-runtime-effects\tUp 10 hours (healthy); omninode-runtime\tUp 10 hours (healthy)"
actual_output: >-
PASS: this runtime-path delegation routing change rides the normal post-merge dev and stability redeploy
cadence; no out-of-band production deploy is in scope. The .201 dev lane is live and healthy and will
pick up the fix on the next redeploy. Prod promotion always requires a fresh CODEOWNERS-approved grant
(OMN-13418), not requested here.
27 changes: 27 additions & 0 deletions drift/dod_receipts/OMN-14001/dod-learning-loop-proof/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14001"
evidence_item_id: "dod-learning-loop-proof"
check_type: "command"
check_value: "gh pr view 1629 --repo OmniNode-ai/omnimarket --json body --jq '.body' | grep -q 'test_learning_loop_capture_to_decision_end_to_end'"
status: PASS
contract_sha256: "0f8fa157918e6e5ce751fed120a463171612ed5ee597b0f97c8d8a59835fb315"
run_timestamp: "2026-07-06T06:45:00Z"
commit_sha: "2a7e3c19c905d79c0517a6f004cd290a77a3bd11"
runner: "codex-cli"
verifier: "codex-cli-review"
probe_command: "gh pr view 1629 --repo OmniNode-ai/omnimarket --json body --jq '.body' | grep -E 'test_learning_loop_capture_to_decision_end_to_end|context_roi_scores
is absent|No live DB read inside the pure reducer'"
probe_stdout: |
- **Pure reducer** (`delta` / `first_eligible_tier` / `next_eligible_tier`): accept the overlay as a pure INPUT and demote suppressed tiers, with a **fail-safe second pass** so ROI only re-picks among statically-routable tiers and never dead-ends routing. `roi_overlay=None` is byte-identical to the prior static decision - golden-chain replays and fresh-process/live parity (**OMN-12974**) preserved. **No live DB read inside the pure reducer** (respects the REDUCER `requires_network: false` archetype).
- **Capstone (`test_learning_loop_capture_to_decision_end_to_end`):** CAPTURE via canonical `HandlerProjectionContextRoi` -> READ-BACK via `resolve_roi_overlay` -> the SAME `code_generation` request flips `local -> cheap_cloud`. The full loop through canonical surfaces.
`replay/integration-observed` - proven capture->read->decide through canonical handlers. NOTE: a live `.201` readback is **not** possible today because `context_roi_scores` is **absent on the live dev/stability lanes** (the context-ROI experiment runner is an offline harness never run there).
actual_output: >-
PASS: PR #1629 records the core proof for OMN-14001: the reducer remains pure, the capstone test captures
context ROI outcomes through HandlerProjectionContextRoi, reads them back through resolve_roi_overlay,
and flips the same code_generation request from local to cheap_cloud. The PR also records the live-lane
caveat: no .201 mutation or live readback was performed because context_roi_scores is absent on live
dev/stability lanes.
exit_code: 0
branch: "jonah/omn-14001-roi-overlay-routing"
pr_number: 1629
27 changes: 27 additions & 0 deletions drift/dod_receipts/OMN-14001/dod-occ-self/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14001"
evidence_item_id: "dod-occ-self"
check_type: "command"
check_value: "test -f contracts/OMN-14001.yaml && test -f drift/dod_receipts/OMN-14001/dod-omnimarket-pr-1629/command.yaml
&& test -f drift/dod_receipts/OMN-14001/dod-learning-loop-proof/command.yaml && test -f drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml"
status: PASS
contract_sha256: "0f8fa157918e6e5ce751fed120a463171612ed5ee597b0f97c8d8a59835fb315"
run_timestamp: "2026-07-06T06:45:00Z"
commit_sha: "38bd0e1282721434289faf431f9d5a0c0d278325"
runner: "codex-cli"
verifier: "codex-cli-review"
probe_command: "git diff --cached --name-only origin/main"
probe_stdout: |
contracts/OMN-14001.yaml
drift/dod_receipts/OMN-14001/dod-deploy-scope/command.yaml
drift/dod_receipts/OMN-14001/dod-learning-loop-proof/command.yaml
drift/dod_receipts/OMN-14001/dod-occ-self/command.yaml
drift/dod_receipts/OMN-14001/dod-omnimarket-pr-1629/command.yaml
actual_output: >-
PASS: this onex_change_control PR carries the OMN-14001 central contract plus PASS receipts under drift/dod_receipts/OMN-14001/.
These artifacts are the central OCC evidence that omnimarket PR #1629 must reference with an Evidence-Source
line so occ-preflight and receipt verify can resolve a pinned OCC source.
exit_code: 0
branch: "jonah/omn-14001-occ-evidence"
pr_number: 3642
29 changes: 29 additions & 0 deletions drift/dod_receipts/OMN-14001/dod-omnimarket-pr-1629/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14001"
evidence_item_id: "dod-omnimarket-pr-1629"
check_type: "command"
check_value: "gh pr view 1629 --repo OmniNode-ai/omnimarket --json headRefOid,headRefName,title,state"
status: PASS
contract_sha256: "0f8fa157918e6e5ce751fed120a463171612ed5ee597b0f97c8d8a59835fb315"
run_timestamp: "2026-07-06T06:45:00Z"
commit_sha: "2a7e3c19c905d79c0517a6f004cd290a77a3bd11"
runner: "codex-cli"
verifier: "codex-cli-review"
probe_command: "gh pr view 1629 --repo OmniNode-ai/omnimarket --json number,state,headRefOid,headRefName,title
&& gh pr diff 1629 --repo OmniNode-ai/omnimarket --name-only"
probe_stdout: |
{"headRefName":"jonah/omn-14001-roi-overlay-routing","headRefOid":"2a7e3c19c905d79c0517a6f004cd290a77a3bd11","number":1629,"state":"OPEN","title":"feat(OMN-14001): close first platform learning loop - routing consults context_roi_scores"}
src/omnimarket/nodes/node_delegate_skill_orchestrator/ports/port_local_delegation_dispatch.py
src/omnimarket/nodes/node_delegation_routing_reducer/handlers/handler_delegation_routing.py
src/omnimarket/routing/roi_overlay.py
tests/unit/delegation/test_roi_overlay_routing_omn14001.py
tests/unit/nodes/node_delegate_skill_orchestrator/test_local_dispatch_escalation_omn13849.py
actual_output: >-
PASS: omnimarket PR #1629 is open at head 2a7e3c19c905d79c0517a6f004cd290a77a3bd11 on branch jonah/omn-14001-roi-overlay-routing.
The diff adds src/omnimarket/routing/roi_overlay.py, threads the resolved overlay through delegation
routing and LocalDelegationDispatchPort, and adds focused OMN-14001 delegation tests. This receipt binds
central OCC evidence to the consuming PR that will reference it with Evidence-Source.
exit_code: 0
branch: "jonah/omn-14001-roi-overlay-routing"
pr_number: 1629
Loading