Skip to content

ci: add a minutes-scale fast gate, and fix the two defects it found - #1

Merged
proggeramlug merged 3 commits into
mainfrom
ci/fast-check
Aug 16, 2026
Merged

proggeramlug merged 3 commits into
mainfrom
ci/fast-check

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

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-worker and perch-cli have no Perry dependency — the worker dlopens 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.

The two defects it found before landing

perch-cli did not compile. Not just its tests — the binary:

error[E0599]: no method named `env` found for struct `Arg`
  --> crates/perch-cli/src/main.rs:19:17
   |  #[arg(long, env = "PERCH_URL", default_value = "http://127.0.0.1:80")]

clap's env feature was not enabled, so the derive expanded to a call that does not exist. One feature flag.

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 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-fast is mandatory. 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 in the summary. 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. Worth considering the same one-line change for linux-shared-runtime.yml, which currently cancels main runs on a 120-minute job.
  • Provider suites excluded by name, not pattern — 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_roundtrip SIGBUSed (signal 10) after four tests passed — a crashed target, not a test failure, which is why cargo exited 101 while the summary line still said 0 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_IDS dead-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 with TypeError: value is not a function.

Not addressed here; it argues for bumping perry-main.lock once #8168 lands.

Verified locally

fmt, clippy -D warnings, and 14 tests across the four in-scope targets — all green.

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.
@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: f30329c8-8479-4ffe-ac60-19bbe73bc539

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands.

Ralph Küpper added 2 commits August 16, 2026 11:49
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.
@proggeramlug
proggeramlug marked this pull request as ready for review August 16, 2026 13:43
@proggeramlug
proggeramlug merged commit 72b8f37 into main Aug 16, 2026
2 of 3 checks passed
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