Skip to content

fix(OMN-10972,OMN-11149,OMN-11150,OMN-11152,OMN-11153,OMN-11155): flip advisory gates to blocking in omniclaude - #1604

Merged
jonahgabriel merged 3 commits into
mainfrom
jonah/omn-10972-gate-hardening-omniclaude
May 20, 2026
Merged

jonahgabriel merged 3 commits into
mainfrom
jonah/omn-10972-gate-hardening-omniclaude

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Graduates five advisory CI gates to blocking in omniclaude.

  • OMN-11149: validate-pr-contracts.yml — remove exit 0 warn-only gate; use exit ${{ steps.validate.outputs.exit_code }} so failures block merge.
  • OMN-11150: Mypy CI step — remove || true; add blocking error exit. Fix 9 mypy strict errors:
    • delegation/runner.py: Add TYPE_CHECKING import for ModelBifrostResponse; type _emit_audit and _handle_routing_decision properly; cast(object, ...) on _build_env_config return (lazy import returns Any); # type: ignore[misc] on _InProcessTransport subclass (mixin loaded via lazy import).
    • delegation/inprocess_runner.py: Use task_type.value in ModelDelegationRequest constructor (StrEnum value satisfies Literal["test", "document", "research"]).
    • runtime/introspection.py: # type: ignore[misc] on _SkillNodeProxy(MixinNodeIntrospection) — pre-existing pattern, mixin loaded via lazy import.
  • OMN-11152: DOD_ENFORCEMENT: advisory → hard in CI dod-pre-push-check step.
  • OMN-11153: boundary-parity — remove continue-on-error: true; set warn-only: "false".
  • OMN-11155: model_router_hook.yaml — mode: advisory → mode: enforce.

OMN-11151 deferred: skill-node boundary validator shows 140 violations across 45 skills. Prerequisites (OMN-8088 thin-trigger porting for remaining skills) not complete. Cannot make blocking without fixing violations.

Part of OMN-10972 (22-gate hardening sweep).

Evidence-Source: c38413e9ef595b88039e83334ec2b400d3805f0e
Evidence-Ticket: OMN-10972
Implements OMN-10972
Implements OMN-11149
Implements OMN-11150
Implements OMN-11152
Implements OMN-11153
Implements OMN-11155

…ry gates to blocking in omniclaude

- OMN-11149: validate-pr-contracts.yml — remove exit 0 warn-only gate; use exit_code from validation step
- OMN-11150: mypy CI step — remove || true; add blocking error exit; fix 9 mypy strict errors in delegation/runner.py, delegation/inprocess_runner.py, and runtime/introspection.py
- OMN-11152: DOD_ENFORCEMENT advisory → hard in CI dod-pre-push-check step
- OMN-11153: boundary-parity — remove continue-on-error; set warn-only: false
- OMN-11155: model_router_hook.yaml — mode advisory → enforce

OMN-11151 (skill-node boundary) deferred: 140 violations across 45 skills require upstream OMN-8088 porting work not yet complete.
@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jonahgabriel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 2 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e3974525-236f-4248-b468-c9192b31445f

📥 Commits

Reviewing files that changed from the base of the PR and between 7e5ec65 and c4f521e.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/validate-pr-contracts.yml
  • plugins/onex/hooks/config/model_router_hook.yaml
  • scripts/materialize-dod-evidence-from-occ.sh
  • src/omniclaude/delegation/inprocess_runner.py
  • src/omniclaude/delegation/runner.py
  • tests/unit/test_dod_occ_materialization.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-10972-gate-hardening-omniclaude

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
github-actions Bot enabled auto-merge May 18, 2026 16:05
@github-actions

github-actions Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Hostile Reviewer — DEGRADED (informational)

Blocking findings (critical/error): 0
Total findings: 0
Models succeeded: none

Note: All reviewer models failed or were unavailable. Degraded results are informational during the pilot phase (OMN-8524) and do not block merge. Error: cli_review exited non-zero (all models failed or binary error)


Gate semantics (pilot phase)

