diff --git a/contracts/OMN-13472.yaml b/contracts/OMN-13472.yaml new file mode 100644 index 00000000000..10407843077 --- /dev/null +++ b/contracts/OMN-13472.yaml @@ -0,0 +1,60 @@ +--- +schema_version: "1.0.0" +ticket_id: "OMN-13472" +title: "feat(OMN-13472): ARCH-004 imperative-orchestrator ratchet — cross-file rule + baseline + gate" +summary: >- + OCC evidence for omnibase_infra PR #2065 (Workstream B of the verified imperative-orchestrator ratchet + plan). Adds ARCH-004 "Contract-Declared Orchestrator Workflow Must Be Bound To An Executor" to node_architecture_validator + — a cross-file, node-directory rule that joins contract.yaml (fsm/workflow_coordination), handler_routing.routing_strategy, + handler source, and node type/name. It catches the delegation-shaped anti-pattern ARCH-003 structurally + misses (handler-owned _transition( in a non-*Orchestrator class; declared-but-unbound fsm; payload_type_match + catchall; one handler that both selects state and constructs terminal/compat events). Ships a ratchet + baseline (architecture-handshakes/imperative-orchestrator-baseline.yaml, can only shrink) and wires + the gate THROUGH OMN-12550 (scripts/validate.py imperative_orchestrators + pre-commit changed-node ratchet + blocking + CI full report non-blocking initially), citing OMN-12550 + OMN-13325. Epic OMN-13471. +is_seam_ticket: false +interface_change: false +interfaces_touched: [] +emergency_bypass: + enabled: false + justification: "" + follow_up_ticket_id: "" +dod_evidence: + - id: "dod-arch003-vs-arch004-proof" + description: >- + Headline proof: a synthetic node whose contract declares an fsm: table and whose monolithic handler + drives transitions via self._transition(...) — class NOT named *Orchestrator — is PASSED by ARCH-003 + (single-file, class-name-gated AST) and FAILED by ARCH-004 (cross-file join). Verified by test_arch003_passes_but_arch004_fails_delegation_shape. + source: "manual" + status: "verified" + checks: + - check_type: "command" + check_value: "grep -q 'PASS' drift/dod_receipts/OMN-13472/dod-arch003-vs-arch004-proof/command.yaml" + - id: "dod-arch004-detects-delegation" + description: >- + ARCH-004 detects the real node_delegation_orchestrator (and the broader fleet) in full-audit mode + via scripts/validate.py imperative_orchestrators; delegation scores risk 10 with codes H1/H2/H3/W1-W4 + (matches the audit). Baseline records 9 current hard-fails, owner OMN-13471, repo-relative paths. + source: "manual" + status: "verified" + checks: + - check_type: "command" + check_value: "grep -q 'PASS' drift/dod_receipts/OMN-13472/dod-arch004-detects-delegation/command.yaml" + - id: "dod-validator-suite" + description: >- + Full node_architecture_validator unit suite green (218 passed) with the 15 new ARCH-004 tests and + no regression; union-count regression guard passes; mypy --strict clean across src/. + source: "manual" + status: "verified" + checks: + - check_type: "command" + check_value: "grep -q 'PASS' drift/dod_receipts/OMN-13472/dod-validator-suite/command.yaml" + - id: "dod-occ-pr" + description: >- + Self-binding receipt for this OCC PR, which carries the central contracts/OMN-13472.yaml consumed + by the omnibase_infra PR #2065 Receipt Gate via Evidence-Source. + source: "manual" + status: "verified" + checks: + - check_type: "command" + check_value: "grep -c '^ticket_id: \"OMN-13472\"$' contracts/OMN-13472.yaml" diff --git a/drift/dod_receipts/OMN-13472/dod-arch003-vs-arch004-proof/command.yaml b/drift/dod_receipts/OMN-13472/dod-arch003-vs-arch004-proof/command.yaml new file mode 100644 index 00000000000..00582b6448d --- /dev/null +++ b/drift/dod_receipts/OMN-13472/dod-arch003-vs-arch004-proof/command.yaml @@ -0,0 +1,25 @@ +--- +schema_version: "1.0.0" +ticket_id: "OMN-13472" +evidence_item_id: "dod-arch003-vs-arch004-proof" +check_type: "command" +check_value: "uv run --frozen pytest tests/unit/nodes/node_architecture_validator/test_validator_contract_declared_orchestrator_workflow.py::test_arch003_passes_but_arch004_fails_delegation_shape + -q" +status: "PASS" +run_timestamp: "2026-06-22T13:34:59Z" +commit_sha: "e3feab86a9e10cb40cfa8152f3eb1fde28b4a12f" +pr_number: 2065 +contract_sha256: "sha256:498aa5fba0f5c1bd5e000241825e1bd26b12c39ad94fd087d0028a7047942077" +runner: "codex-local" +verifier: "jonahgabriel" +probe_command: "uv run --frozen pytest tests/unit/nodes/node_architecture_validator/test_validator_contract_declared_orchestrator_workflow.py::test_arch003_passes_but_arch004_fails_delegation_shape + -q" +probe_stdout: | + . [100%] + 1 passed in 0.19s +actual_output: >- + PASS: ARCH-003 returns valid=True (0 violations) on the delegation-shape handler (class HandlerDelegationWorkflow, + self._transition(...) calls); ARCH-004 returns valid=False with finding codes H1+H3 on the same node + directory. The headline gap ARCH-003 cannot close is proven closed by ARCH-004. +exit_code: 0 +branch: "jonah/omn-13472-arch-004-ratchet" diff --git a/drift/dod_receipts/OMN-13472/dod-arch004-detects-delegation/command.yaml b/drift/dod_receipts/OMN-13472/dod-arch004-detects-delegation/command.yaml new file mode 100644 index 00000000000..7122e18e89e --- /dev/null +++ b/drift/dod_receipts/OMN-13472/dod-arch004-detects-delegation/command.yaml @@ -0,0 +1,25 @@ +--- +schema_version: "1.0.0" +ticket_id: "OMN-13472" +evidence_item_id: "dod-arch004-detects-delegation" +check_type: "command" +check_value: "uv run --frozen python scripts/validate.py imperative_orchestrators --verbose" +status: "PASS" +run_timestamp: "2026-06-22T13:34:59Z" +commit_sha: "e3feab86a9e10cb40cfa8152f3eb1fde28b4a12f" +pr_number: 2065 +contract_sha256: "sha256:498aa5fba0f5c1bd5e000241825e1bd26b12c39ad94fd087d0028a7047942077" +runner: "codex-local" +verifier: "jonahgabriel" +probe_command: "uv run --frozen python -c \"from pathlib import Path; from omnibase_infra.nodes.node_architecture_validator.validators + import analyze_node_directory; a=analyze_node_directory(Path('/Users/jonah/Code/omni_home/omnimarket/src/omnimarket/nodes/node_delegation_orchestrator')); + print(a.node_name, a.finding_codes, 'risk', a.risk_score, 'hard_fail', a.has_hard_fail)\"" +probe_stdout: | + node_delegation_orchestrator ['H1', 'H2', 'H3', 'W1', 'W2', 'W3', 'W4'] risk 10 hard_fail True +actual_output: >- + PASS: ARCH-004 full-audit (scripts/validate.py imperative_orchestrators) reports the real node_delegation_orchestrator + as a hard-fail with codes H1/H2/H3/W1-W4 and risk 10 (matches docs/audits/2026-06-22-imperative-orchestrator-audit.md). + The repo full report lists 6 omnibase_infra hard-fail node(s); the committed baseline records 9 across + the fleet with owner OMN-13471 and repo-relative paths. +exit_code: 0 +branch: "jonah/omn-13472-arch-004-ratchet" diff --git a/drift/dod_receipts/OMN-13472/dod-occ-pr/command.yaml b/drift/dod_receipts/OMN-13472/dod-occ-pr/command.yaml new file mode 100644 index 00000000000..010e9d2d91c --- /dev/null +++ b/drift/dod_receipts/OMN-13472/dod-occ-pr/command.yaml @@ -0,0 +1,20 @@ +--- +schema_version: "1.0.0" +ticket_id: "OMN-13472" +evidence_item_id: "dod-occ-pr" +check_type: "command" +check_value: "grep -c '^ticket_id: \"OMN-13472\"$' contracts/OMN-13472.yaml" +status: "PASS" +run_timestamp: "2026-06-22T13:34:59Z" +commit_sha: "32280fa398c038cd3ce4656fcb3b71b892d5e737" +pr_number: 2900 +contract_sha256: "sha256:498aa5fba0f5c1bd5e000241825e1bd26b12c39ad94fd087d0028a7047942077" +runner: "codex-local" +verifier: "jonahgabriel" +probe_command: "grep -c '^ticket_id: \"OMN-13472\"$' contracts/OMN-13472.yaml" +probe_stdout: | + 1 +actual_output: >- + PASS: this OCC PR carries central contracts/OMN-13472.yaml with exactly one matching ticket_id line. +exit_code: 0 +branch: "jonah/omn-13472-occ-receipt" diff --git a/drift/dod_receipts/OMN-13472/dod-validator-suite/command.yaml b/drift/dod_receipts/OMN-13472/dod-validator-suite/command.yaml new file mode 100644 index 00000000000..c53f2a2a6a6 --- /dev/null +++ b/drift/dod_receipts/OMN-13472/dod-validator-suite/command.yaml @@ -0,0 +1,25 @@ +--- +schema_version: "1.0.0" +ticket_id: "OMN-13472" +evidence_item_id: "dod-validator-suite" +check_type: "command" +check_value: "uv run --frozen pytest tests/unit/nodes/node_architecture_validator/ tests/unit/validation/test_validator_defaults.py::TestUnionCountRegressionGuard + -q && uv run --frozen mypy src/ --strict" +status: "PASS" +run_timestamp: "2026-06-22T13:34:59Z" +commit_sha: "e3feab86a9e10cb40cfa8152f3eb1fde28b4a12f" +pr_number: 2065 +contract_sha256: "sha256:498aa5fba0f5c1bd5e000241825e1bd26b12c39ad94fd087d0028a7047942077" +runner: "codex-local" +verifier: "jonahgabriel" +probe_command: "uv run --frozen pytest tests/unit/nodes/node_architecture_validator/ -q ; uv run --frozen + mypy src/ --strict" +probe_stdout: | + 218 passed in 1.00s + Success: no issues found in 2488 source files +actual_output: >- + PASS: full node_architecture_validator unit suite green (218 passed, incl. 15 new ARCH-004 tests, no + regression); the union-count regression guard passes (analyze_node_directory narrowed to Path to avoid + adding a counted non-optional union); mypy --strict clean across all 2488 src files. +exit_code: 0 +branch: "jonah/omn-13472-arch-004-ratchet"