Skip to content

fix(OMN-14953): route prepush hook python invocation through uv run - #2421

Merged
jonahgabriel merged 1 commit into
devfrom
jonahgabriel/omn-14953-prepush-hook-no-floating-python
Jul 24, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonahgabriel/omn-14953-prepush-hook-no-floating-python

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Refs OMN-14953 (lane venv interpreter must match laptop/CI pin — .200 canary finding F3).

scripts/hooks/prepush_smart_tests.sh mixed two interpreter resolution strategies in the same file: uv run python (pinned via .python-version, resolves consistently on every host) and a bare python3 on the JSON-parsing heredoc (line 135), which floats to whatever python3 is first on PATH — independent of the pinned venv. That's the exact interpreter-skew shape OMN-14953 root-causes on the .200 lane venv (3.13.12 there vs 3.12 on laptop/CI).

This PR routes that one heredoc invocation through uv run python for parity with the rest of the hook, and adds a hermetic static gate (tests/ci/test_prepush_hook_pinned_interpreter.py) that fails on any future bare python3/python invocation in scripts/hooks/*.sh not routed through uv run.

Changes

  • scripts/hooks/prepush_smart_tests.sh: python3 - ... → uv run python - ... (1 line)
  • tests/ci/test_prepush_hook_pinned_interpreter.py (new): static scan asserting every scripts/hooks/*.sh script routes python invocations through uv run

Scope note

This is the code-in-repo half of OMN-14953. It does not itself provision or verify the .200 lane venv interpreter — that requires live .200 access (out of scope for this PR; see ticket for the remaining live-verification step).

Test plan

  • uv run pytest tests/ci/test_prepush_hook_pinned_interpreter.py -v — RED pre-fix (flags the bare python3 invocation), GREEN post-fix
  • shellcheck scripts/hooks/prepush_smart_tests.sh — clean
  • uv run mypy tests/ci/test_prepush_hook_pinned_interpreter.py — no issues
  • pre-commit run --files scripts/hooks/prepush_smart_tests.sh tests/ci/test_prepush_hook_pinned_interpreter.py — all passed
  • Governed pre-push impacted-test selector — passed, push succeeded

Evidence-Ticket: OMN-14953
Evidence-Source: OCC#4702

Evidence-Commit: 8c2171c9d37088454f5cc785f2ff6409f917d5ee

scripts/hooks/prepush_smart_tests.sh mixed two interpreter resolution
strategies: `uv run python` (already pinned via .python-version) and a
bare `python3` on line 135 that floats to whatever PATH resolves --
the exact interpreter-skew shape OMN-14953 root-causes on the .200
lane venv. Route the JSON-parsing heredoc through `uv run python`
too, for parity with the rest of the hook.

RED->GREEN: tests/ci/test_prepush_hook_pinned_interpreter.py fails
pre-fix (flags the bare python3 invocation), passes post-fix. Full
tests/ci/ suite (895 tests) green; manual heredoc smoke test confirms
`uv run python -` behaves identically to the prior `python3 -` for
stdin-piped script invocation. No live .200 access.
@coderabbitai

coderabbitai Bot commented Jul 24, 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: 16 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: 3c6491d7-583e-4cfd-915d-66a6bf59d2aa

📥 Commits

Reviewing files that changed from the base of the PR and between 2949926 and 869a319.

📒 Files selected for processing (2)
  • scripts/hooks/prepush_smart_tests.sh
  • tests/ci/test_prepush_hook_pinned_interpreter.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonahgabriel/omn-14953-prepush-hook-no-floating-python

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

jonahgabriel added a commit to OmniNode-ai/onex_change_control that referenced this pull request Jul 24, 2026
…ibase_infra#2421 (#4702)

* evidence(OMN-14953): author OCC companion for OmniNode-ai/omnibase_infra#2421

OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 869a3195a2ec3c51bad72b8eb213e69c21d465be.

* evidence(OMN-14953): self-bind OCC#4702 + rebind contract_sha256

---------

Co-authored-by: omnimarket-bot <bot@omninode.ai>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Hostile Reviewer — DEGRADED (informational)

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

Note: All reviewer models failed or were unavailable. Degraded results are informational during the pilot phase (OMN-8468/OMN-8524) and do not block merge. Error: all review endpoints [192.168.86.201:8000 192.168.86.201:8001 ] unreachable — preflight short-circuit (no models available)


Gate semantics (pilot phase)

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

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

@jonahgabriel
jonahgabriel merged commit 7aef2f6 into dev Jul 24, 2026
140 of 148 checks passed
@jonahgabriel
jonahgabriel deleted the jonahgabriel/omn-14953-prepush-hook-no-floating-python branch July 24, 2026 14:50
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