Skip to content

OMN-18989: Preserve contract_failure_reasons in shared gate result - #3447

Merged
jonahgabriel merged 3 commits into
devfrom
jonah/omn-18989-label-gate
Oct 6, 2026
Merged

jonahgabriel merged 3 commits into
devfrom
jonah/omn-18989-label-gate

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

OMN-18989: Preserve contract failure reasons in delegation gate results

This change preserves output_refusal.contract_failure_reasons in the shared gate result used by local and bus delegation, and records gate failure_reasons in each local attempt error_message. The captured invalid token INSTRUMENTEMENT_DEFECT triggered 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 push exit=0.
  • RED: 2 failed, 12 passed before production changes; valid control passed.
  • GREEN: 14 passed in tests/unit/delegation/test_declared_label_set_membership_omn18989.py.
  • Adjacent: 3 passed in tests/unit/delegation/test_local_port_response_contract_evidence_omn19201.py.
  • Live Positive (deployed-base probe): correlation 9f478da2-89e7-49e4-bca7-a00032ae1c8b, status completed, schema conveyed and validated.
  • Live Negative (deployed-base probe): correlation 319ae678-3ba7-4de3-85ad-994f0285d3f7, status failed. The deployed terminal refuses the captured token, but quality_gates_failed and each gate-rejected attempt error_message omit it; output_refusal.contract_failure_reasons contains it. This confirms the defect on the deployed base, not patched runtime proof.
  • Valid control stayed green for AC5; no new runtime deployment 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

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Hostile Reviewer — PASSED

Blocking findings (critical/error): 0
Total findings: 10
Models succeeded: qwen3-review,gpt-oss-review


Gate semantics

Verdict Meaning Blocks merge?
passed >=2 models succeeded, no critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded Fewer than 2 models succeeded (infra unavailable/timeout) Yes (OMN-15110)

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
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

⚠️ Architectural Review — WARNINGS

Errors: 0
Warnings: 1

What this checks

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).

Ticket OMN-18989.
No conflicts.
CI check "Tests (Split 2/20)" failed on old head; passes against dev c3dfb58.
789 delegation tests pass (3 skipped).
scripts/check_release_identity.py passes: version 0.4.301 ahead of published 0.4.290.
@jonahgabriel
jonahgabriel merged commit ca88d13 into dev Oct 6, 2026
150 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-18989-label-gate branch October 6, 2026 01:04
jonahgabriel added a commit that referenced this pull request Oct 8, 2026
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.
jonahgabriel added a commit that referenced this pull request Oct 8, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant