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
66 changes: 66 additions & 0 deletions contracts/OMN-14331.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14331"
title: "refactor(OMN-14331): retire models→validation import-layering back-edge in omnibase_core"
summary: >-
omnibase_core PR #1420 retires the frozen `models.** -> validation` / `models.** -> validation.**` import-layering
back-edge (18 edges) by relocating the pure, model-free validators DOWN out of the validation behavioral
layer: the topic-suffix checker to utils/util_topic_suffix (check_topic_suffix), the name/identifier
+ patch-list validators to utils/util_name_validation, the hex-color validator to utils/util_hex_color,
the runtime-ops verb allowlist loader to utils/util_runtime_ops_verb_loader, and the workflow constants
to constants/constants_workflow. The old validation modules (validator_topic_suffix, validator_utils,
runtime_ops_verb_loader, validation/__init__) are kept as thin re-export shims so the historical public
surface is unchanged; ~15 model files now import the relocated pure helpers from their new homes. Both
`models.** -> validation` ignore lines are DELETED from .importlinter. Verified by the import-linter
oracle: the "Models must not import behavioral/orchestration layers" contract stays KEPT with the allowlist
entries removed, proving the edges are genuinely gone (epic OMN-3210).
is_seam_ticket: false
interface_change: false
interfaces_touched: []
emergency_bypass:
enabled: false
justification: ""
follow_up_ticket_id: ""
dod_evidence:
- id: "dod-omnibase_core-pr-1420"
description: >-
Independent adversarial verification (a separate verifier, NOT the implementing agent) reproduced
the import-linter oracle end-to-end against omnibase_core PR #1420 head 26120779733e48a0c7112d0f64b2e59135800ad2
in the isolated worktree with PYTHONPATH cleared (grimp analyzed the worktree src, not the canonical
clone — ambient PYTHONPATH pointed at the canonical omnibase_core/src). `env -u PYTHONPATH uv run
lint-imports` kept all 4 contracts (Analyzed 4076 files, 10339 dependencies; 4 kept, 0 broken) with
BOTH `models.** -> validation` ignore lines removed. Negative control: adding a throwaway models/_negative_control_zzz.py
importing omnibase_core.validation.validator_topic_suffix.validate_topic_suffix (ignore lines still
removed) turned "Models must not import behavioral/orchestration layers" BROKEN (3 kept, 1 broken;
4077 files, 10340 dependencies), proving the edges are real and genuinely removed by the relocation,
not wildcard-masked; deleting the scratch file restored 4 kept, 0 broken (4076 files, 10339 dependencies).
Behavior preservation: a 37-input adversarial parity harness comparing the OLD validation.validator_topic_suffix.validate_topic_suffix
(from origin/dev) against the NEW utils.util_topic_suffix.check_topic_suffix found 0 mismatches
on validity AND exact error strings across valid, whitespace, case, env-prefix, segment-count, kind,
kebab, version, and control-char cases. The re-export shims preserve the historical public API.
grep proof: no real omnibase_core.validation import statement remains under src/omnibase_core/models/
(all remaining hits are docstrings/comments; none TYPE_CHECKING-hidden). Tests: 380 passed across
tests/unit/validation/test_validator_topic_suffix.py, test_runtime_ops_verb_loader.py, test_validator_hex_color.py,
and tests/unit/constants/test_constants_topic_taxonomy.py. mypy --strict clean on all 30 changed
source files; the only mypy import-not-found errors (5, redis/omnibase_spi) are pre-existing in
UNTOUCHED files (backends/cache/backend_cache_redis.py, services/service_protocol_auditor.py) from
absent local sibling deps, not introduced by #1420. ruff check src/ tests/ clean. No runtime or
deploy scope.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' drift/dod_receipts/OMN-14331/dod-omnibase_core-pr-1420/command.yaml
&& grep -q '^pr_number: 1420$' drift/dod_receipts/OMN-14331/dod-omnibase_core-pr-1420/command.yaml
- id: "dod-occ-self"
description: >-
OCC companion self-binding: this onex_change_control PR carries the OMN-14331 contract and PASS
receipt for omnibase_core PR #1420, binding itself to occ-preflight by commit_sha (contract commit
C1), with no runtime or deploy scope.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' drift/dod_receipts/OMN-14331/dod-occ-self/command.yaml
22 changes: 22 additions & 0 deletions drift/dod_receipts/OMN-14331/dod-occ-self/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14331"
evidence_item_id: "dod-occ-self"
check_type: "command"
check_value: "gh pr view --repo OmniNode-ai/onex_change_control --json number,state,headRefName,headRefOid,baseRefName"
status: PASS
run_timestamp: "2026-07-10T21:26:00Z"
commit_sha: 57b78b84d9b23f604bbf88b8ac920d55b09df543
runner: "omn-14331-independent-verifier"
verifier: "occ-evidence-lane"
probe_command: >-
git -C /Users/jonah/Code/omni_home/omni_worktrees/OMN-14331/onex_change_control rev-parse HEAD~1
probe_stdout: |
57b78b84d9b23f604bbf88b8ac920d55b09df543
actual_output: >-
PASS: this onex_change_control PR is the independent-verification OCC companion for OMN-14331 / omnibase_core
PR #1420. It carries the dod-omnibase_core-pr-1420 receipt and binds itself to occ-preflight by commit_sha
57b78b84d9b23f604bbf88b8ac920d55b09df543 (contract commit C1), a member of this PR's commit set, so
occ-preflight verifies the companion without pr-number prediction. No runtime or deploy scope.
exit_code: 0
contract_sha256: "sha256:0d02b279bb0d8a6937b8ebcbec74c3c831b435ece6f39cd321c49e44e7934a30"
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-14331"
evidence_item_id: "dod-omnibase_core-pr-1420"
check_type: "command"
check_value: "cd omnibase_core && env -u PYTHONPATH uv run lint-imports"
status: PASS
run_timestamp: "2026-07-10T21:24:00Z"
commit_sha: 26120779733e48a0c7112d0f64b2e59135800ad2
runner: "omn-14331-independent-verifier"
verifier: "occ-evidence-lane"
probe_command: >-
cd /Users/jonah/Code/omni_home/omni_worktrees/OMN-14331/omnibase_core && env -u PYTHONPATH uv run lint-imports;
# negative control: add models/_negative_control_zzz.py importing validation, re-run, then remove; #
parity: env -u PYTHONPATH uv run python parity_harness.py old_validator_topic_suffix.py; # tests: env
-u PYTHONPATH uv run pytest tests/unit/validation/test_validator_topic_suffix.py # tests/unit/validation/test_runtime_ops_verb_loader.py
tests/unit/validation/test_validator_hex_color.py # tests/unit/constants/test_constants_topic_taxonomy.py
-q; # mypy: git diff --name-only origin/dev...HEAD -- 'src/**/*.py' | xargs env -u PYTHONPATH uv run
mypy --strict; # ruff: env -u PYTHONPATH uv run ruff check src/ tests/
probe_stdout: |
Analyzed 4076 files, 10339 dependencies.
Foundation primitives must not import higher layers (direct) KEPT
Models must not import behavioral/orchestration layers (direct) KEPT
Services and validation must not import nodes (direct) KEPT
Protocols (seam) must not import domain/behavioral layers (direct) KEPT
Contracts: 4 kept, 0 broken.
negative-control (throwaway model imports validation): Models must not import behavioral/orchestration layers BROKEN; 3 kept, 1 broken (4077 files, 10340 deps); restored 4 kept/0 broken after removal
parity harness: corpus=37 mismatches=0
targeted tests: 380 passed in 47.58s
mypy --strict (30 changed files): Success: no issues found in 30 source files
ruff check src/ tests/: All checks passed!
actual_output: >-
PASS: omnibase_core PR #1420 retires the frozen models->validation import-layering back-edge (18 edges)
by relocating the pure, model-free validators DOWN out of validation/ (topic-suffix -> utils/util_topic_suffix,
name/patch validators -> utils/util_name_validation, hex-color -> utils/util_hex_color, runtime-ops
verb loader -> utils/util_runtime_ops_verb_loader, workflow constants -> constants/constants_workflow),
with thin re-export shims preserving the historical public surface. Independent reproduction (PYTHONPATH
cleared; ambient PYTHONPATH pointed at the canonical omnibase_core/src) kept all 4 contracts (4 kept,
0 broken) with both models->validation ignore lines removed. Negative control: a throwaway model importing
validation broke "Models must not import behavioral/orchestration layers" (3 kept, 1 broken), proving
the edges are genuinely gone, not wildcard-masked; removal restored 4 kept/0 broken. 37-input adversarial
parity harness: NEW check_topic_suffix == OLD validate_topic_suffix on validity + exact error strings,
0 mismatches. No real omnibase_core.validation import remains under src/omnibase_core/models/. 380 targeted
tests pass; mypy --strict clean on all 30 changed files (the 5 redis/omnibase_spi import-not-found are
pre-existing in untouched files); ruff clean.
exit_code: 0
pr_number: 1420
branch: "jonah/omn-14331-retire-models-validation-back-edge"
contract_sha256: "sha256:0d02b279bb0d8a6937b8ebcbec74c3c831b435ece6f39cd321c49e44e7934a30"
Loading