Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions contracts/OMN-13150.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13150"
title: "node_projection_routing_decision DB target repoint to omnidash_analytics + runtime proof (FIX-1)"
summary: >-
FIX-1 (Phase 2.4). The projection node node_projection_routing_decision writes agent_routing_decisions.
Its runtime DSN resolvers (RoutingDecisionProjectionRunner via ModelProjectionRuntimeBinding.from_legacy_settings,
and the projection-API reader api_server._projection_database_binding_from_settings) BOTH resolve omnidash_analytics_db_url
FIRST, ignoring the contract db_io database field. The prior OMN-13127 repoint to omnibase_infra fed
ONLY the canonical message_dispatch_engine path (handler_wiring._DB_URL_ENV_MAP), splitting the writer
DSN from the reader DSN, and the table never existed in omnidash_analytics. Every sibling projection
table lives in omnidash_analytics — the canonical projection DB. Fix: repoint the contract database
field to omnidash_analytics; add a per-node forward migration creating agent_routing_decisions there
(owned by this node, vendored into omnibase_infra forward/nodes/); flip metadata ddl_owner to the node;
expose the table over the projection API. Proven on the dev lane with a 3-part runtime triple (write
via the real handler / read-back / projection-API HTTP 200).
is_seam_ticket: false
interface_change: false
interfaces_touched: []
emergency_bypass:
enabled: false
justification: ""
follow_up_ticket_id: ""
dod_evidence:
- id: "dod-market-pr"
description: >-
omnimarket PR #1218 (branch jonah/omn-13150-routing-decision-db-repoint, base=dev, head fd5fc09d).
Repoints node_projection_routing_decision contract database -> omnidash_analytics, adds per-node
migration migrations/0021_create_agent_routing_decisions.sql, flips metadata ddl_owner to the node,
exposes the table over the projection API, and updates the golden-chain ownership tests. Full suite
(4 splits) GREEN: 7374 passed, 72 skipped, 0 failed; ruff clean; mypy --strict clean; pre-commit
passes.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml"
&& grep -q '^ticket_id: "OMN-13150"$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml"
- id: "dod-deploy-runtime-proof"
description: >-
Deploy/runtime proof on the dev lane (.201, mutable + pre-authorized). DDL applied to the live omnidash_analytics
DB via `docker exec omnibase-infra-postgres psql -d omnidash_analytics -f -`; then the REAL RoutingDecisionProjectionRunner.project_event
(run inside the live omnimarket-projection-api container) resolved omnidash_analytics, wrote row
965b9edd, read it back, and the real projection-API HTTP handler returned that row (HTTP 200, row_count=1).
docker exec is the deploy-class action.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml"
- id: "dod-occ-pr"
description: >-
Paired OCC receipt PR in onex_change_control (this PR) carries the contract + PASS receipts for
OMN-13150 with Evidence-Source 653c6470 (omnimarket dev HEAD the work branched from).
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-13150/dod-occ-pr/command.yaml"
48 changes: 48 additions & 0 deletions drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13150"
evidence_item_id: "dod-deploy-runtime-proof"
check_type: "command"
check_value: >-
docker exec omnibase-infra-postgres psql -U postgres -d omnidash_analytics -c "SELECT id, selected_agent
FROM agent_routing_decisions WHERE id='965b9edd-d06d-4783-be84-70e21c55057b';"
contract_sha256: "sha256:d4844bc734d8e44235988002c393fe7357cb35472a5e134a46edb0a0858fa4c4"
status: PASS
run_timestamp: "2026-06-14T17:34:00Z"
commit_sha: "c73f21483a237f590314a54a0eabe322fb364655"
runner: "worktree-agent-omn-13150-fix1"
verifier: "dev-lane-201-postgres-projection-api"
probe_command: >-
Dev lane (.201, mutable + pre-authorized). (1) Apply DDL to live omnidash_analytics: docker exec -i
omnibase-infra-postgres psql -d omnidash_analytics -v ON_ERROR_STOP=1 -f 0021_create_agent_routing_decisions.sql.
(2) WRITE via the REAL handler inside the live omnimarket-projection-api container: docker exec omnimarket-projection-api
python runtime_proof_harness.py. (3) READ-BACK independently: docker exec omnibase-infra-postgres psql
-d omnidash_analytics -c "SELECT ... WHERE id='965b9edd...'". (4) PROJECTION-API HTTP: docker exec omnimarket-projection-api
python projection_api_proof.py <corr>.
probe_stdout: |
# (1) DDL applied to live omnidash_analytics:
$ docker exec -i omnibase-infra-postgres psql -d omnidash_analytics -f 0021_create_agent_routing_decisions.sql
CREATE TABLE
CREATE INDEX
COMMENT
$ psql -d omnidash_analytics -tAc "SELECT to_regclass('public.agent_routing_decisions'), count(*), <ncols>"
agent_routing_decisions|0|13
# (2) WRITE via real handler (DSN resolved by real runtime binding):
RESOLVED_DSN=postgresql://****@postgres:5432/omnidash_analytics
RUNTIME_BINDING_SOURCE=legacy-settings
PROJECT_EVENT_OK=True
WROTE_ID=965b9edd-d06d-4783-be84-70e21c55057b
# (3) READ-BACK (independent psql, verifier != writer):
965b9edd-d06d-4783-be84-70e21c55057b|claude-opus-runtime-proof|OMN-13150-FIX1-RUNTIME-PROOF|0.9876
# (4) PROJECTION-API real FastAPI handler over HTTP:
TOPIC_EXPOSED=True
TOPIC_TABLE=agent_routing_decisions STATUS=ok
HTTP_STATUS=200
ROW_COUNT=1
actual_output: >-
PASS: 3-part dev-lane runtime triple proven. The real RoutingDecisionProjectionRunner resolved omnidash_analytics
(the post-fix contract target), wrote row 965b9edd, the row was read back by an independent psql verifier,
and the real projection-API HTTP handler returned it (HTTP 200, row_count=1). docker exec is the deploy-class
action; the only durable dev-lane mutation is the new DDL + the single proof row. Container contract
swap reverted; projection-api /health = {"status":"ok","postgres":"ok"}. Full evidence (with harnesses):
omni_home docs/evidence/2026-06-14-post-closeout/OMN-13150-routing-decision-db-repoint-runtime-proof.md.
35 changes: 35 additions & 0 deletions drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13150"
evidence_item_id: "dod-market-pr"
check_type: "command"
check_value: "uv run pytest tests/ -m 'not kafka' --splits 4 --group 1"
contract_sha256: "sha256:d4844bc734d8e44235988002c393fe7357cb35472a5e134a46edb0a0858fa4c4"
status: PASS
run_timestamp: "2026-06-14T17:30:00Z"
commit_sha: "c73f21483a237f590314a54a0eabe322fb364655"
runner: "worktree-agent-omn-13150-fix1"
verifier: "receipt-gate-ci"
probe_command: >-
Full omnimarket suite in 4 splits (no -k filter): uv run pytest tests/ -m "not kafka" --splits N --group
G; plus uv run mypy src/omnimarket/ --strict; plus ruff format/check; plus pre-commit run --files <changed>.
probe_stdout: |
$ uv run pytest tests/ -m "not kafka" --splits 4 --group 1
1831 passed, 31 skipped, 5590 deselected, 1 warning in 95.40s
$ uv run pytest tests/ -m "not kafka" --splits 4 --group 2
1857 passed, 5 skipped, 5590 deselected, 5 warnings in 83.52s
$ uv run pytest tests/ -m "not kafka" --splits 4 --group 3
1860 passed, 2 skipped, 5590 deselected, 35 warnings in 60.02s
$ uv run pytest tests/ -m "not kafka" --splits 4 --group 4
1826 passed, 34 skipped, 5592 deselected, 1 warning in 56.68s
# aggregate: 7374 passed, 72 skipped, 0 failed
$ uv run mypy src/omnimarket/ --strict
Success: no issues found in 2347 source files
$ uv run pytest tests/test_golden_chain_projection_routing_decision.py -v
15 passed in 0.27s
actual_output: >-
PASS: omnimarket PR #1218 (branch jonah/omn-13150-routing-decision-db-repoint, base=dev, head fd5fc09d)
repoints node_projection_routing_decision contract database -> omnidash_analytics, adds the per-node
migration migrations/0021_create_agent_routing_decisions.sql, flips metadata ddl_owner to the node,
exposes the table over the projection API, and updates the golden-chain ownership tests. Full suite
GREEN (7374 passed, 72 skipped, 0 failed), mypy --strict clean, ruff clean, pre-commit passes.
30 changes: 30 additions & 0 deletions drift/dod_receipts/OMN-13150/dod-occ-pr/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13150"
evidence_item_id: "dod-occ-pr"
check_type: "command"
check_value: "test -f contracts/OMN-13150.yaml && test -f drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml
&& test -f drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml"
contract_sha256: "sha256:d4844bc734d8e44235988002c393fe7357cb35472a5e134a46edb0a0858fa4c4"
status: PASS
run_timestamp: "2026-06-14T17:36:00Z"
commit_sha: "c73f21483a237f590314a54a0eabe322fb364655"
runner: "worktree-agent-omn-13150-fix1"
verifier: "receipt-gate-ci"
probe_command: >-
test -f contracts/OMN-13150.yaml && ls drift/dod_receipts/OMN-13150/ && grep '^status: PASS$' drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml
drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml
probe_stdout: |
$ test -f contracts/OMN-13150.yaml && echo present
present
$ ls drift/dod_receipts/OMN-13150/
dod-deploy-runtime-proof dod-market-pr dod-occ-pr
$ grep '^status: PASS$' drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml
drift/dod_receipts/OMN-13150/dod-market-pr/command.yaml:status: PASS
drift/dod_receipts/OMN-13150/dod-deploy-runtime-proof/command.yaml:status: PASS
actual_output: >-
PASS: This onex_change_control PR (branch jonah/omn-13150-occ-receipt, base=dev) is the paired OCC receipt
carrier for omnimarket PR #1218 and omnibase_infra PR #1985. It ships contracts/OMN-13150.yaml (the
canonical ticket contract with deploy-class dod_evidence) and PASS receipts under drift/dod_receipts/OMN-13150/.
Evidence-Source SHA is 653c6470 (omnimarket dev HEAD the work branched from). Pairing satisfies the
Receipt Gate + Deploy Gate on the caller PRs.
Loading