Skip to content

ci(OMN-14098): OCC evidence-only fast-lane — docs_only-gated code analysis + CodeQL skip-with-success (canary: onex_change_control) - #3665

Merged
jonahgabriel merged 13 commits into
devfrom
jonah/omn-14098-occ-evidence-fastlane
Jul 7, 2026
Merged

jonahgabriel merged 13 commits into
devfrom
jonah/omn-14098-occ-evidence-fastlane

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

OMN-14098 — WS-E(A) OCC evidence-only fast-lane (canary: onex_change_control)

Closes OMN-14098.

Problem

OCC evidence/receipt companion PRs (changed paths ⊆ contracts/ ∪ drift/dod_receipts/) currently run the full ~30-check code gauntlet meant for source changes (CodeQL, PEP-604/UP007, Python↔TS-Null, Kafka-Boundary, Migration Conflict/Inventory, Seam Coverage, Imperative Guard, Compute Smart-Test-Selection, Tests, Type-Check, several of which clone 5–7 sibling repos each). Against pure YAML/receipt content this is pure latency tax + spurious reds — companions arm but never converge against a saturated fleet.

Design (this canary)

The shared zone-filter (reusable OmniNode-ai/omnibase_core/.github/workflows/zone-filter.yml@main) is already wired and already fires on these PRs, emitting docs_only=true — and its _DOCS_PREFIXES already ⊇ contracts/ ∪ drift/dod_receipts/. So this canary reuses the existing docs_only output and gates the heavy code-analysis jobs off with if: needs.zone-filter.outputs.docs_only != 'true', while keeping every validation/secret/governance gate running.

No shared classifier edit — the change is 100% inside onex_change_control (true canary per feedback_canary_before_fanout). The ticket's dedicated narrower evidence_only output + node-contract.yaml-vs-ticket-contract discrimination is the fan-out generalization (see follow-up).

KEPT (still run + report) — unchanged

  • verify / verify (receipt-gate), occ-preflight / eligibility, OCC Append-Only Gate, Receipt Honesty Gate
  • Validate Contract YAML, Contract Sync Gate, Contract Compliance Check, Schema Purity & Naming
  • Pre-commit, Doctrine Coverage Matrix, main-target-guard, gate / CodeRabbit Thread Check
  • Secret/leak: call-reject-skip-token / … / reject-skip-gate-token, URL Authority Gate, No New os.environ Reads, AI-Slop Pattern Check
  • pr-title, docs-validate, CI Summary

SKIPPED on evidence-only (docs_only=true) — gated off

Job (context) File Required? Mechanism
CodeQL / CodeQL Analysis (python) security-scan.yml required (main) step-level skip-with-success — job runs + exits 0, context reports green
Compute Smart Test Selection ci.yml no job if (docs_only + PR)
Imperative Contract Guard ci.yml no job if
Context Integrity Contract Compliance ci.yml no job if
Migration Conflict Check (clones 5 repos) ci.yml no job if
Migration Inventory Sync (clones 7 repos) ci.yml no job if (needs pre-commit+zone-filter)
Kafka Boundary Parity (clones 6 repos) ci.yml no job if
Python↔TypeScript Null Contract (clones omnidash) ci.yml no job if
Seam Contract Coverage ci.yml no job if
Type Check / Tests ci.yml no already gated on docs_only
PEP 604 Type Union (UP007) omni-standards-compliance.yml no job if (spurious-red cleanup)

