Repository navigation
fix(OMN-16326): interpreter-free pre-push load probe restores the pinned-interpreter gate - #2824
Conversation
…953 gate) OMN-16295 (d36b7cc) added host_load_ratio() with three bare `python3 -c` invocations, which regressed the OMN-14953 pinned-interpreter gate (tests/ci/test_prepush_hook_pinned_interpreter.py). Both tests in that file failed on a clean origin/dev checkout, and because the file lives under scripts/hooks/ the test lands in the pre-push impacted subset -- blocking pushes to this repo from every worktree. `uv run` is not an available fix for the two ssh-embedded invocations: they execute on .200/.201, and .201 has no `uv` binary at all (probed 2026-08-20). Rather than carve an ssh-shaped exception out of a static gate, this drops the interpreter from the probe entirely -- there is no interpreter left to float, so OMN-14953's assertion is satisfied as written and not weakened, and interpreter startup leaves the pre-push critical path. Two portability constraints are encoded in the new probe: - cut(1) instead of `set -- $(...)`, because .200's remote login shell is zsh, which does not word-split unquoted command substitution. - no single quotes and POSIX-only, because the snippet is handed to ssh(1) and run by whatever login shell the remote user has (bash on .201, zsh on .200). Verified equivalent to the removed python probe on all three hosts: local 15.90 24 -> 0.662 (fit) .200 15.90 24 -> 0.662 (fit) .201 32.05 32 -> 1.002 (over threshold, correctly discriminated at 1.0) Failure path: unreachable target returns rc=1 in 3.0s (ConnectTimeout-bounded, no hang) and host_is_fit returns 2 ("could not check"), still distinct from 1 ("over capacity"). Both PREPUSH_LOAD_OVERRIDE_* deterministic paths unchanged. Evidence-Ticket: OMN-16326
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 minutes Limit details: You’ve used the included review currently available. Your 117 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
|
OCC autobind did not mint a companion for this PR: no changed-file candidate could be proven RED against the merge base, and emitting a PR-existence probe instead would be non-falsifiable evidence (OMN-15247). Hand-authored evidence is required. |
❓ Hostile Reviewer — UNKNOWNBlocking findings (critical): 0 Gate semantics (pilot phase)
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8468/OMN-8524) |
Summary
Fixes OMN-16326. Fixes a regression introduced by OMN-16295 (
d36b7ccba, #2816).host_load_ratio()shipped with three barepython3 -cinvocations inscripts/hooks/prepush_smart_tests.sh, which regressed the OMN-14953 pinned-interpreter gate (tests/ci/test_prepush_hook_pinned_interpreter.py, #2421). Both tests in that file were RED on a cleanorigin/devcheckout.Blast radius (measured, not assumed): the pre-push impacted-test selector maps
.github/workflows/**totests/ci/, so every PR touching a workflow file hit the red gate at push time. OMN-16323 (release.yml security fix) was stalled behind exactly this. Ascripts/hooks/**change selectsscripts/tests/ tests/scripts/ tests/unit/scripts/instead, so the bug did not block its own fix.Why not
uv runThe gate's exemption is literal: a
python/python3token passes only when immediately preceded byuv run. That is not an available fix here — two of the three invocations execute on the remote hosts, and.201has nouvbinary at all. Read-only probe, 2026-08-20:uvsysctl -n vm.loadavg.200stickybeatz-studio/Users/jonah/.local/bin/uvsysctl -n vm.loadavg.201192.168.86.201/proc/loadavgThe alternative — teaching the test to exempt ssh-embedded strings — was rejected: the
sshtoken sits on the preceding line continuation, so the scan would need context-aware parsing, and carving an exception out of a static gate to accommodate new code inverts the point of the gate.Fix
Drop the interpreter from the probe entirely. With no interpreter, there is nothing left to float: OMN-14953's assertion is satisfied as written and unweakened (no test change in this PR), and interpreter startup leaves the pre-push critical path.
Two portability constraints are encoded and commented:
cut(1)instead ofset -- $(...)—.200's remote login shell is zsh, which does not word-split unquoted command substitution, soset --would collapse the line into$1there while working fine on.201's bash.ssh(1)and executed by whatever login shell the remote user has.Proof
host_load_ratiostill routes correctlyReal function block sourced from the committed file (not a re-implementation), against live hosts:
host_is_fit.200.201.201landing at 1.002 against a 1.0 threshold shows the discriminator is live, not stuck returning "fit".Failure and override paths preserved:
host_load_ratiorc=1 in 3.0s (ConnectTimeout-bounded, no hang);host_is_fitrc=2 ("could not check"), still distinct from 1 ("over capacity")PREPUSH_LOAD_OVERRIDE_LOCAL="4.0 8"→4.0 8 0.500PREPUSH_LOAD_OVERRIDE_REMOTE="16.0 8"→16.0 8 2.000,host_is_fitrc=1Test plan
uv run pytest tests/ci/test_prepush_hook_pinned_interpreter.py— RED onorigin/dev(2 failed), GREEN here (2 passed)uv run pytest tests/ci/— 1503 passed (the exact subset OMN-16323 selects, i.e. proof it is unblocked)shellcheck scripts/hooks/prepush_smart_tests.sh— cleanpre-commit run --all-files— rc=0, all passedgit pushran the real pre-push chain (canonical-clone guard →pre-commit hook-impl→prepush-smart-tests→ this script) — impacted subset 1685 passed, 6 skipped in 336.77s, "impacted tests passed; allowing push"--no-verifySibling repos
The same OMN-16295 trio merged into
omnibase_core(#1567) andomnimarket(#2115). Neither repo hastests/ci/test_prepush_hook_pinned_interpreter.py, so neither has a failing gate and no push path is blocked there. Both also carry a pre-existing barepython3 -heredoc that predates OMN-16295 (core L376, omnimarket L395). Tracked on OMN-16326 as follow-up rather than fixed speculatively here.Evidence-Ticket: OMN-16326
Evidence-Source: OCC#6813