ci(local): add --native so the long legs can run without the VM - #716
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The merge bar's two full suites and the client-compat harness only exist in the moon-dev VM. When that VM is unavailable — it has been destroyed mid-run more than once — the long legs cannot run at all, and a testing phase that wants to stay on one machine has no supported way to do it. --native runs, on the macOS host: the same lint gates, the monoio suite, the tokio suite, a release build, and the client-compat harness against a host redis-server (pinned via --moon-bin to the binary built in that run, because find_moon_binary()'s fallback has graded a stale quarantined binary before). It is deliberately not sold as equivalent. macOS drives monoio on kqueue, so the SHIPPED Linux io_uring path is untested by a native run, as are cfg(target_os = "linux") code, Windows, and the MSRV pin. The mode ends by naming those gaps instead of printing a bare "RESULT: PASS" — a local gate that quietly implies full coverage is worse than no gate. For the same reason a missing redis-server oracle REFUSES with exit 2 rather than skipping: a differential harness with no oracle proves nothing. Tests: four cases in scripts/test-ci-local-preflight.sh cover the refusal, the gap-naming pass, a failing native step still exiting 1, and an unknown flag still exiting 2. Both new guards were mutation-checked — deleting the oracle refusal, and hoisting the native summary above the failure check (which would make every failing native run exit 0) — and each mutation fails its test. author: Tin Dang
The Lint job caught a real bug in the test added one commit ago:
`mktemp -t cilocal-dry` is a BSD spelling. GNU mktemp requires X's in the
template and fails, so on the Ubuntu runner $DRY was empty and the
oracle-refusal case got exit 127 instead of the exit 2 it asserts —
green on the machine it was written on, red everywhere else.
Use the explicit `mktemp -d "${TMPDIR:-/tmp}/...XXXXXX"` form, which is
correct on both, and put the dry script inside that directory.
While here: the two "oracle present" cases only need `command -v
redis-server` to succeed — the dry run never executes it — so they now
run against a stub on PATH instead of skipping on any machine without
redis installed. They were both skipped on the runner, and a guard test
that skips is a guard nobody is testing. The absence case still uses a
real PATH without redis, and skips (loudly) rather than asserting this
machine's /usr/bin layout if redis-server happens to live there.
Both mutations still fail their tests after the refactor: deleting the
oracle refusal (exit 0, want 2) and hoisting the native summary above the
FAILED check (exit 0, want 1).
author: Tin Dang
The Lint job failed again, and the reason was not the assertion it looked like: ci-local.sh hardcodes REPO=/Volumes/Games/tindang-repo/moon and `cd "$REPO" || exit 2` at the top, so on a hosted runner EVERY invocation exits 2 before any gate runs. The oracle-refusal test asserts exit 2, saw exit 2, and still failed on the message — while the two tests that expect 0 and 1 failed outright. An exit code that means "this machine is not the author's laptop" is indistinguishable from a gate's verdict. The hardcode stays as the default — a relative path has resolved to the OLD /Users/tindang/workspaces/tind-repo/moon checkout before, and that trap is worth keeping — but CI_LOCAL_REPO now overrides it, and the test harness passes the current checkout. Reproduced the runner condition locally by pointing the default at a nonexistent path: all four cases still pass, where before the fix they could not have. Both guard mutations still fail their tests under the new plumbing (oracle refusal deleted -> exit 0 want 2; native summary hoisted above the FAILED check -> exit 0 want 1). author: Tin Dang
71bb8ff to
b48c562
Compare
Merge-bar recordThis PR is the mode that exists because the bar cannot be met the usual way right now:
That matters because the first two attempts at this file were green here and red there — once on The mode itself was exercised end to end on a branch merging this with #715 and #717: exit 0, Standing gap, printed by the mode on every run rather than left to memory: no io_uring |
Why
The merge bar's two full suites and the client-compat harness only exist in the moon-dev VM.
When that VM is unavailable — it has been destroyed mid-run more than once, and did so again this
week — the long legs cannot run at all. There was also no supported way to keep a long testing
phase on one machine.
What
scripts/ci-local.sh --nativeruns on the macOS host: the same lint gates, the monoio suite,the tokio suite, a release build, and the client-compat harness against a host
redis-server(pinned with--moon-binto the binary built in that run —find_moon_binary()'sfallback has graded a stale quarantined binary before).
What it deliberately does not claim
macOS drives monoio on kqueue, so a native run does not exercise the shipped Linux
io_uring path, nor
cfg(target_os = "linux")code (O_DIRECT, spin governor, migration), norWindows, nor the MSRV pin. The mode ends by printing exactly that instead of a bare
RESULT: PASS— a local gate that quietly implies full coverage is worse than no gate.For the same reason a missing
redis-serverrefuses with exit 2 rather than skipping: adifferential harness with no oracle proves nothing, and a green skip would be a lie.
Tests
Four new cases in
scripts/test-ci-local-preflight.sh(25 passed, 0 failed):RESULT: FAILThey work by rewriting
run_stepinto a recorder, so the real branching executes in ~1s withoutrunning the 20-minute steps.
Both new guards were mutation-checked, and each mutation fails its test:
got exit=0 want=2✗FAILEDcheckgot exit=0 want=1✗ — i.e. every failing native run would have exited 0No new shellcheck findings vs
main(diffed the reports).Evidence it works end to end
The first full
--nativerun is what surfaced themq_integrationflake fixed in #715.