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
61 changes: 61 additions & 0 deletions contracts/OMN-13196.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13196"
title: "B4: delete ModelOnexEnvelope entirely + retarget tests + clean cross-repo references"
summary: >-
Completes the envelope-dedup workstream by deleting the legacy ModelOnexEnvelope class and collapsing
the canonical envelope surface to ModelEventEnvelope[T]. omnibase_core deletes src/omnibase_core/models/core/model_onex_envelope.py
and its 2 exports in models/core/__init__.py, deletes the 4 ModelOnexEnvelope-specific test files (test_model_onex_envelope.py,
test_model_onex_envelope_source_node_id.py, test_model_onex_envelope_chunking.py, and the perf benchmark
test_source_node_id_overhead.py — these exercised ModelOnexEnvelope's own fields, source_node_id/chunking/operation,
which have no ModelEventEnvelope equivalent), and retargets tests/unit/validation/test_envelope_validator.py
to a minimal frozen Pydantic stub because the surviving EnvelopeValidator is duck-typed (getattr) over
dispatch-routing fields (source_node/operation/target_node) that ModelEventEnvelope[T] does not carry.
Stale docstring/comment references in model_envelope_metadata.py, model_chunked_envelope.py, type_serializable_value.py,
and the mixin_metadata.yaml `requires` entry are retargeted to ModelEventEnvelope. A coordinated omnibase_infra
PR retargets the one live ModelOnexEnvelope import in tests/performance/test_production_benchmarks.py
(the _make_envelope helper, used only for model_dump_json() serialization in the benchmarks) to ModelEventEnvelope[dict[str,
Any]] and corrects two stale src docstrings, so omnibase_infra stays green after the core deletion.
Grep across all repos under omni_home shows zero ModelOnexEnvelope references in src + tests after this
phase. No Kafka topic schema change, no DDL/migration, no runtime/deploy/.201 mutation. Predecessor
B3 (OMN-13194, impl PR #1248) is MERGED to dev (merge commit b7ed3f0f0845f7ccd26f84473841b8061afb7d98,
the base of this work).
is_seam_ticket: false
interface_change: false
interfaces_touched: []
emergency_bypass:
enabled: false
justification: ""
follow_up_ticket_id: ""
dod_evidence:
- id: "pr-omnibase_core"
description: >-
omnibase_core implementation PR (branch jonah/omn-13196-delete-modelonexenvelope, base dev) deletes
ModelOnexEnvelope + its exports + 4 envelope-specific test files and retargets the validator test
fixture and stale docstrings. The paired OCC receipt drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml
binds the code PR head sha (commit_sha) and OCC PR number (pr_number) with status PASS, and records
the zero-ModelOnexEnvelope grep proof plus green gate results (ruff clean, mypy --strict no new
errors, validator suite 40 passed, full pytest green modulo pre-existing xdist flakes).
source: "manual"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml && grep
-q '^pr_number: 2686$' drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml && grep -q
'^commit_sha: "a77ef5ecb2e7bb7b7f6761fb7468f5741e9cde23"$' drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml
- id: "pr-omnibase_infra"
description: >-
omnibase_infra coordinated implementation PR (branch jonah/omn-13196-drop-modelonexenvelope-ref,
base dev) retargets the one live ModelOnexEnvelope import in tests/performance/test_production_benchmarks.py
to ModelEventEnvelope[dict[str, Any]] and corrects two stale src docstrings (mixin_kafka_broadcast.py,
handler_llm_openai_compatible.py) so the repo stays green after the core deletion. The paired OCC
receipt drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml binds the code PR head sha and
OCC PR number with status PASS, and records the zero-ModelOnexEnvelope grep proof plus green gate
results (ruff clean, mypy --strict on changed src Success, perf benchmark 13 passed).
source: "manual"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml && grep
-q '^pr_number: 2686$' drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml && grep -q
'^commit_sha: "57f66e31f8de1d7f079ed7919124df518d68eda0"$' drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml
62 changes: 62 additions & 0 deletions drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13196"
evidence_item_id: "pr-omnibase_core"
check_type: "command"
check_value: "grep -q '^status: PASS$' drift/dod_receipts/OMN-13196/pr-omnibase_core/command.yaml"
status: PASS
run_timestamp: "2026-06-17T14:07:18-00:00"
commit_sha: "a77ef5ecb2e7bb7b7f6761fb7468f5741e9cde23"
contract_sha256: "sha256:4f4d4fd55af813f7ebca221ccabf3f7f04d61d2a394158c55aaf29edff28e21b"
branch: "jonah/omn-13196-delete-modelonexenvelope"
pr_number: 2686
runner: "omn-13196-impl"
verifier: "receipt-gate-local"
probe_command: "grep -rniE 'ModelOnexEnvelope|model_onex_envelope' src/ tests/ | wc -l ; gh pr view 1250
--repo OmniNode-ai/omnibase_core --json number,headRefName,headRefOid,state"
probe_stdout: |
# grep -rniE 'ModelOnexEnvelope|model_onex_envelope' src/ tests/ | wc -l -> 0
# ZERO ModelOnexEnvelope references remain in omnibase_core src + tests after this phase.
# Deleted: src/omnibase_core/models/core/model_onex_envelope.py (the class) + its 2 exports
# in models/core/__init__.py; deleted the 4 ModelOnexEnvelope-specific test files
# (test_model_onex_envelope.py, test_model_onex_envelope_source_node_id.py,
# test_model_onex_envelope_chunking.py, tests/performance/test_source_node_id_overhead.py).
# Retargeted tests/unit/validation/test_envelope_validator.py to a frozen Pydantic stub
# (_ValidatorEnvelope) since EnvelopeValidator is duck-typed and ModelEventEnvelope[T] lacks
# the dispatch-routing fields. Retargeted stale docstring/comment refs in
# model_envelope_metadata.py / model_chunked_envelope.py / type_serializable_value.py and the
# mixin_metadata.yaml `requires` entry to ModelEventEnvelope.
number=1250
headRefName=jonah/omn-13196-delete-modelonexenvelope
headRefOid=a77ef5ecb2e7bb7b7f6761fb7468f5741e9cde23
state=OPEN
actual_output: >-
PASS: ModelOnexEnvelope is deleted from omnibase_core src + tests (impl PR #1250, head a77ef5ecb2e7bb7b7f6761fb7468f5741e9cde23,
base dev). grep -rniE 'ModelOnexEnvelope|model_onex_envelope' over src/ + tests/ returns 0 — zero references
remain. The class file src/omnibase_core/models/core/model_onex_envelope.py and its import + __all__
export in models/core/__init__.py are removed. Four ModelOnexEnvelope-specific test files are deleted
because they exercised the class's own fields (source_node_id, chunking, operation) which have no ModelEventEnvelope
equivalent: tests/unit/models/test_model_onex_envelope.py, tests/unit/models/test_model_onex_envelope_source_node_id.py,
tests/unit/models/chunking/test_model_onex_envelope_chunking.py, and the perf benchmark tests/performance/test_source_node_id_overhead.py.
tests/unit/validation/test_envelope_validator.py is retargeted: the surviving EnvelopeValidator reads
every field via getattr(envelope, ..., None) (duck-typed), and the canonical ModelEventEnvelope[T] does
not carry the dispatch-routing fields the validator reads (source_node/operation/target_node), so the
ModelOnexEnvelope fixture is replaced with a minimal frozen Pydantic stub (_ValidatorEnvelope) exposing
exactly those attributes — 40/40 validator tests pass. Stale docstring/comment references to the deleted
class in model_envelope_metadata.py, model_chunked_envelope.py, type_serializable_value.py, and the
mixin_metadata.yaml MixinIntentPublisher `requires` entry (which pointed at the already-wrong models.events.model_onex_envelope
path) are retargeted to ModelEventEnvelope. Gates green: ruff format + ruff check --fix (All checks
passed); mypy src/ --strict introduces zero NEW errors (the 3 pre-existing errors in untouched contract_loader.py
/ cli_install.py reproduce on clean origin/dev and are not in this diff); tests/unit/validation/test_envelope_validator.py
40 passed; FULL pytest tests/ -n 8 (no -k) 41576 passed, 65 skipped, 12 xfailed, 43 xpassed. The 21
full-suite failures are full-suite-only xdist ordering flakes (RegistryNode forward-ref model_rebuild()
contamination in tests/unit/navigation/* and DI-singleton contamination in test_protocol_auditor / test_model_action_registry)
— all 21 PASS in isolation (48/48 serial; the navigation subset also passes 46/46 under its own -n 8
run on clean dev), and none reference envelopes or any file in this diff. pre-commit run --all-files:
all hooks pass (DETERMINISTIC_SKILL_ROOT pinned to an omniclaude@main snapshot for CI parity — a known
sibling-worktree false-positive when pointed at the live clone with incomplete SKILL.md state). Predecessor
B3 (OMN-13194, PR #1248) is MERGED to dev (b7ed3f0f0845f7ccd26f84473841b8061afb7d98, the base of this
branch). This receipt is the grep-target consumed by the check_value in contracts/OMN-13196.yaml (contract
bytes hash to sha256:4f4d4fd55af813f7ebca221ccabf3f7f04d61d2a394158c55aaf29edff28e21b).
exit_code: 0
working_dir: "/Users/jonah/Code/omni_home/omni_worktrees/OMN-13196/onex_change_control"
47 changes: 47 additions & 0 deletions drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-13196"
evidence_item_id: "pr-omnibase_infra"
check_type: "command"
check_value: "grep -q '^status: PASS$' drift/dod_receipts/OMN-13196/pr-omnibase_infra/command.yaml"
status: PASS
run_timestamp: "2026-06-17T14:07:18-00:00"
commit_sha: "57f66e31f8de1d7f079ed7919124df518d68eda0"
contract_sha256: "sha256:4f4d4fd55af813f7ebca221ccabf3f7f04d61d2a394158c55aaf29edff28e21b"
branch: "jonah/omn-13196-drop-modelonexenvelope-ref"
pr_number: 2686
runner: "omn-13196-impl"
verifier: "receipt-gate-local"
probe_command: "grep -rniE 'ModelOnexEnvelope|model_onex_envelope' src/ tests/ | wc -l ; gh pr view 2007
--repo OmniNode-ai/omnibase_infra --json number,headRefName,headRefOid,state"
probe_stdout: |
# grep -rniE 'ModelOnexEnvelope|model_onex_envelope' src/ tests/ | wc -l -> 0
# ZERO ModelOnexEnvelope references remain in omnibase_infra src + tests. Retargeted the one live
# runtime import in tests/performance/test_production_benchmarks.py (the _make_envelope helper)
# to ModelEventEnvelope[dict[str, Any]] and corrected two stale src docstrings
# (mixin_kafka_broadcast.py publish_envelope Args; handler_llm_openai_compatible.py
# Protocol Conformance Note).
number=2007
headRefName=jonah/omn-13196-drop-modelonexenvelope-ref
headRefOid=57f66e31f8de1d7f079ed7919124df518d68eda0
state=OPEN
actual_output: >-
PASS: omnibase_infra is clean of ModelOnexEnvelope (impl PR #2007, head 57f66e31f8de1d7f079ed7919124df518d68eda0,
base dev). This is the coordinated cross-repo half of OMN-13196: when omnibase_core (PR #1250) deletes
ModelOnexEnvelope, the one live runtime importer in this repo — tests/performance/test_production_benchmarks.py
— would break. The _make_envelope helper constructed ModelOnexEnvelope (source_node/operation/timestamp)
purely to produce a production-representative envelope the benchmarks serialize via model_dump_json();
no field is read downstream. It is retargeted to ModelEventEnvelope[dict[str, Any]] with the equivalent
fields (source_node->source_tool, operation->event_type, timestamp->envelope_timestamp); the one caller
passing source_node= and the module docstrings/prints are updated. Two stale src docstrings are also
corrected: mixin_kafka_broadcast.py publish_envelope (takes envelope: object, duck-typed via model_dump)
Args line ModelOnexEnvelope -> ModelEventEnvelope; and handler_llm_openai_compatible.py Protocol Conformance
Note, which falsely claimed ProtocolHandler operates on ModelOnexEnvelope — ProtocolHandler.execute
actually takes ModelProtocolRequest -> ModelProtocolResponse (omnibase_spi protocols/handlers/protocol_handler.py:113-117).
grep -rniE 'ModelOnexEnvelope|model_onex_envelope' over src/ + tests/ returns 0. Gates green: ruff format
+ ruff check (All checks passed); mypy --strict on the 2 changed src files (Success: no issues found);
pytest tests/performance/test_production_benchmarks.py 13 passed; pre-commit run on the changed files
exit 0. This receipt is the grep-target consumed by the check_value in contracts/OMN-13196.yaml (contract
bytes hash to sha256:4f4d4fd55af813f7ebca221ccabf3f7f04d61d2a394158c55aaf29edff28e21b).
exit_code: 0
working_dir: "/Users/jonah/Code/omni_home/omni_worktrees/OMN-13196/onex_change_control"
Loading