Repository navigation
ci: add a minutes-scale fast gate, and fix the two defects it found - #1
Conversation
The only workflow in this repository is the Linux shared-runtime proof: it needs LLVM 22, a Perry checkout, provider builds and cgroup delegation, and it is budgeted at two hours. Nothing gave a contributor feedback before that finished. perch-host-abi, perch-worker and perch-cli have no Perry dependency — the worker dlopen's application images rather than linking them — so they build, lint and test on a stock toolchain in minutes. perch-daemon and perry-stdlib-shared do need Perry and stay with the proof job. Validating the gate locally surfaced two real pre-existing defects, both fixed here so it lands green rather than arriving red and being ignored: - **perch-cli did not compile at all.** `#[arg(long, env = "PERCH_URL", ...)]` needs clap's `env` feature, which was not enabled; the derive expanded to an `Arg::env` call that does not exist. The binary, not just its tests. - **plugin_host.rs tripped `items_after_test_module`** — a `#[cfg(test)] mod boundary_tests` sat mid-file with five production items after it. Moved to the end, where a reader looking for production code does not have to page past it. Three details in the workflow are deliberate: - `--no-fail-fast` is mandatory here. Without it the run stops at the first failing target and silently skips the remaining worker test binaries, which reads as a pass. - A step surfaces `skip:` lines. Several suites self-skip when fixtures are absent, and a skip is an early `return` that counts as a pass — a green run should not be able to hide that nothing executed. - Cancellation is scoped to pull requests. Cancelling `main` runs means a busy merge day can cancel every run before it reaches a runner, leaving a gate that has never actually executed. The three provider-dependent worker suites (plugin_roundtrip, provider_integrity, binary_http_roundtrip) are excluded by name rather than by pattern, so adding a fourth fails here loudly instead of being skipped silently. They need built provider images and belong to the proof job. Locally: fmt, clippy, and 14 tests across the four in-scope targets, all green.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
The gate's premise was that perch-host-abi, perch-worker and perch-cli have no Perry dependency and therefore need no Perry checkout. That is true of the crates and false of the build: cargo resolves the WHOLE workspace before building any member, so perry-stdlib-shared's path dependency on perry-ffi must be readable even though nothing here builds it. CI caught this; local validation did not, because .perry-main already existed as an untracked worktree in my checkout. A green local run that depends on untracked state is not evidence about a clean one. A depth-1 fetch of the pinned commit is enough — the manifests need to be readable, not compiled — so the job stays minutes-scale.
The step greps for self-skipped suites so a green run cannot hide that nothing executed. It was anchored and lowercase-only — but this repository prints both `skip:` (12 sites) and `SKIP:` (10 sites), so it saw roughly half of them. A skip-detector that cannot see skips is precisely the failure mode the step was added to prevent. Now case-insensitive, unanchored, and covering perch-worker as well.
What
A minutes-scale gate for every PR, plus the two pre-existing defects that validating it exposed.
Why
The only workflow here is the Linux shared-runtime proof. It needs LLVM 22, a Perry checkout, provider builds and cgroup delegation, and it is budgeted at two hours. Nothing in this repository gave a contributor feedback before that finished.
perch-host-abi,perch-workerandperch-clihave no Perry dependency — the workerdlopens application images rather than linking them — so they build, lint and test on a stock toolchain in minutes.perch-daemonandperry-stdlib-shareddo need Perry and stay with the proof job.The two defects it found before landing
perch-clidid not compile. Not just its tests — the binary:clap's
envfeature was not enabled, so the derive expanded to a call that does not exist. One feature flag.plugin_host.rstrippeditems_after_test_module— a#[cfg(test)] mod boundary_testssat mid-file with five production items after it. Moved to the end of the file.Both are fixed here so the gate lands green. A gate that arrives red is a gate everyone learns to ignore.
Deliberate details
--no-fail-fastis mandatory. Without it the run stops at the first failing target and silently skips the remaining worker test binaries — which reads as a pass.skip:lines. Several suites self-skip when fixtures are absent, and a skip is an earlyreturnthat counts as a pass in the summary. A green run should not be able to hide that nothing executed.mainruns means a busy merge day can cancel every run before it reaches a runner, leaving a gate that has never actually executed. Worth considering the same one-line change forlinux-shared-runtime.yml, which currently cancelsmainruns on a 120-minute job.plugin_roundtrip,provider_integrity,binary_http_roundtrip— so adding a fourth fails loudly here instead of being silently skipped.Separately worth knowing
While validating,
plugin_roundtripSIGBUSed (signal 10) after four tests passed — a crashed target, not a test failure, which is why cargo exited 101 while the summary line still said0 failed.It is the suite containing the recently un-ignored 50,000-dispatch churn test, running against a Perry pin that is 58 commits stale and predates the
FUNCTION_CLASS_IDSdead-key fix (PerryTS/perry#8168). That is the second independent sighting of that bug class in Perch — the other being a benchmark shape dying under sustained load withTypeError: value is not a function.Not addressed here; it argues for bumping
perry-main.lockonce #8168 lands.Verified locally
fmt,clippy -D warnings, and 14 tests across the four in-scope targets — all green.