Repository navigation
OMN-18989: Preserve contract_failure_reasons in shared gate result - #3447
Conversation
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
Adds contracts/OMN-18989.yaml to omnimarket. Fixes repo-evidence / dod-verify failure at head faa7609: "pull request cites OMN-18989 but carries no contracts/OMN-18989.yaml". Contract binds AC1 to tests/unit/delegation/test_declared_label_set_membership_omn18989.py (14 passed on lab host h202). Ticket: OMN-18989
|
| Rule | Description |
|---|---|
| ARCH-TOPIC-001 | No hardcoded Kafka topic strings in handler code |
| ARCH-DI-001 | No event_bus=None bypass |
| ARCH-DI-002 | No direct Handler instantiation outside workflow_runner/adapters |
| ARCH-DI-003 | No reinvented DI containers |
| ARCH-TOPIC-002 | contract.yaml topics follow `onex.{cmd |
ARCH-DI-002: Direct Handler instantiation (warning)\n\n```\nsrc/omnimarket/nodes/node_delegate_skill_orchestrator/ports/port_local_delegation_dispatch.py:977: self._effect_handler = effect_handler or HandlerLlmDelegationCall()
src/omnimarket/nodes/node_delegate_skill_orchestrator/ports/port_local_delegation_dispatch.py:978: self._projection_handler = projection_handler or HandlerProjectionDelegation(
src/omnimarket/nodes/node_delegate_skill_orchestrator/ports/port_local_delegation_dispatch.py:3376: HandlerProjectionLlmCost().project(call_event, self._evidence_db)\n```\n\nHandler classes should be wired only in workflow_runner.py or adapter modules. Direct instantiation elsewhere bypasses the contract system.\n\n
Static architectural lint — no model inference (OMN-14176).
Repo Evidence Gate job "repo-evidence / dod-verify" failed at head fcc0b92 because the PR bound no evidence of its own. contracts/OMN-18989.yaml on dev (from PR #3447) only bound AC1. This commit adds acceptance criterion AC2 (the bus quality gate keeps DELIVERABLE_EVIDENCE_MISMATCH and appends the extractor contract_failure_reasons), an evidence_requirements entry, and dod_evidence item dod-omn18989-ac2-bus-gate-names-rejected-label running uv run pytest tests/unit/delegation/test_declared_label_set_membership_omn18989.py::test_bus_gate_names_rejected_labels_before_terminal_composition -q. Lab readback on h202: 4 passed at head; at merge base ed3b300 the test is absent (exit 4, no tests ran); head's test against base code: 2 failed, 2 passed.
…8989) (#3560) * fix(delegation): append extractor contract failure reasons to quality gate mismatch (OMN-18989) * OMN-18989: Bump omnimarket to 0.4.305 after merging origin/dev * OMN-18989: Bind AC2 bus gate evidence for repo-evidence gate Repo Evidence Gate job "repo-evidence / dod-verify" failed at head fcc0b92 because the PR bound no evidence of its own. contracts/OMN-18989.yaml on dev (from PR #3447) only bound AC1. This commit adds acceptance criterion AC2 (the bus quality gate keeps DELIVERABLE_EVIDENCE_MISMATCH and appends the extractor contract_failure_reasons), an evidence_requirements entry, and dod_evidence item dod-omn18989-ac2-bus-gate-names-rejected-label running uv run pytest tests/unit/delegation/test_declared_label_set_membership_omn18989.py::test_bus_gate_names_rejected_labels_before_terminal_composition -q. Lab readback on h202: 4 passed at head; at merge base ed3b300 the test is absent (exit 4, no tests ran); head's test against base code: 2 failed, 2 passed. * OMN-18989: Fix AC2 evidence selector to target existing test file The CI job "Tests (Split 2/20)" in run 37803216137 at head 509f157 failed on tests/ci/test_repo_evidence_caller_workflow.py::test_every_repo_contract_binds_every_criterion because the AC2 check_value in OMN-18989.yaml named the test as file.py::test_name, but the repo gate only accepts a selector token ending in .py. This change updates the AC2 dod_evidence check_value, the AC2 evidence_requirements command, and the AC2 falsifier in contracts/OMN-18989.yaml to name tests/unit/delegation/test_declared_label_set_membership_omn18989.py and select the test with -k test_bus_gate_names_rejected_labels_before_terminal_composition, matching the form used by other repo contracts. No code change. * OMN-18989: remove redundant extract_deliverable call File: src/omnimarket/nodes/node_delegation_quality_gate_reducer/handlers/handler_quality_gate.py, function _evaluate_response_contract. extract_deliverable is now called once, right after resolve_deliverable_contract; the DELIVERABLE_EVIDENCE_MISMATCH return reuses extraction.contract_failure_reasons; the later second call is removed. Reason: the hostile reviewer quorum (qwen3-review, gpt-oss-review) blocked the PR on a redundant extraction call. Behaviour is unchanged. Focused tests: test_declared_label_set_membership_omn18989.py 18 passed; test_quality_gate_response_contract_omn15193.py 15 passed; test_reasoning_preamble_veto_omn18379.py 32 passed.
OMN-18989: Preserve contract failure reasons in delegation gate results
This change preserves
output_refusal.contract_failure_reasonsin the shared gate result used by local and bus delegation, and records gatefailure_reasonsin each local attempterror_message. The captured invalid tokenINSTRUMENTEMENT_DEFECTtriggered the cause: "DELIVERABLE_EVIDENCE_MISMATCH: cleaned content does not match the declared extraction evidence". This message masked the schema violation; the fix retains the schema diagnostic rather than repairing extraction evidence.Existing wire fields require no consumer rollout as consumers already ship. Pre-commit passed through ordinary git commit with exit=0. Hosted checks are unreadable-from-snapshot because the snapshot last_tick 2026-10-05T18:56:01Z exceeds the 8-minute maximum, and no GitHub PR/CI state read is permitted.
Verification
mypy-type-check: Passed;git pushexit=0.tests/unit/delegation/test_declared_label_set_membership_omn18989.py.tests/unit/delegation/test_local_port_response_contract_evidence_omn19201.py.9f478da2-89e7-49e4-bca7-a00032ae1c8b, status completed, schema conveyed and validated.319ae678-3ba7-4de3-85ad-994f0285d3f7, status failed. The deployed terminal refuses the captured token, butquality_gates_failedand each gate-rejected attempterror_messageomit it;output_refusal.contract_failure_reasonscontains it. This confirms the defect on the deployed base, not patched runtime proof.Lab: head=faa7609a9556d45677604dc3bcd428c20831999b host=h201 lane=lab-fill-omn18989-10051850 command="env -u PYTHONPATH uv run --frozen pytest tests/unit/delegation/test_declared_label_set_membership_omn18989.py -q" exit=0
Evidence-Ticket: OMN-18989
Evidence-Source: OCC#12965