Reference setup-rust remotely so its post hook survives relocation (#365) - #375
Reference setup-rust remotely so its post hook survives relocation (#365)#375leynos wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
) 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.
ae4602f to
03af41d
Compare
Summary
The
mutantsjob invoked thesetup-rustcomposite action via theworkspace-relative path
./workflow-src/.github/actions/setup-rust, thenrelocated
workflow-srcto$RUNNER_TEMP(the #343 tree-hygiene fix). At jobteardown the Actions runtime re-resolves the local action's
action.ymlfromthat same path to run its cache-save post hook, but the directory has moved,
so
Post Setup Rustfails with "Can't findaction.yml... under.../workflow-src/.github/actions/setup-rust" and reddens an otherwise green
run (mutation testing itself succeeds).
This references
setup-rustfrom its own repository, pinned by SHA. A remoteuses:is materialised under the runner's managed_actionsdirectory, whichlives 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 (stillpresent for the Python helper scripts) is unaffected.
Closes #365.
Review walkthrough
.github/workflows/mutation-cargo.yml—Setup Rustnow usesleynos/shared-actions/.github/actions/setup-rust@<sha>(pinned to the sameSHA as the neighbouring
resolve-workflow-sourcepin, bumped manually), andthe guard becomes
env.ACT != 'true'(equivalent to the oldcheckout == 'true', but expresses intent now that the checkout is nolonger consumed).
workflow_scripts/tests/test_mutation_workflow_shape.py— new invarianttest_no_step_references_a_relocated_workflow_src_action: no step mayreference an action via the
./workflow-src/path. Red before the fix(caught the
Setup Ruststep), green after.Validation
pytest workflow_scripts/tests/test_mutation_workflow_shape.py— 6 passed.ruff format --check/ruff check— clean.References