ci(zs): keep cargo's default target dirs on CI runners (fixes Relay E2E after #34) - #41
Merged
Merged
Conversation
#34 keyed CARGO_TARGET_DIR by worktree in the shared scripts and Justfile recipes. On GitHub runners that broke the Relay E2E job: the job downloads the prebuilt relay into target/ci and starts it with --no-build, but start-relay-for-tests.sh now looked in ~/.cache/zs/buzz-cargo-targets/<key>/root/ci. #34's own runs never exercised the job because a scripts-only change skips it; every merge-queue run after #34 landed failed there (#36, #38, #37). Keying is for shared developer machines; CI runners are ephemeral, so cargo-target-dir.sh returns cargo's default target/ and desktop/src-tauri/target when CI is set, which also restores the rust-cache paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8VoJ9givMm44HNc4gx5Gz Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every merge-queue run since #34 landed has failed in Relay E2E → Start relay (#36, #38, #37 ejected):
The job downloads the prebuilt relay into
target/ciand starts it with--no-build, butscripts/start-relay-for-tests.sh(and the other scripts and Justfile recipes #34 touched) now export the worktree-keyedCARGO_TARGET_DIR. #34's own PR and queue runs never exercised Relay E2E because a scripts-only change skips it in the path filter.What changed
scripts/zs/cargo-target-dir.sh: whenCIis set, return cargo's default locations (<repo>/targetforroot,<repo>/desktop/src-tauri/targetfordesktop) instead of the keyed cache dir. Keying exists to isolate worktrees on a shared developer machine; CI runners are ephemeral. This is a single-point fix that also restores the rust-cache paths for every Justfile recipe on runners. Local behaviour is unchanged.Gates run
CI=true scripts/zs/cargo-target-dir.sh root|desktop→ repo-local paths; unset → keyed cache dir (unchanged).bash -n,shellcheck: clean.Follow-up
Add Relay E2E to the path filter for
scripts/**so a script-only change cannot skip the job that runs it.🤖 Generated with Claude Code
https://claude.ai/code/session_01P8VoJ9givMm44HNc4gx5Gz
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.