ci(macos): darwin testbed — the mini stops compiling - #779
Conversation
Mirror the KVM lane's build→test split on the mac lane (N6, podman pattern). The GitHub-hosted `unit` job becomes the lane's build phase: its unit tier moves to nextest (doctests split out, core-tests style), it builds minvmd + min once, and stages a darwin testbed — the shipped bin/../lib layout with the @rpath linkage rewrite applied to minvmd and libkrun.1.dylib bundled — plus the minvmd+sessions nextest archive. The mini's e2e job compiles nothing: no toolchain, no libkrun provisioning, no cargo. It downloads the testbed, restores exec bits, codesigns minvmd with the hypervisor entitlement, and replays the FFI smoke + `_integration` harnesses from the archive. The archive binaries resolve libkrun via an in-script DYLD_FALLBACK_LIBRARY_PATH (their baked rpaths point at the build runner; SIP strips DYLD_* through protected shells, so a step-level env: entry would not arrive); the testbed minvmd resolves it through its own @loader_path/../lib rpath. This collapses the unit/e2e build divergence (one compile serves both tiers), boots the production @rpath layout for real — replacing the static rewrite-on-a-copy check — and cuts a flake rerun of the e2e to the test phase alone. The minimal-links-only-system-libraries guard moves to the hosted job next to the build it checks. Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Comment |
The FFI smoke spawned its helper through the compile-time CARGO_BIN_EXE_krun_smoke_child path, which only exists on the machine that built it — replaying the nextest archive on the mini died with NotFound. nextest ships the helper in the archive and publishes its extracted location as NEXTEST_BIN_EXE_krun_smoke_child at runtime; prefer that, falling back to the compile-time path for plain `cargo test` on a dev box. Same relocation pattern as the harnesses' MINVMD_BIN override. Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
scripts/minvmd-lifecycle.sh was written target-agnostic ("a macOS
testbed later" per its header) but only the KVM lane ran it. With the
darwin testbed the mini now has a prebuilt, codesigned minvmd on PATH,
so the mac lane gains the same supervised-daemon proof: run --detach →
status (Running) → stop → status (Stopped). Placed between the reap
and the CLI session e2e, mirroring the KVM lane; boot-daemon.log joins
the uploaded console logs. Requires jq on the mini (the script fails
fast with a clear error if absent).
Refs: #687
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Two updates after the first run's red
🤖 Generated with Claude Code |
Implements N6 — the last ordered subtask of the CI refactor epic #687: all compilation moves off the Mac mini.
What changed
unit(GitHub-hosted arm64) is now the mac lane's build phase, mirroring the KVM lane'sbuild-linux→test-kvmsplit (#698):cargo nextest run -p minvmd -p sessions(integration harnesses excluded — they're the hypervisor tier), with doctests split into their own step, core-tests style.minvmdandmin(separate invocations — the feature-unification guard and its otool assert move here, next to the build they check).mac-testbedartifact:bin/minvmd+bin/min+lib/libkrun.1.dylibin the shipped layout, withscripts/rewrite-macos-linkage.shapplied to minvmd (the script's own verification reds the PR on a broken ship layout), plus the minvmd+sessions nextest archive.e2e(the mini) compiles nothing: toolchain, libkrun provisioning, and every cargo invocation are gone. It downloads the testbed, restores exec bits, codesigns minvmd with the hypervisor entitlement, then:_integrationharnesses from the archive (cargo-nextest ... --archive-file, auto-discovery filtersets unchanged);bin/on PATH.Archive-extracted test binaries resolve
@rpath/libkrun.1.dylibviaDYLD_FALLBACK_LIBRARY_PATHpointing at the testbedlib/— exported in-script, because SIP stripsDYLD_*crossing protected shells, so a step-levelenv:entry may never reach the test processes. The testbed minvmd needs no such help: its rewritten@loader_path/../librpath finds the bundled dylib — meaning the e2e now boots the production linkage layout for real, replacing the old static rewrite-on-a-throwaway-copy check.Why
cargo testbuild + a second full build on the mini) collapses into the single hosted build.bin/../liblayout users receive is what CI boots.Also updates the
docs/ci-strategy.mdmapping note (the archive-replay pattern now lives in the KVM and macOS lanes, per §7's "build nothing on this machine"). The CONTRIBUTING.md contract table needs no change — harness auto-discovery by_integrationsuffix is untouched.Validation
actionlintclean.ci-macos.yml+scripts/**-adjacent paths, so thechangesfilter runs the full lane against itself: the real proof is this PR's ownci-macos-success.target/dir; stale contents there are inert.Refs: #687 (N6)
🤖 Generated with Claude Code