Repository navigation
feat(OMN-13973): wire governed impacted-test selector as pre-push hook (omnimarket, WS7 fan-out) - #1793
Conversation
…k (omnimarket, WS7 fan-out)
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Architectural Review — PASSEDErrors: 0 What this checks
No architectural violations found. Static architectural lint — no model inference (OMN-14176). |
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics (pilot phase)
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
…imarket#1793 (#4290) * evidence(OMN-13973): author OCC companion for OmniNode-ai/omnimarket#1793 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head aae7e2c5c1032660c548a8c26b941612baeadb09. * evidence(OMN-13973): self-bind OCC#4290 + rebind contract_sha256 * fix(OMN-13973): repair generated OCC companion placeholders --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
OMN-13973 — governed impacted-test selector as a PRE-PUSH hook (omnimarket, WS7 fan-out)
Fan-out of the proven canary omnibase_core#1451 (
verified real=TRUE) to omnimarket. Wires arepo:localpre-commit hookprepush-smart-tests(stages:[pre-push]) backed byscripts/hooks/prepush_smart_tests.sh. The wrapper computes changed files vs theorigin/devmerge-base and DRY-invokes the EXACT CI selector module (uv run python -m scripts.ci.detect_test_paths), then runsuv run pytest <selected_paths> --ignore=tests/integration.This is a per-repo SEAM-MATCH, not a paste
omnimarket's
scripts/ci/detect_test_paths.pyis hardcoded toSRC_PREFIX="src/omnimarket/"+ its ownscripts/ci/test_selection_adjacency.yaml. Its CLI does NOT accept--base-ref(the canary's selector does, for apyprojectclassifier omnimarket lacks) — a paste of the canary invocation would hard-errorunrecognized arguments. The wrapper therefore matches omnimarket's live CI seam exactly (.github/workflows/ci.yml:--changed-files-from/--ref-name/--event-name/--feature-flag, default adjacency, no--base-ref) and computes the diff base itself forgit diffonly.Label / scope
Fast local impacted subset, ADVISORY of the full CI suite — NOT byte-parity. On CI the selector is behind
ENABLE_SMART_TESTS(off by default); the enforced merge gate is the full suite.tests/integrationis always ignored (CI-only).NET-NEGATIVE-SURFACE (retired surface)
Retires the "run the whole unit suite by hand before every push" manual default for omnimarket — root CLAUDE.md Rule #4: "Local pre-push: use the governed selector where wired (OMN-13973); until that lands, the full local suite remains the fail-closed default." This hook makes that governed selector the wired pre-push default.
FAIL-LOUD (CLAUDE.md Rule #8)
Hard-errors (
exit 1) with remediation if the diff base, the selector, or its adjacency config cannot resolve. Never a green skip — a gate that cannot run is indistinguishable from a failing gate.dod_evidence (all run in worktree off latest
origin/dev)Fresh-worktree selector resolution (systemic uv-run/worktree fragility, parity plan §3d.2/3):
uv run python -m scripts.ci.detect_test_pathsresolves cleanly from a fresh worktree (builds venv, emits valid JSON) — no sibling-resolution repro; plainuv runfrom repo root is the worktree-safe invocation.Installation proof — fresh
pre-commit install --hook-type pre-commit --hook-type pre-push --hook-type commit-msgwrote.git/hooks/pre-push(# File generated by pre-commit). A realgit pushthen fired it:(config-only diff maps nothing →
tests/fallback; the real-push pytest was bounded to collect-only viaPREPUSH_PYTEST_ARGS=--co -qbecause the omnimarket unit suite is 12,270 tests incl. kafka-marked. mypy auto-skipped: itsfiles:regex^src/omnimarket/.*\.py$matched none of this PR's files.)Subset proof (real execution + wall-clock) — temp commit touching only
tests/intelligence/:Fail-closed escalation proof — temp commit touching shared module
src/omnimarket/models/:(bounded
--co;pyproject.toml/tests/conftest.py/tests/fixtures//pytest.ini→test_infrastructure,≥6modules →threshold_modules,main→main_branch, flag off →feature_flag_offall likewise force the full suite — verified against the selector.)Fail-loud (hard-error) proofs — both exit 1, never green-skip:
PREPUSH_BASE_REF=origin/omn13973-no-such-ref-xyz) →ERROR: base ref ... could not be resolved→exit 1PREPUSH_ADJACENCY=/tmp/nonexistent.yaml) → selectorFileNotFoundErrorsurfaced →ERROR: governed test selector failed to resolve a selection→exit 1Local gates —
pre-commit run(pre-commit stage) on the two changed files: all applicable hooks Passed (incl.Pre-commit fail-loud meta-gate (OMN-14666)andPre-commit/CI pin-parity check), rest Skipped.default_install_hook_typesalready includespre-push(verified onorigin/dev); the hook uses no literalexit 0and no SKIP/BYPASS env-gated exit, so it does not trip the fail-loud meta-gate.Notes
Closes OMN-13973
Evidence-Ticket: OMN-13973
Evidence-Source: OCC#4290
Evidence-Commit: 6b429f38613e2577c9d7872269cd10072c82b563
Evidence-Head: aae7e2c