ci: stop routing CI's cargo through the sandbox wrapper - #154
Conversation
The kernel test step added in #153 fails on every PR: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured ops/cargo.sh unconditionally redirects RUSTUP_HOME to $HOME/.relayflows-toolchain/rustup. On a runner that directory is empty, so the rustup shim has no toolchain to resolve. It passed locally only because every command in that verification had RUSTUP_TOOLCHAIN=stable in front of it, and the workflow was written without it -- so the evidence behind #153 was not the command #153 shipped. The wrapper exists for a cloud sandbox, where the propagated tree drops files over a per-file size cap and a toolchain must be obtainable per step. A GitHub runner has neither constraint, and dtolnay/rust-toolchain has already installed a default toolchain into the standard home. Use plain cargo, as the adjacent release build already does and as its passing runs demonstrate. The SDK step has the same problem through npm test -> test:prep, so expand npm test to its constituents and drop test:prep. Its only real output is the relayflowd binary live-kernel.test.ts execs, and this job has already built one: point RELAYFLOWD_BIN at the release binary instead of compiling a second debug copy through a wrapper that cannot run here. test:prep's chmod of the preflight CLI fixtures is kept inline. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
|
Warning Review limit reachedNext included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
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 Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
The toolchain fix works. CI is now red for a real reason.Run 33816284259: cargo resolves, the kernel suite compiles and executes, and 33 of 34 tests in That is a pre-existing regression on So this PR is a judgement call, and it is yours
I have not merged. My standing flows autonomy is "green and no PR feedback", and this is not green; more to the point, #155 is a regression in a PR I merged, so choosing how to unblock it is not mine to make quietly at 01:30. My recommendation is 1 — a red CI naming a real bug is worth more than a green one that never runs the test. But 2 is defensible if the lane needs to keep moving tonight. 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1 Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
The kernel test step added in #153 fails on every PR: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured ops/cargo.sh unconditionally redirects RUSTUP_HOME to $HOME/.relayflows-toolchain/rustup. On a runner that directory is empty, so the rustup shim has no toolchain to resolve. It passed locally only because every command in that verification had RUSTUP_TOOLCHAIN=stable in front of it, and the workflow was written without it -- so the evidence behind #153 was not the command #153 shipped. The wrapper exists for a cloud sandbox, where the propagated tree drops files over a per-file size cap and a toolchain must be obtainable per step. A GitHub runner has neither constraint, and dtolnay/rust-toolchain has already installed a default toolchain into the standard home. Use plain cargo, as the adjacent release build already does and as its passing runs demonstrate. The SDK step has the same problem through npm test -> test:prep, so expand npm test to its constituents and drop test:prep. Its only real output is the relayflowd binary live-kernel.test.ts execs, and this job has already built one: point RELAYFLOWD_BIN at the release binary instead of compiling a second debug copy through a wrapper that cannot run here. test:prep's chmod of the preflight CLI fixtures is kept inline. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1 Co-authored-by: kjgbot <kjgbot@agentrelay.dev> Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
Split out of #165, which bundled this with a wholesale revert of the CI workflow. The workflow half restored `ops/cargo.sh` for the kernel test step (that wrapper redirects RUSTUP_HOME to an empty dir on a runner, so rustup cannot choose a toolchain) and dropped the analyzer-skip env, i.e. it reverted #153, #154 and #159 together. Only the sdk tooling is carried here; `.github/` is byte-identical to main. scripts/test.sh runs the same chain the inline `test` script did, in the same order, with `set -eu` for the fail-fast the `&&` chain gave. The new behaviour is the EXIT trap, which prunes `.map` and `.d.ts` from sdk/dist afterward. CI is unaffected either way: the workflow runs the expanded chain minus test:prep, not `npm test`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1 Session-Id: c228933d-4f94-4d83-9a9a-daf3c83b94f1
The sdk half of #165, with that PR's CI revert dropped. `.github/` is byte-identical to main (verified: `git diff origin/main --stat -- .github/` returns 0 lines); #165's workflow hunk would have reverted #153, #154 and #159 together, restoring `ops/cargo.sh` for the kernel step, which redirects RUSTUP_HOME to an empty dir on a runner. `scripts/test.sh` runs the same chain the inline `test` script did, in the same order, with `set -eu` supplying the fail-fast the `&&` chain gave. Pruning is source maps only. Deleting `.d.ts` would have left `"types": "./dist/index.d.ts"` pointing at a file `npm test` had just removed. Every current in-repo consumer imports `.js` (`ops/probes/**`, `workflows/drive.yaml`, `workflows/drive-cloud.yaml`, `testdata/backlog-picker.flow.yaml`), so nothing breaks today — but the next TypeScript consumer would meet a failure caused by running the tests. Evidence at this head: - independent signoff: local 3-lens preswarm review, maintainability / history / structure all REVIEW_PASSED. The history lens caught a false scope claim in an earlier message ("only ops/probes consume the sdk"), which was corrected. - CI: linux-x64-artifact success, packed-consumer pass, CodeRabbit pass. The `review` check fails for a reason independent of this change and common to every flows PR: the gate invokes `agent-relay` and no step installs it (exit 127). Supersedes the sdk half of #165.
Repairs the break I introduced in #153. Every PR on
maincurrently fails.What broke
ops/cargo.shunconditionally redirectsRUSTUP_HOMEto$HOME/.relayflows-toolchain/rustup. On a runner that directory is empty, so the rustup shim has no toolchain to resolve. Seen on run 33815895797 (PR #139).Why #153's verification missed it
Every command in that PR's local evidence had
RUSTUP_TOOLCHAIN=stablein front of it:and the workflow — and the report, and the PR body — recorded it without the prefix. The env var supplied the toolchain the empty
RUSTUP_HOMEcould not, and my machine had one installed there from a prior bootstrap. So the tests I ran were real, but they were not the command I shipped. That's the whole defect: the evidence and the artifact diverged by one environment variable.The fix
Kernel step: plain
cargo test --workspace, matching the adjacentcargo build --locked --releasewhose passing runs already demonstrate the configuration works. The wrapper exists for a cloud sandbox — where the propagated tree drops files over a per-file size cap and each step must be able to obtain a toolchain itself. A GitHub runner has neither constraint, anddtolnay/rust-toolchainhas already installed a default toolchain into the standard home.SDK step: same problem, reached through
npm test→test:prep→ops/cargo.sh build. Expandednpm testto its constituents and droppedtest:prep. Its only real product is therelayflowdbinary thattests/live-kernel.test.tsexecs, and this job has already built one — soRELAYFLOWD_BINnow points at the release binary from the build step rather than compiling a second debug copy through a wrapper that cannot run here.live-kernel.test.ts:39reads that variable directly.test:prep's other half —chmod +xon the preflight CLI fixtures — is kept inline. The fixtures are committed100755soactions/checkoutrestores them anyway, but the guard is one line and the failure it prevents is an opaqueEACCESdeep inside a preflight test.Verification
The honest statement: this one is verified by its own CI run on this PR, not by a local run. That is deliberate — the failure was environment-specific to the runner, so a local pass is exactly the evidence that already misled once here. The checks on this PR are the proof.
The coverage #153 intended is unchanged: the full kernel suite and all 26 SDK test files still run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FtQSAcGDta5VH9xiZFT4sR