Verdict Meaning Blocks merge?
passed No critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded All models unavailable (infra) No (pilot)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@jonahgabriel jonahgabriel changed the title fix(OMN-11149,OMN-11150,OMN-11152,OMN-11153,OMN-11155): flip 5 advisory gates to blocking in omniclaude fix(OMN-10972,OMN-11149,OMN-11150,OMN-11152,OMN-11153,OMN-11155): flip advisory gates to blocking in omniclaude May 20, 2026
@github-actions
github-actions Bot added this pull request to the merge queue May 20, 2026
@jonahgabriel
jonahgabriel removed this pull request from the merge queue due to a manual request May 20, 2026
@jonahgabriel
jonahgabriel enabled auto-merge May 20, 2026 11:05
@jonahgabriel
jonahgabriel added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 63b0f7f May 20, 2026
91 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-10972-gate-hardening-omniclaude branch May 20, 2026 15:11
jonahgabriel added a commit that referenced this pull request Aug 28, 2026
…sion class in the CR-thread gate (#2057)

Closes OMN-16823

## Problem

`scripts/check-unresolved-threads.sh` backs the required `gate /
CodeRabbit Thread Check` context. It counted a CodeRabbit review thread
as **blocking** even after CodeRabbit had conceded the finding in-thread
and agreed to defer it to a ticket, because its concession match only
recognized `you're right` / `apologize` / `correct behavior` / `retract`
/ `understood ... reasonable`.

The live case is **omnibase_core#1604**, thread 2 of 3 on
`src/omnibase_core/models/cli/model_cli_user_config_logging.py`.
CodeRabbit's own reply, verbatim:

> `@jonahgabriel`, agreed that `EnumLogLevel` cannot represent this YAML
contract. Its lowercase values would cause an unintended
serialized-value migration.
>
> The finding requested a separate uppercase-valued enum, not reuse of
`EnumLogLevel`. However, deferring the validation design to OMN-16037 is
reasonable because the current PR must avoid silent rewrites of existing
configuration files.

An unambiguous concession plus an explicit deferral — and the required
context stayed red, with no path to green short of making a change the
reviewer itself agreed was not required. Same family as OMN-15815 /
OMN-15532: a required context unsatisfiable by construction.

## Fix — detection only

The widened class is a **conjunction**, not a keyword list:

- an agreement token (`agreed`, `agree`, `concur`, `fair point`, ...),
**AND**
- a deferral/acceptance token (`defer*`, `reasonable`, `pragmatic`,
`tradeoff`, `out of scope`, `separate ticket`, `OMN-####`, ...), **AND**
- **no** negation-or-escalation marker (`disagree`, `do not agree`,
`still stands`, `reiterate`, `escalate`, `finding stands`, ...),

evaluated over the **salient** reply body — auto-generated `<details>`
blocks and HTML comments are stripped first, so CodeRabbit's own
"Learnings" boilerplate cannot supply either token. The pre-existing
**human-rebuttal precondition** and the **truncated-thread
conservatism** both still gate it. The gate cannot degrade into "any
CodeRabbit reply clears the thread".

Also collapses the previously byte-duplicated concession regex in
`CONCESSION_JQ` and `BLOCKING_JQ` into one shared `CR_CONCEDED_JQ`
predicate. That duplication is precisely how a widened match lands in
the audit line but not in the count.

## No auto-resolution — `pr_review_bot` remains the sole resolver

**This change introduces no auto-resolution and no resolve path of any
kind.** It changes only the wording match that decides whether a thread
still *counts*. Asserted mechanically, not just in prose: the suite
greps the gate script for `resolveReviewThread` /
`unresolveReviewThread` / `--resolve` and fails if any appears (`PASS:
no thread-resolution mutation present in the gate script`). No
`[skip-*]` token, no bypass, no required-check removal is used anywhere
in this change.

## Evidence — TDD red-first, negative controls proven by execution

RED before the fix, with the verbatim #1604 reply as the fixture:

```
FAIL Case K: expected 0 got 1
```

GREEN after, 24 assertions. The OMN-16823 surface:

```
PASS: Case K blocking=0 for the verbatim omnibase_core#1604 agreement-plus-deferral concession
PASS: Case K concession ack names class=agreement_deferral
PASS: Case L blocking=1 for an unanswered CodeRabbit finding
PASS: Case M blocking=1 when CodeRabbit escalates while using deferral vocabulary
PASS: Case N blocking=1 for a negated agreement (do not agree ... is reasonable)
PASS: Case O blocking=1 for agreement on a sub-point with the finding kept
PASS: Case P blocking=1 when concession vocabulary only appears inside a details block
PASS: Case Q blocking=1 — agreement-plus-deferral without a human rebuttal is not a concession
PASS: Case R blocking=1 — truncated thread stays conservative despite a concession in the fetched slice
PASS: no thread-resolution mutation present in the gate script
ALL TESTS PASSED
```

Cases **L–R are the permanent negative controls** required by AC3, each
proven red by execution rather than argued. M is the one a bare keyword
search gets wrong: CodeRabbit escalating while reusing the entire
deferral vocabulary ("I disagree that deferring the validation design to
OMN-16037 is reasonable"). P proves the salient-body stripping: the
concession vocabulary sits only inside a `<details>Learnings</details>`
block while the visible reply keeps the finding.

Falsifiability is by discrimination, not assertion: restoring **only**
`scripts/check-unresolved-threads.sh` to its `origin/dev` content in the
same worktree and re-running reproduces `FAIL Case K: expected 0 got 1`.

## Enforcement (Operating Rule 5)

The filter suite was an opt-in script wired to nothing. It now runs in
two enforced places:

- pre-commit hook `cr-thread-gate-filters` (verified firing:
`CR-thread-gate jq filter tests (OMN-16823)....Passed`)
- a step in the CI `quality` job, which feeds the required
`quality-gate` context

plus `tests/scripts/test_check_unresolved_threads_filters.py`, a pytest
entrypoint that executes the real suite and additionally asserts by name
that the positive case and all seven negative controls are still present
— so a regression that quietly deletes a control fails rather than
silently passing.

## dod_evidence

OCC evidence companion: `contracts/OMN-16823.yaml` +
`drift/dod_receipts/OMN-16823/dod-omn-16823-concession-detection-behavior/`
in `onex_change_control` (merges first). Both bound checks are BEHAVIOR
class and both execute the filters rather than reading a file.

Evidence-Ticket: OMN-16823
Evidence-Source: OCC#7390

---------

Co-authored-by: jonahgabriel <jonahgabriel@users.noreply.github.com>
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