Skip to content

Reference setup-rust remotely so its post hook survives relocation (#365) - #375

Open
leynos wants to merge 1 commit into
mainfrom
fix/mutation-cargo-setup-rust-post-hook
Open

Reference setup-rust remotely so its post hook survives relocation (#365)#375
leynos wants to merge 1 commit into
mainfrom
fix/mutation-cargo-setup-rust-post-hook

Conversation

@leynos

@leynos leynos commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

The mutants job invoked the setup-rust composite action via the
workspace-relative path ./workflow-src/.github/actions/setup-rust, then
relocated workflow-src to $RUNNER_TEMP (the #343 tree-hygiene fix). At job
teardown the Actions runtime re-resolves the local action's action.yml from
that same path to run its cache-save post hook, but the directory has moved,
so Post Setup Rust fails with "Can't find action.yml ... under
.../workflow-src/.github/actions/setup-rust" and reddens an otherwise green
run (mutation testing itself succeeds).

This references setup-rust from its own repository, pinned by SHA. A remote
uses: is materialised under the runner's managed _actions directory, which
lives outside the caller's workspace and survives teardown, so no relocation
ever touches it and the post hook resolves cleanly. It also removes the only
./workflow-src/ action reference, so the #343 hygiene relocation (still
present for the Python helper scripts) is unaffected.

Closes #365.

Review walkthrough

  • .github/workflows/mutation-cargo.ymlSetup Rust now uses
    leynos/shared-actions/.github/actions/setup-rust@<sha> (pinned to the same
    SHA as the neighbouring resolve-workflow-source pin, bumped manually), and
    the guard becomes env.ACT != 'true' (equivalent to the old
    checkout == 'true', but expresses intent now that the checkout is no
    longer consumed).
  • workflow_scripts/tests/test_mutation_workflow_shape.py — new invariant
    test_no_step_references_a_relocated_workflow_src_action: no step may
    reference an action via the ./workflow-src/ path. Red before the fix
    (caught the Setup Rust step), green after.

Validation

  • pytest workflow_scripts/tests/test_mutation_workflow_shape.py — 6 passed.
  • ruff format --check / ruff check — clean.

References

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dab9046d-fe0c-4ad4-b8e7-48094b978e13

📥 Commits

Reviewing files that changed from the base of the PR and between 4d696e7 and 03af41d.

📒 Files selected for processing (2)
  • .github/workflows/mutation-cargo.yml
  • workflow_scripts/tests/test_mutation_workflow_shape.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mutation-cargo-setup-rust-post-hook

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review July 26, 2026 22:46
codescene-access[bot]

This comment was marked as outdated.

)

The mutants job invoked the setup-rust composite via the workspace-relative
path ./workflow-src/.github/actions/setup-rust, then relocated workflow-src
to $RUNNER_TEMP. At job teardown the runtime re-resolves the local action's
action.yml from that same path to run its cache-save post hook, but the
directory has moved, so the post step fails and reddens an otherwise green
mutation run.

Reference the action from its own repository, pinned by SHA. A remote uses
is materialised under the runner's managed _actions directory, outside the
caller's workspace and surviving teardown, so no relocation touches it. This
also removes the only ./workflow-src/ action reference, keeping the caller's
tree clean during the run (issue #343) unchanged.

Pin a shape-test invariant: no workflow step may reference an action via the
relocated ./workflow-src/ path.
@lodyai
lodyai Bot force-pushed the fix/mutation-cargo-setup-rust-post-hook branch from ae4602f to 03af41d Compare July 27, 2026 13:03
codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No quality gates enabled for this code.

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.

mutation-cargo: relocating workflow-src breaks setup-rust's post-cleanup hook

1 participant