Wedge-safety argument (load-bearing)

  • No required context is dropped. Verified live via gh api .../branches/{dev,main}/protection/required_status_checks:
    • dev (7): verify / verify, Pre-commit, CI Summary, call-reject-skip-token / scan / reject-skip-gate-token, occ-preflight / eligibility, Dep Provenance Gate, Doctrine Coverage Matrix
    • main (6): CI Summary, CodeQL / CodeQL Analysis (python), gate / CodeRabbit Thread Check, verify / verify, call-reject-skip-token / scan / reject-skip-gate-token, main-target-guard
  • None of the gated jobs are individually required on dev or main. Skipping them cannot wedge branch protection.
  • CodeQL is required on main → handled with skip-with-success, NOT paths-ignore: the codeql job stays present (job name/context unchanged), its analysis steps are step-gated, and an Evidence-only short-circuit step echoes + exits 0 so the context reports green. Job-level if: ${{ !cancelled() }} makes it run even if zone-filter fails/skips — then docs_only is empty ('' != 'true'), so the analysis steps run (fail-safe = full CodeQL). The required context therefore always reports.
  • CI Summary (required both) has if: always() and only fails on failure/cancelled; the gated jobs becoming skipped is tolerated. It includes zone-filter in needs, so a zone-filter failure fails CI Summary closed (visible + re-runnable), not silently green.
  • merge_group / push / schedule → zone-filter forces docs_only=false → the full gauntlet + full CodeQL still run at the merge boundary and on the weekly security cron. Security posture preserved; only pure-evidence PR-time runs are trimmed.
  • Mixed PRs (any non-DOCS path — src/, tests/, .github/) yield docs_only=false → full gauntlet. Correct and desired. This PR edits .github/workflows/*.yml → docs_only=false → the full gauntlet runs here, validating the edited workflows end-to-end.

Path caveat (node-contract-compliance)

Moot in this canary: onex_change_control contracts/ holds only ticket contracts (contracts/OMN-*.yaml, validated against ModelTicketContract); there are no NodeCompute/handler contract.yaml files and no node-contract-compliance check in its CI. Gating on docs_only cannot mis-skip a node-contract check — there is none. The node-vs-ticket discrimination belongs in the shared classifier at fan-out.

Correction to the discovery spec

Discovery §6(5) claimed Dep Provenance Gate has "no producer" in this repo (latent dev wedge). False — .github/workflows/dep-provenance-gate.yml (job name Dep Provenance Gate, on: pull_request → [main, dev]) is the producer and reports on every dev/main PR. No latent wedge; no follow-up needed there.

Local gates

  • actionlint clean on all 3 edited workflows (one pre-existing SC2129 style note in smart-test-select's run-script is on origin/dev too and untouched by this diff).
  • python -c 'yaml.safe_load(...)' parses all 3.
  • No .py changed → ruff N/A. No hardcoded /Users/ or /Volumes/ paths. No skip tokens; no --no-verify.

OCC companion — REQUIRED (confirmed at build; must be authored INDEPENDENTLY)

Build surfaced it: verify / verify (required dev+main) and occ-preflight / eligibility (required dev) fail RED with
{"reason":"missing_contract","missing_contracts":["OMN-14098"],"eligible":false,"detail":"one or more ticket contracts are missing from pinned OCC evidence"}.
The receipt-gate owns the ticket from this PR's Closes OMN-14098 and therefore requires an OCC companion for OMN-14098 — contracts/OMN-14098.yaml + drift/dod_receipts/OMN-14098/… — to exist in pinned OCC evidence, regardless of which files this PR changes (so the "a .github/ change needs no companion" premise did not hold; the ticket citation alone triggers it).

Per OMN-14055 / feedback_no_self_authored_evidence, the implementing agent (me) did NOT and must NOT self-author this companion — it must come from the merge-sweep autogen tick or an independent verifier. Until it lands, verify / verify + occ-preflight / eligibility stay red — expected, and part of what this PR is held for. No skip token used.

⚠️ FAN-OUT + MERGE HELD FOR OPERATOR REVIEW (CI-gate change)

Per the canary discipline, this lane arms + flags only; it does not drive to merge. Operator-review follow-ups:

  1. Fan-out to omnimarket / omnibase_infra by adding a dedicated additive evidence_only output (narrower: contracts/ ∪ drift/dod_receipts/) to the shared zone_classifier.py / zone-filter.yml, preserving node-contract-compliance on real node/handler contract.yaml.
  2. Verify skip-with-success live: after this reaches main, confirm on a branch-preview pure-evidence PR that CodeQL / CodeQL Analysis (python) reports green (not "skipped"/absent). Evidence PRs target main, so the fast-lane only benefits them once promoted dev→main.

…cs_only, CodeQL skip-with-success (canary: onex_change_control)

WS-E(A) OCC evidence-only fast-lane. On pure evidence PRs (all changed paths in
contracts/ + drift/dod_receipts/, already the DOCS zone => zone-filter docs_only=true)
skip the heavy code-analysis gauntlet while KEEPING every format/round-trip,
receipt/contract-validation, secret/leak, and governance gate that must still run.

Canary scope: onex_change_control ONLY (feedback_canary_before_fanout). No shared
omnibase_core classifier edit — reuses the existing docs_only output, which is a
strict superset of contracts/ ∪ drift/dod_receipts/. Fan-out (dedicated evidence_only
output + node-vs-ticket contract discrimination) is an explicit operator-review follow-up.

ci.yml — gate on `needs.zone-filter.outputs.docs_only != 'true'` (SKIP set):
  smart-test-select, imperative-contract-guard, context-integrity-contracts,
  migration-conflicts, migration-inventory, kafka-boundary-parity,
  cross-repo-null-contract, seam-contract-coverage.
  (type-check + test were already gated on docs_only.)

security-scan.yml — CodeQL skip-with-success (LOAD-BEARING): add a zone-filter job
  and gate the CodeQL init/autobuild/analyze steps; the `codeql` job still runs and
  exits 0 via a short-circuit echo, so the REQUIRED `CodeQL / CodeQL Analysis (python)`
  context still reports SUCCESS. Job-level `if: ${{ !cancelled() }}` makes it run even
  if zone-filter fails (fail-safe = full CodeQL scan), so the required context never
  goes unreported. Never removed/renamed; never used paths-ignore.

omni-standards-compliance.yml — gate the (non-required) PEP-604 type-union-check
  on docs_only to remove spurious src/-lint reds on evidence PRs.

Wedge-safety: no required context is dropped. On dev the required set is
{verify/verify, Pre-commit, CI Summary, reject-skip-gate-token, occ-preflight/eligibility,
Dep Provenance Gate, Doctrine Coverage Matrix}; on main it is {CI Summary, CodeQL/CodeQL
Analysis (python), CodeRabbit Thread Check, verify/verify, reject-skip-gate-token,
main-target-guard}. None of the gated jobs are individually required; CI Summary
(if: always()) tolerates skipped; CodeQL uses skip-with-success. merge_group/push/schedule
force docs_only=false => full gauntlet at the merge boundary and weekly cron.

This PR itself edits .github/workflows/*.yml (not DOCS) => docs_only=false => the full
gauntlet runs here, validating the edited workflows end-to-end.

FAN-OUT + MERGE HELD FOR OPERATOR REVIEW (CI-gate change).
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d7a48a4-4f68-4854-9919-c147a47f2d88

📥 Commits

Reviewing files that changed from the base of the PR and between 3dd9ebe and 43de790.

📒 Files selected for processing (16)
  • .github/workflows/call-reject-skip.yml
  • .github/workflows/ci.yml
  • .github/workflows/cr-thread-gate.yml
  • .github/workflows/dep-provenance-gate.yml
  • .github/workflows/doctrine-coverage.yml
  • .github/workflows/main-target-guard.yml
  • .github/workflows/non-dev-base-guard.yml
  • .github/workflows/omni-standards-compliance.yml
  • .github/workflows/pr-title-check-reusable.yml
  • .github/workflows/pr-title-check.yml
  • .github/workflows/security-scan.yml
  • .github/workflows/stale-todo-gate.yml
  • .github/workflows/validate-validator-requirements.yml
  • contracts/OMN-14098.yaml
  • drift/dod_receipts/OMN-14098/dod-occ-fastlane-pr-3665/command.yaml
  • drift/dod_receipts/OMN-14098/dod-occ-self/command.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-14098-occ-evidence-fastlane

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

@jonahgabriel
jonahgabriel enabled auto-merge (squash) July 7, 2026 03:36
@jonahgabriel
jonahgabriel merged commit e5048f8 into dev Jul 7, 2026
42 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14098-occ-evidence-fastlane branch July 7, 2026 17:24
jonahgabriel added a commit that referenced this pull request Aug 8, 2026
…#6226)

test/type-check were unconditionally skipped on every dev-targeting PR
(if: ... && (github.event_name != 'pull_request' || github.base_ref != 'dev')).
Since dev is this repo's default branch, that meant essentially all OCC
traffic merged with zero unit tests and zero type-checking, silently, for
a month. The `smart-test-select` job that appears to explain the carve-out
(added at the same commit) computed a changed-file-based test selection but
was never wired to anything downstream -- no job consumed its
selected_paths/matrix/is_full_suite outputs -- so it ran, computed, and
discarded, providing zero coverage in its place.

Provenance: the base_ref != 'dev' carve-out on test/type-check, and the
matching smart-test-select if: gate, were both introduced by
e5048f8 (OMN-14098 / PR #3665,
2026-07-07, "OCC evidence-only fast-lane"). Before that commit both jobs
ran unconditionally (modulo the pre-existing docs_only fast lane); the
commit's own message notes "(type-check + test were already gated on
docs_only.)" -- the base_ref clause was new. smart-test-select itself
predates that commit (7166bbd / OMN-10763, change-aware selection port)
but its output was never consumed by `test` even before OMN-14098 --
`test` has always run the unfiltered `uv run pytest --cov=...` regardless
of selector output. The gap the ticket describes is real from day one of
smart-test-select's existence; OMN-14098 additionally made it total by
skipping the job outright on dev PRs.

Fix (simplest fail-closed shape, per CLAUDE.md rule 4's dev-boundary
default): remove the base_ref != 'dev' carve-out from both jobs' if:
conditions so they run on every non-docs-only PR again, and delete the
orphaned smart-test-select job rather than wire it -- OCC's suite is small
enough that full-suite-on-dev matches the fail-closed default until a
governed selector is deliberately wired (a separate, explicit follow-up,
not a silent-skip default). Adds an explicit strict success-only check for
test/type-check in ci-summary (mirroring the OMN-15484 merge-hold-gate
pattern) since both jobs are LEGITIMATELY skipped on docs-only PRs -- the
check distinguishes that from an illegitimate skip, which the existing
generic contains(needs.*.result, 'failure'/'cancelled') rollup could not.

Dev-tip audit (before this fix, on origin/dev @ c9b86d1, per OMN-15731's
instruction to check for latent breakage this hole allowed): full suite
`uv run pytest tests/ -q` -> 5915 passed, 47 skipped, 0 failed. `uv run
mypy src/ tests/` -> Success: no issues found in 396 source files. Both
clean -- this fix does not need to carry any dev-tip test repair as part
of its payload.

New regression test tests/unit/scripts/test_test_typecheck_wiring_omn15731.py
renders the real ci-summary bash (not a hand-built fixture) and executes
it under bash: success passes; a skip on either job fails closed outside
the docs-only lane; the docs-only fast lane's legitimate skip still
passes; stripping only the new strict block restores the pre-fix bypass
(RED-before control); and the base_ref carve-out / smart-test-select job
are asserted gone from the live file.

Tracking ticket: OMN-15755 (filed by the OMN-15731 label-gated-CI pilot
lane after it found and explicitly scoped out this same gap while
building OCC#6216 -- see that ticket's "Related" section for the full
disclosure chain). This PR is the direct code fix OMN-15755 asks for.

Interaction note: OCC#6216 (OMN-15731 label-gated-CI pilot) has open
ci.yml changes in flight (pre-commit gating + a `Pre-commit` strict block
in ci-summary) touching different jobs in the same file. Based on
origin/dev; whichever of the two PRs lands second should rebase onto the
other.

Evidence-Source: local pytest + mypy runs above, executed in worktree
omni_worktrees/OMN-15731-testfix/onex_change_control on origin/dev @
c9b86d1.
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